@Override public RecordReader<Key,Value> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { log.setLevel(getLogLevel(job)); InputFormatBase.RecordReaderBase<Key,Value> recordReader = new InputFormatBase.RecordReaderBase<Key,Value>() {
@Override public int run(String[] args) throws Exception { if (args.length != 2) { throw new IllegalArgumentException( "Usage : " + MRTester.class.getName() + " <table1> <table2>"); } String user = getAdminPrincipal(); AuthenticationToken pass = getAdminToken(); String table1 = args[0]; String table2 = args[1]; JobConf job = new JobConf(getConf()); job.setJarByClass(this.getClass()); job.setInputFormat(AccumuloInputFormat.class); AccumuloMultiTableInputFormat.setConnectorInfo(job, user, pass); AccumuloMultiTableInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); InputTableConfig tableConfig1 = new InputTableConfig(); InputTableConfig tableConfig2 = new InputTableConfig(); Map<String,InputTableConfig> configMap = new HashMap<>(); configMap.put(table1, tableConfig1); configMap.put(table2, tableConfig2); AccumuloMultiTableInputFormat.setInputTableConfigs(job, configMap); job.setMapperClass(TestMapper.class); job.setMapOutputKeyClass(Key.class); job.setMapOutputValueClass(Value.class); job.setOutputFormat(NullOutputFormat.class); job.setNumReduceTasks(0); return JobClient.runJob(job).isSuccessful() ? 0 : 1; }
@Override public RecordReader<Key,Value> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { log.setLevel(getLogLevel(job)); RecordReaderBase<Key,Value> recordReader = new RecordReaderBase<Key,Value>() {
@Override public RecordReader<Key,Value> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { log.setLevel(getLogLevel(job)); RecordReaderBase<Key,Value> recordReader = new RecordReaderBase<Key,Value>() {