<commit_before>package org.cloudburst.server.services;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

public class HBaseService {
    private final static Logger logger = LoggerFactory.getLogger(HBaseService.class);

    private HTable table;
    private String tableName;
    private String columnFamily;
    private String qualifier;

    public HBaseService(String tableName, String columnFamily, String qualifier) {
        Configuration config = HBaseConfiguration.create();
        try {
            this.table = new HTable(config, tableName);
        } catch (IOException e) {
            logger.error("IO Exception while trying to connect to HBase table", e);
        }
        this.tableName = tableName;
        this.columnFamily = columnFamily;
        this.qualifier = qualifier;
    }

    public String getRecord(String rowKey) {
        Get get = new Get(Bytes.toBytes(rowKey));
        Result result = null;
        try {
            result = table.get(get);
        } catch (IOException e) {
            logger.error("IO Exception when trying to read from HBase table", e);
        }
        byte[] value = result.getValue(Bytes.toBytes(columnFamily),Bytes.toBytes(qualifier));

        return Bytes.toString(value);
    }
}
<commit_msg>Branch for code submission<commit_after>package org.cloudburst.server.services;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Result;
import org.apache.hadoop.hbase.util.Bytes;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.io.IOException;

public class HBaseService {
    private final static Logger logger = LoggerFactory.getLogger(HBaseService.class);

    private HTable table;
    private String tableName;
    private String columnFamily;
    private String qualifier;

    public HBaseService(String tableName, String columnFamily, String qualifier) {
        // Create a new HBase configuration
        Configuration config = HBaseConfiguration.create();
        try {
            this.table = new HTable(config, tableName);
        } catch (IOException e) {
            logger.error("IO Exception while trying to connect to HBase table", e);
        }
        this.tableName = tableName;
        this.columnFamily = columnFamily;
        this.qualifier = qualifier;
    }

    public String getRecord(String rowKey) {
        Get get = new Get(Bytes.toBytes(rowKey));
        Result result = null;
        try {
            result = table.get(get);
        } catch (IOException e) {
            logger.error("IO Exception when trying to read from HBase table", e);
        }
        byte[] value = result.getValue(Bytes.toBytes(columnFamily),Bytes.toBytes(qualifier));

        return Bytes.toString(value);
    }
}

{'fraction_non_alphanumeric': 0.0945226917057903, 'fraction_numerical': 0.0012519561815336462, 'mean_word_length': 3.0353535353535355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4941086', 'n_tokens_mistral': 885, 'n_tokens_neox': 875, 'n_words': 222}