}
@Override
public int run(String[] args) throws IOException, InterruptedException, ClassNotFoundException, AccumuloSecurityException {
Opts opts = new Opts();
BatchWriterOpts bwOpts = new BatchWriterOpts();
opts.parseArgs(ContinuousMoru.class.getName(), args, bwOpts);
@SuppressWarnings("deprecation")
Job job = new Job(getConf(), this.getClass().getSimpleName() + "_" + System.currentTimeMillis());
job.setJarByClass(this.getClass());
job.setInputFormatClass(AccumuloInputFormat.class);
opts.setAccumuloConfigs(job);
// set up ranges
try {
Set<Range> ranges = opts.getConnector().tableOperations().splitRangeByTablets(opts.getTableName(), new Range(), opts.maxMaps);
AccumuloInputFormat.setRanges(job, ranges);
AccumuloInputFormat.setAutoAdjustRanges(job, false);
} catch (Exception e) {
throw new IOException(e);
}
job.setMapperClass(CMapper.class);
job.setNumReduceTasks(0);
job.setOutputFormatClass(AccumuloOutputFormat.class);
AccumuloOutputFormat.setBatchWriterOptions(job, bwOpts.getBatchWriterConfig());
Configuration conf = job.getConfiguration();
conf.setLong(MIN, opts.min);
conf.setLong(MAX, opts.max);
conf.setInt(MAX_CF, opts.maxColF);