@Override public RecordReader<Text,PeekingIterator<Entry<Key,Value>>> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { log.setLevel(getLogLevel(job));
@Nonnull Authorizations auth ) throws IOException, AccumuloSecurityException { AccumuloRowInputFormat format = new AccumuloRowInputFormat(); JobConf conf = new JobConf(); AccumuloRowInputFormat.setInputTableName(conf, tableName); AccumuloRowInputFormat.setConnectorInfo(conf, user, new PasswordToken(password)); AccumuloRowInputFormat.setZooKeeperInstance(conf, ClientConfiguration.create() .withInstance(instance) .withZkHosts(zkHosts)); AccumuloRowInputFormat.setScanAuthorizations(conf, auth); if (predicate != null && predicate.getQueryRanges() != null) { AccumuloRowInputFormat.setRanges(conf, predicate.getQueryRanges()); InputSplit[] splits = format.getSplits(conf, maxSplit); return Stream.of(splits) .map(it -> (RangeInputSplit) it)
InputSplit[] splits = accumuloInputFormat.getSplits(jobConf, numSplits);
.getRecordReader(rangeSplit, jobConf, reporter);
@Override public int run(String[] args) throws Exception { if (args.length != 1) { throw new IllegalArgumentException("Usage : " + MRTester.class.getName() + " <table>"); } String user = getAdminPrincipal(); AuthenticationToken pass = getAdminToken(); String table = args[0]; JobConf job = new JobConf(getConf()); job.setJarByClass(this.getClass()); job.setInputFormat(AccumuloRowInputFormat.class); AccumuloInputFormat.setConnectorInfo(job, user, pass); AccumuloInputFormat.setInputTableName(job, table); AccumuloRowInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); 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; }
InputSplit[] splits = accumuloInputFormat.getSplits(jobConf, numSplits);
.getRecordReader(rangeSplit, jobConf, reporter);
@Override public RecordReader<Text,PeekingIterator<Entry<Key,Value>>> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { log.setLevel(getLogLevel(job));
@Override public RecordReader<Text,PeekingIterator<Entry<Key,Value>>> getRecordReader(InputSplit split, JobConf job, Reporter reporter) throws IOException { log.setLevel(getLogLevel(job));