protected void setInputTableName(JobConf conf, String tableName) { AccumuloInputFormat.setInputTableName(conf, tableName); }
protected void setInputTableName(JobConf conf, String tableName) { AccumuloInputFormat.setInputTableName(conf, tableName); }
@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]; JobConf job = new JobConf(getConf()); job.setJarByClass(this.getClass()); ConfiguratorBase.setVisibilityCacheSize(job, JOB_VISIBILITY_CACHE_SIZE); job.setInputFormat(AccumuloInputFormat.class); AccumuloInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); AccumuloInputFormat.setConnectorInfo(job, getAdminPrincipal(), getAdminToken()); AccumuloInputFormat.setInputTableName(job, table); AccumuloFileOutputFormat.setOutputPath(job, new Path(args[1])); AccumuloFileOutputFormat.setSampler(job, SAMPLER_CONFIG); job.setMapperClass(BAD_TABLE.equals(table) ? BadKeyMapper.class : IdentityMapper.class); job.setMapOutputKeyClass(Key.class); job.setMapOutputValueClass(Value.class); job.setOutputFormat(AccumuloFileOutputFormat.class); job.setNumReduceTasks(0); return JobClient.runJob(job).isSuccessful() ? 0 : 1; }
@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; }
@Override public int run(String[] args) throws Exception { if (args.length != 1 && args.length != 3) { throw new IllegalArgumentException( "Usage : " + MRTester.class.getName() + " <table> [<batchScan> <scan sample>]"); } String table = args[0]; Boolean batchScan = false; boolean sample = false; if (args.length == 3) { batchScan = Boolean.parseBoolean(args[1]); sample = Boolean.parseBoolean(args[2]); } JobConf job = new JobConf(getConf()); job.setJarByClass(this.getClass()); job.setInputFormat(AccumuloInputFormat.class); AccumuloInputFormat.setConnectorInfo(job, getAdminPrincipal(), getAdminToken()); AccumuloInputFormat.setInputTableName(job, table); AccumuloInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); AccumuloInputFormat.setBatchScan(job, batchScan); if (sample) { AccumuloInputFormat.setSamplerConfiguration(job, SAMPLER_CONFIG); } 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 int run(String[] args) throws Exception { if (args.length != 3) { throw new IllegalArgumentException("Usage : " + MRTokenFileTester.class.getName() + " <token file> <inputtable> <outputtable>"); } String user = getAdminPrincipal(); String tokenFile = args[0]; String table1 = args[1]; String table2 = args[2]; JobConf job = new JobConf(getConf()); job.setJarByClass(this.getClass()); job.setInputFormat(AccumuloInputFormat.class); AccumuloInputFormat.setConnectorInfo(job, user, tokenFile); AccumuloInputFormat.setInputTableName(job, table1); AccumuloInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); job.setMapperClass(TestMapper.class); job.setMapOutputKeyClass(Key.class); job.setMapOutputValueClass(Value.class); job.setOutputFormat(AccumuloOutputFormat.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(Mutation.class); AccumuloOutputFormat.setConnectorInfo(job, user, tokenFile); AccumuloOutputFormat.setCreateTables(job, false); AccumuloOutputFormat.setDefaultTableName(job, table2); AccumuloOutputFormat.setZooKeeperInstance(job, getCluster().getClientConfig()); job.setNumReduceTasks(0); return JobClient.runJob(job).isSuccessful() ? 0 : 1; }
AccumuloInputFormat.setInputTableName(job, table1); AccumuloInputFormat.setZooKeeperInstance(job, clientConfig);
AccumuloInputFormat.setInputTableName(job, table); AccumuloInputFormat.setScanAuthorizations(job, auths); AccumuloInputFormat.setZooKeeperInstance(job, getCluster().getClientConfig());