<commit_before><commit_msg>added coprocessor<commit_after>package com.splicemachine.si.coprocessor;

import java.io.IOException;
import java.util.List;

import org.apache.hadoop.hbase.CoprocessorEnvironment;
import org.apache.hadoop.hbase.KeyValue;
import org.apache.hadoop.hbase.client.Delete;
import org.apache.hadoop.hbase.client.Get;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
import org.apache.hadoop.hbase.coprocessor.ObserverContext;
import org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment;
import org.apache.hadoop.hbase.regionserver.wal.WALEdit;
import org.apache.log4j.Logger;

import com.splicemachine.utils.SpliceLogUtils;

public class SIObserver extends BaseRegionObserver {
	private static Logger LOG = Logger.getLogger(SIObserver.class);

	@Override
	public void start(CoprocessorEnvironment e) throws IOException {
		SpliceLogUtils.trace(LOG, "starting %s",SIObserver.class);
		super.start(e);
	}

	@Override
	public void stop(CoprocessorEnvironment e) throws IOException {
		SpliceLogUtils.trace(LOG, "stopping %s",SIObserver.class);
		super.stop(e);
	}

	@Override
	public void preGet(ObserverContext<RegionCoprocessorEnvironment> e, Get get, List<KeyValue> results) throws IOException {
		SpliceLogUtils.trace(LOG, "preGet %s", get);
		super.preGet(e, get, results);
	}

	@Override
	public void prePut(ObserverContext<RegionCoprocessorEnvironment> e, Put put, WALEdit edit, boolean writeToWAL) throws IOException {
		SpliceLogUtils.trace(LOG, "prePut %s", put);
		super.prePut(e, put, edit, writeToWAL);
	}

	@Override
	public void preDelete(ObserverContext<RegionCoprocessorEnvironment> e, Delete delete, WALEdit edit, boolean writeToWAL) throws IOException {
		SpliceLogUtils.trace(LOG, "preDelete %s", delete);
		// tombstone ?
		super.preDelete(e, delete, edit, writeToWAL);
	}

}
{'fraction_non_alphanumeric': 0.10833775889537971, 'fraction_numerical': 0.0005310674455655868, 'mean_word_length': 6.3023255813953485, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '4826341', 'n_tokens_mistral': 636, 'n_tokens_neox': 613, 'n_words': 122}