Skip to content
Snippets Groups Projects
Commit 531d6bd6 authored by Sean Busbey's avatar Sean Busbey
Browse files

[accumulo] correct cleanup to only happen once per jvm.

closes #340
parent 0b08f216
No related branches found
No related tags found
No related merge requests found
......@@ -63,6 +63,16 @@ public class AccumuloClient extends DB {
private Scanner singleScanner = null; // A scanner for reads/deletes.
private Scanner scanScanner = null; // A scanner for use by scan()
static {
Runtime.getRuntime().addShutdownHook(new Thread() {
@Override
public void run() {
CleanUp.shutdownNow();
}
});
}
@Override
public void init() throws DBException {
colFam = new Text(getProperties().getProperty("accumulo.columnFamily"));
......@@ -96,7 +106,6 @@ public class AccumuloClient extends DB {
} catch (MutationsRejectedException e) {
throw new DBException(e);
}
CleanUp.shutdownNow();
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment