use of uk.gov.gchq.gaffer.accumulostore.operation.hdfs.handler.job.factory.AccumuloSampleDataForSplitPointsJobFactory in project Gaffer by gchq.
the class SampleDataForSplitPointsHandler method generateSplitsFromSampleData.
private void generateSplitsFromSampleData(final SampleDataForSplitPoints operation, final AccumuloStore store) throws OperationException {
try {
if (store.getTabletServers().size() < 2) {
LOGGER.warn("There is only 1 tablet server so no split points will be calculated.");
return;
}
} catch (final StoreException e) {
throw new OperationException(e.getMessage(), e);
}
try {
/* Parse any Hadoop arguments passed on the command line and use these to configure the Tool */
final Configuration configuration = new GenericOptionsParser(operation.getCommandLineArgs()).getConfiguration();
final SampleDataAndCreateSplitsFileTool sampleTool = new SampleDataAndCreateSplitsFileTool(new AccumuloSampleDataForSplitPointsJobFactory(configuration), operation, store);
ToolRunner.run(sampleTool, operation.getCommandLineArgs());
} catch (final Exception e) {
throw new OperationException(e.getMessage(), e);
}
LOGGER.info("Finished calculating splits");
}
Aggregations