@Override public int run(String[] args) throws Exception { if (args.length != 2) { throw new IllegalArgumentException( "Usage : " + MRTester.class.getName() + " <table> <outputfile>"); } String table = args[0]; assertionErrors.put(table + "_map", new AssertionError("Dummy_map")); assertionErrors.put(table + "_cleanup", new AssertionError("Dummy_cleanup")); Job job = Job.getInstance(getConf(), this.getClass().getSimpleName() + "_" + System.currentTimeMillis()); job.setJarByClass(this.getClass()); job.setInputFormatClass(AccumuloInputFormat.class); AccumuloInputFormat.setConnectorInfo(job, getAdminPrincipal(), getAdminToken()); AccumuloInputFormat.setInputTableName(job, table); AccumuloInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); AccumuloFileOutputFormat.setOutputPath(job, new Path(args[1])); AccumuloFileOutputFormat.setSampler(job, SAMPLER_CONFIG); job.setMapperClass( table.endsWith("_mapreduce_bad_table") ? BadKeyMapper.class : Mapper.class); job.setMapOutputKeyClass(Key.class); job.setMapOutputValueClass(Value.class); job.setOutputFormatClass(AccumuloFileOutputFormat.class); job.getConfiguration().set("MRTester_tableName", table); job.setNumReduceTasks(0); job.waitForCompletion(true); return job.isSuccessful() ? 0 : 1; }