use of uk.gov.gchq.gaffer.accumulostore.operation.hdfs.handler.job.factory.AccumuloAddElementsFromHdfsJobFactory in project Gaffer by gchq.
the class FetchElementsFromHdfsTool method run.
@Override
public int run(final String[] strings) throws Exception {
checkHdfsDirectories(operation);
LOGGER.info("Ensuring table {} exists", store.getProperties().getTable());
TableUtils.ensureTableExists(store);
LOGGER.info("Adding elements from HDFS");
final Job job = new AccumuloAddElementsFromHdfsJobFactory().createJob(operation, store);
job.waitForCompletion(true);
if (!job.isSuccessful()) {
LOGGER.error("Error running job");
throw new OperationException("Error running job");
}
LOGGER.info("Finished adding elements from HDFS");
return SUCCESS_RESPONSE;
}
Aggregations