<commit_before>package com.splicemachine.derby.hbase;

import java.io.IOException;

import org.apache.derby.drda.NetworkServerControl;
import org.apache.hadoop.hbase.CoprocessorEnvironment;
import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
import org.apache.log4j.Logger;

import com.splicemachine.derby.logging.DerbyOutputLoggerWriter;
import com.splicemachine.utils.SpliceLogUtils;
/**
 * Derby Days?
 * 
 * @author johnleach
 *
 */
public class SpliceDerbyRegionObserver extends BaseRegionObserver {
	private static Logger LOG = Logger.getLogger(SpliceDerbyRegionObserver.class);
	protected static NetworkServerControl server;
	public static String SPLICE_OBSERVER_INSTRUCTIONS = "SpliceServerInstructions";
	/**
	 * Logs the start of the observer.
	 */
	@Override
	public void start(CoprocessorEnvironment e) throws IOException {
		SpliceLogUtils.info(LOG, "Starting the coprocessor CoProcessor %s", SpliceDerbyRegionObserver.class);
		super.start(e);
		synchronized (this) {
			if (server == null) {
				try {
					server = new NetworkServerControl();
					server.start(new DerbyOutputLoggerWriter()); // This will log to log4j
					SpliceLogUtils.info(LOG, server.getSysinfo());
				} catch (Exception exception) {
					SpliceLogUtils.logAndThrow(LOG, "Could Not Start Derby - Catastrophic", new IOException(exception));
				}
			}
		}
	}
	/**
	 * Logs the stop of the observer.
	 */
	@Override
	public void stop(CoprocessorEnvironment e) throws IOException {
		SpliceLogUtils.info(LOG, "Stopping the CoProcessor %s",SpliceDerbyRegionObserver.class);
		super.stop(e);
		synchronized (this) {
			if (server != null) {
				try {
					server.shutdown();
					server = null;<commit_msg>Commented out stop since thread is shutting down anyway<commit_after>package com.splicemachine.derby.hbase;

import java.io.IOException;

import org.apache.derby.drda.NetworkServerControl;
import org.apache.hadoop.hbase.CoprocessorEnvironment;
import org.apache.hadoop.hbase.coprocessor.BaseRegionObserver;
import org.apache.log4j.Logger;

import com.splicemachine.derby.logging.DerbyOutputLoggerWriter;
import com.splicemachine.utils.SpliceLogUtils;
/**
 * Derby Days?
 * 
 * @author johnleach
 *
 */
public class SpliceDerbyRegionObserver extends BaseRegionObserver {
	private static Logger LOG = Logger.getLogger(SpliceDerbyRegionObserver.class);
	protected static NetworkServerControl server;
	public static String SPLICE_OBSERVER_INSTRUCTIONS = "SpliceServerInstructions";
	/**
	 * Logs the start of the observer.
	 */
	@Override
	public void start(CoprocessorEnvironment e) throws IOException {
		SpliceLogUtils.info(LOG, "Starting the coprocessor CoProcessor %s", SpliceDerbyRegionObserver.class);
		super.start(e);
		synchronized (this) {
			if (server == null) {
				try {
					server = new NetworkServerControl();
					server.start(new DerbyOutputLoggerWriter()); // This will log to log4j
					SpliceLogUtils.info(LOG, server.getSysinfo());
				} catch (Exception exception) {
					SpliceLogUtils.logAndThrow(LOG, "Could Not Start Derby - Catastrophic", new IOException(exception));
				}
			}
		}
	}
	/**
	 * Logs the stop of the observer.
	 */
	@Override
	public void stop(CoprocessorEnvironment e) throws IOException {
		SpliceLogUtils.info(LOG, "Stopping the CoProcessor %s",SpliceDerbyRegionObserver.class);
		super.stop(e);
		synchronized (this) {
			if (server != null) {
				try {
					server = null;
{'fraction_non_alphanumeric': 0.10116959064327485, 'fraction_numerical': 0.0011695906432748538, 'mean_word_length': 4.701666666666667, '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': '3407893', 'n_tokens_mistral': 1182, 'n_tokens_neox': 1047, 'n_words': 240}