final Path file = this.getDefaultWorkFile(context, "." + extension); final int visCacheSize = FileOutputConfigurator.getVisibilityCacheSize(conf);
@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; }
@Override public int run(String[] args) throws Exception { Job job = Job.getInstance(getConf(), this.getClass().getSimpleName()); job.setJarByClass(this.getClass()); if (job.getJar() == null) { log.error("M/R requires a jar file! Run mvn package."); return 1; } job.setInputFormatClass(SequenceFileInputFormat.class); SequenceFileInputFormat.setInputPaths(job, seqFile); job.setPartitionerClass(KeyRangePartitioner.class); KeyRangePartitioner.setSplitFile(job, splitFile); job.setMapOutputKeyClass(Key.class); job.setMapOutputValueClass(Value.class); job.setNumReduceTasks(splits.size() + 1); job.setOutputFormatClass(AccumuloFileOutputFormat.class); AccumuloFileOutputFormat.setOutputPath(job, new Path(outputDir)); job.waitForCompletion(true); return job.isSuccessful() ? 0 : 1; } }
if (isValidCompressionType(compressionType)) { log.info("File compression type: " + compressionType); AccumuloFileOutputFormat.setCompressionType(job, compressionType); } else { log.warn("Invalid compression type: " + compressionType);
AccumuloFileOutputFormat.setOutputPath(job, new Path(workDir + "/files"));
final Path file = this.getDefaultWorkFile(context, "." + extension); final int visCacheSize = ConfiguratorBase.getVisibilityCacheSize(conf);
final Path file = this.getDefaultWorkFile(context, "." + extension); final int visCacheSize = ConfiguratorBase.getVisibilityCacheSize(conf);