@Test public void testCsvBlurDriverTest3() throws Exception { Configuration configurationSetup = new Configuration(); ControllerPool controllerPool = new CsvBlurDriver.ControllerPool() { @Override public Iface getClient(String controllerConnectionStr) { return getMockIface(); } }; AtomicReference<Callable<Void>> ref = new AtomicReference<Callable<Void>>(); Job job = CsvBlurDriver.setupJob(configurationSetup, controllerPool, ref, "-c", "host:40010", "-d", "family1", "col1", "col2", "-d", "family2", "col3", "col4", "-t", "table1", "-i", _path1.toString(), "-i", _path2.toString(), "-S", "-C", "1000000", "2000000", "-p", "SNAPPY"); assertNotNull(job); Configuration configuration = job.getConfiguration(); TableDescriptor tableDescriptor = BlurOutputFormat.getTableDescriptor(configuration); assertEquals(tableDescriptor.getName(), "table1"); Collection<String> inputs = configuration.getStringCollection("mapred.input.dir"); assertEquals(2, inputs.size()); Map<String, List<String>> familyAndColumnNameMap = CsvBlurMapper.getFamilyAndColumnNameMap(configuration); assertEquals(2, familyAndColumnNameMap.size()); assertEquals("true", configuration.get(CsvBlurDriver.MAPRED_COMPRESS_MAP_OUTPUT)); assertEquals(SnappyCodec.class.getName(), configuration.get(CsvBlurDriver.MAPRED_MAP_OUTPUT_COMPRESSION_CODEC)); }
public static Job setupJob(Configuration configuration, ControllerPool controllerPool, AtomicReference<Callable<Void>> ref, String... otherArgs) throws Exception { CommandLine cmd = parse(otherArgs); if (cmd == null) { return null; } final String controllerConnectionStr = cmd.getOptionValue("c"); final String tableName = cmd.getOptionValue("t"); final Iface client = controllerPool.getClient(controllerConnectionStr); TableDescriptor tableDescriptor = client.describe(tableName); Job job = Job.getInstance(configuration, "Blur indexer [" + tableName + "]"); job.setJarByClass(CsvBlurDriver.class); job.setMapperClass(CsvBlurMapper.class); if (cmd.hasOption("p")) { job.getConfiguration().set(MAPRED_COMPRESS_MAP_OUTPUT, "true"); String codecStr = cmd.getOptionValue("p"); COMPRESSION compression; try { compression = COMPRESSION.valueOf(codecStr.trim().toUpperCase()); } catch (IllegalArgumentException e) { compression = null; } if (compression == null) { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, codecStr.trim()); } else { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, compression.getClassName()); } } if (cmd.hasOption("a")) { CsvBlurMapper.setAutoGenerateRecordIdAsHashOfData(job, true); } if (cmd.hasOption("A")) { CsvBlurMapper.setAutoGenerateRowIdAsHashOfData(job, true); } if (cmd.hasOption("S")) { job.setInputFormatClass(SequenceFileInputFormat.class); } else { job.setInputFormatClass(TextInputFormat.class); } if (cmd.hasOption("C")) { if (cmd.hasOption("S")) { String[] optionValues = cmd.getOptionValues("C"); job.setInputFormatClass(CsvBlurCombineSequenceFileInputFormat.class); CombineFileInputFormat.setMinInputSplitSize(job, Long.parseLong(optionValues[0])); CombineFileInputFormat.setMaxInputSplitSize(job, Long.parseLong(optionValues[1])); } else { System.err.println("'C' can only be used with option 'S'"); return null; } } if (cmd.hasOption("i")) { for (String input : cmd.getOptionValues("i")) { Path path = new Path(input); Set<Path> pathSet = recurisvelyGetPathesContainingFiles(path, job.getConfiguration()); if (pathSet.isEmpty()) { FileInputFormat.addInputPath(job, path); } else { for (Path p : pathSet) { FileInputFormat.addInputPath(job, p); } } } } if (cmd.hasOption("I")) { if (cmd.hasOption("C")) { System.err.println("'I' and 'C' both parameters can not be used together."); return null; } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("I")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'I' parameter missing minimum args of (family path*)"); return null; } for (String p : getSubArray(values, 1)) { Path path = new Path(p); CsvBlurMapper.addFamilyPath(job, values[0], path); FileInputFormat.addInputPath(job, path); } } } } if (cmd.hasOption("s")) { CsvBlurMapper.setSeparator(job, StringEscapeUtils.unescapeJava(cmd.getOptionValue("s"))); } if (cmd.hasOption("o")) { BlurOutputFormat.setOptimizeInFlight(job, false); } if (cmd.hasOption("l")) { BlurOutputFormat.setIndexLocally(job, false); } if (cmd.hasOption("b")) { int maxDocumentBufferSize = Integer.parseInt(cmd.getOptionValue("b")); BlurOutputFormat.setMaxDocumentBufferSize(job, maxDocumentBufferSize); } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("d")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'d' parameter missing minimum args of (family columname*)"); return null; } CsvBlurMapper.addColumns(job, values[0], getSubArray(values, 1)); } } BlurOutputFormat.setupJob(job, tableDescriptor); BlurMapReduceUtil.addDependencyJars(job.getConfiguration(), Splitter.class); if (cmd.hasOption("r")) { int reducerMultiplier = Integer.parseInt(cmd.getOptionValue("r")); BlurOutputFormat.setReducerMultiplier(job, reducerMultiplier); } final Path output; if (cmd.hasOption("out")) { output = new Path(cmd.getOptionValue("out")); } else { UserGroupInformation currentUser = UserGroupInformation.getCurrentUser(); String userName = currentUser.getUserName(); output = new Path("/user/" + userName + "/.blur-" + System.currentTimeMillis()); } BlurOutputFormat.setOutputPath(job, output); if (cmd.hasOption("import")) { ref.set(new Callable<Void>() { @Override public Void call() throws Exception { client.loadData(tableName, output.toUri().toString()); return null; } }); } return job; }
CsvBlurDriver { public static Job setupJob(Configuration configuration, ControllerPool controllerPool, AtomicReference<Callable<Void>> ref, String... otherArgs) throws Exception { CommandLine cmd = parse(otherArgs); if (cmd == null) { return null; } final String controllerConnectionStr = cmd.getOptionValue("c"); final String tableName = cmd.getOptionValue("t"); final Iface client = controllerPool.getClient(controllerConnectionStr); TableDescriptor tableDescriptor = client.describe(tableName); Job job = Job.getInstance(configuration, "Blur indexer [" + tableName + "]"); job.setJarByClass(CsvBlurDriver.class); job.setMapperClass(CsvBlurMapper.class); if (cmd.hasOption("p")) { job.getConfiguration().set(MAPRED_COMPRESS_MAP_OUTPUT, "true"); String codecStr = cmd.getOptionValue("p"); COMPRESSION compression; try { compression = COMPRESSION.valueOf(codecStr.trim().toUpperCase()); } catch (IllegalArgumentException e) { compression = null; } if (compression == null) { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, codecStr.trim()); } else { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, compression.getClassName()); } } if (cmd.hasOption("a")) { CsvBlurMapper.setAutoGenerateRecordIdAsHashOfData(job, true); } if (cmd.hasOption("A")) { CsvBlurMapper.setAutoGenerateRowIdAsHashOfData(job, true); } if (cmd.hasOption("S")) { job.setInputFormatClass(SequenceFileInputFormat.class); } else { job.setInputFormatClass(TextInputFormat.class); } if (cmd.hasOption("C")) { if (cmd.hasOption("S")) { String[] optionValues = cmd.getOptionValues("C"); job.setInputFormatClass(CsvBlurCombineSequenceFileInputFormat.class); CombineFileInputFormat.setMinInputSplitSize(job, Long.parseLong(optionValues[0])); CombineFileInputFormat.setMaxInputSplitSize(job, Long.parseLong(optionValues[1])); } else { System.err.println("'C' can only be used with option 'S'"); return null; } } if (cmd.hasOption("i")) { for (String input : cmd.getOptionValues("i")) { Path path = new Path(input); Set<Path> pathSet = recurisvelyGetPathesContainingFiles(path, job.getConfiguration()); if (pathSet.isEmpty()) { FileInputFormat.addInputPath(job, path); } else { for (Path p : pathSet) { FileInputFormat.addInputPath(job, p); } } } } if (cmd.hasOption("I")) { if (cmd.hasOption("C")) { System.err.println("'I' and 'C' both parameters can not be used together."); return null; } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("I")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'I' parameter missing minimum args of (family path*)"); return null; } for (String p : getSubArray(values, 1)) { Path path = new Path(p); CsvBlurMapper.addFamilyPath(job, values[0], path); FileInputFormat.addInputPath(job, path); } } } } if (cmd.hasOption("s")) { CsvBlurMapper.setSeparator(job, StringEscapeUtils.unescapeJava(cmd.getOptionValue("s"))); } if (cmd.hasOption("o")) { BlurOutputFormat.setOptimizeInFlight(job, false); } if (cmd.hasOption("l")) { BlurOutputFormat.setIndexLocally(job, false); } if (cmd.hasOption("b")) { int maxDocumentBufferSize = Integer.parseInt(cmd.getOptionValue("b")); BlurOutputFormat.setMaxDocumentBufferSize(job, maxDocumentBufferSize); } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("d")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'d' parameter missing minimum args of (family columname*)"); return null; } CsvBlurMapper.addColumns(job, values[0], getSubArray(values, 1)); } } BlurOutputFormat.setupJob(job, tableDescriptor); BlurMapReduceUtil.addDependencyJars(job.getConfiguration(), Splitter.class); if (cmd.hasOption("r")) { int reducerMultiplier = Integer.parseInt(cmd.getOptionValue("r")); BlurOutputFormat.setReducerMultiplier(job, reducerMultiplier); } final Path output; if (cmd.hasOption("out")) { output = new Path(cmd.getOptionValue("out")); } else { UserGroupInformation currentUser = UserGroupInformation.getCurrentUser(); String userName = currentUser.getUserName(); output = new Path("/user/" + userName + "/.blur-" + System.currentTimeMillis()); } BlurOutputFormat.setOutputPath(job, output); if (cmd.hasOption("import")) { ref.set(new Callable<Void>() { @Override public Void call() throws Exception { client.loadData(tableName, output.toUri().toString()); return null; } }); } return job; } }
CsvBlurDriver { public static Job setupJob(Configuration configuration, ControllerPool controllerPool, AtomicReference<Callable<Void>> ref, String... otherArgs) throws Exception { CommandLine cmd = parse(otherArgs); if (cmd == null) { return null; } final String controllerConnectionStr = cmd.getOptionValue("c"); final String tableName = cmd.getOptionValue("t"); final Iface client = controllerPool.getClient(controllerConnectionStr); TableDescriptor tableDescriptor = client.describe(tableName); Job job = Job.getInstance(configuration, "Blur indexer [" + tableName + "]"); job.setJarByClass(CsvBlurDriver.class); job.setMapperClass(CsvBlurMapper.class); if (cmd.hasOption("p")) { job.getConfiguration().set(MAPRED_COMPRESS_MAP_OUTPUT, "true"); String codecStr = cmd.getOptionValue("p"); COMPRESSION compression; try { compression = COMPRESSION.valueOf(codecStr.trim().toUpperCase()); } catch (IllegalArgumentException e) { compression = null; } if (compression == null) { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, codecStr.trim()); } else { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, compression.getClassName()); } } if (cmd.hasOption("a")) { CsvBlurMapper.setAutoGenerateRecordIdAsHashOfData(job, true); } if (cmd.hasOption("A")) { CsvBlurMapper.setAutoGenerateRowIdAsHashOfData(job, true); } if (cmd.hasOption("S")) { job.setInputFormatClass(SequenceFileInputFormat.class); } else { job.setInputFormatClass(TextInputFormat.class); } if (cmd.hasOption("C")) { if (cmd.hasOption("S")) { String[] optionValues = cmd.getOptionValues("C"); job.setInputFormatClass(CsvBlurCombineSequenceFileInputFormat.class); CombineFileInputFormat.setMinInputSplitSize(job, Long.parseLong(optionValues[0])); CombineFileInputFormat.setMaxInputSplitSize(job, Long.parseLong(optionValues[1])); } else { System.err.println("'C' can only be used with option 'S'"); return null; } } if (cmd.hasOption("i")) { for (String input : cmd.getOptionValues("i")) { Path path = new Path(input); Set<Path> pathSet = recurisvelyGetPathesContainingFiles(path, job.getConfiguration()); if (pathSet.isEmpty()) { FileInputFormat.addInputPath(job, path); } else { for (Path p : pathSet) { FileInputFormat.addInputPath(job, p); } } } } if (cmd.hasOption("I")) { if (cmd.hasOption("C")) { System.err.println("'I' and 'C' both parameters can not be used together."); return null; } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("I")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'I' parameter missing minimum args of (family path*)"); return null; } for (String p : getSubArray(values, 1)) { Path path = new Path(p); CsvBlurMapper.addFamilyPath(job, values[0], path); FileInputFormat.addInputPath(job, path); } } } } if (cmd.hasOption("s")) { CsvBlurMapper.setSeparator(job, StringEscapeUtils.unescapeJava(cmd.getOptionValue("s"))); } if (cmd.hasOption("o")) { BlurOutputFormat.setOptimizeInFlight(job, false); } if (cmd.hasOption("l")) { BlurOutputFormat.setIndexLocally(job, false); } if (cmd.hasOption("b")) { int maxDocumentBufferSize = Integer.parseInt(cmd.getOptionValue("b")); BlurOutputFormat.setMaxDocumentBufferSize(job, maxDocumentBufferSize); } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("d")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'d' parameter missing minimum args of (family columname*)"); return null; } CsvBlurMapper.addColumns(job, values[0], getSubArray(values, 1)); } } BlurOutputFormat.setupJob(job, tableDescriptor); BlurMapReduceUtil.addDependencyJars(job.getConfiguration(), Splitter.class); if (cmd.hasOption("r")) { int reducerMultiplier = Integer.parseInt(cmd.getOptionValue("r")); BlurOutputFormat.setReducerMultiplier(job, reducerMultiplier); } final Path output; if (cmd.hasOption("out")) { output = new Path(cmd.getOptionValue("out")); } else { UserGroupInformation currentUser = UserGroupInformation.getCurrentUser(); String userName = currentUser.getUserName(); output = new Path("/user/" + userName + "/.blur-" + System.currentTimeMillis()); } BlurOutputFormat.setOutputPath(job, output); if (cmd.hasOption("import")) { ref.set(new Callable<Void>() { @Override public Void call() throws Exception { client.loadData(tableName, output.toUri().toString()); return null; } }); } return job; }  }
CsvBlurDriver { public static Job setupJob(Configuration configuration, ControllerPool controllerPool, AtomicReference<Callable<Void>> ref, String... otherArgs) throws Exception { CommandLine cmd = parse(otherArgs); if (cmd == null) { return null; } final String controllerConnectionStr = cmd.getOptionValue("c"); final String tableName = cmd.getOptionValue("t"); final Iface client = controllerPool.getClient(controllerConnectionStr); TableDescriptor tableDescriptor = client.describe(tableName); Job job = Job.getInstance(configuration, "Blur indexer [" + tableName + "]"); job.setJarByClass(CsvBlurDriver.class); job.setMapperClass(CsvBlurMapper.class); if (cmd.hasOption("p")) { job.getConfiguration().set(MAPRED_COMPRESS_MAP_OUTPUT, "true"); String codecStr = cmd.getOptionValue("p"); COMPRESSION compression; try { compression = COMPRESSION.valueOf(codecStr.trim().toUpperCase()); } catch (IllegalArgumentException e) { compression = null; } if (compression == null) { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, codecStr.trim()); } else { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, compression.getClassName()); } } if (cmd.hasOption("a")) { CsvBlurMapper.setAutoGenerateRecordIdAsHashOfData(job, true); } if (cmd.hasOption("A")) { CsvBlurMapper.setAutoGenerateRowIdAsHashOfData(job, true); } if (cmd.hasOption("S")) { job.setInputFormatClass(SequenceFileInputFormat.class); } else { job.setInputFormatClass(TextInputFormat.class); } if (cmd.hasOption("C")) { if (cmd.hasOption("S")) { String[] optionValues = cmd.getOptionValues("C"); job.setInputFormatClass(CsvBlurCombineSequenceFileInputFormat.class); CombineFileInputFormat.setMinInputSplitSize(job, Long.parseLong(optionValues[0])); CombineFileInputFormat.setMaxInputSplitSize(job, Long.parseLong(optionValues[1])); } else { System.err.println("'C' can only be used with option 'S'"); return null; } } if (cmd.hasOption("i")) { for (String input : cmd.getOptionValues("i")) { Path path = new Path(input); Set<Path> pathSet = recurisvelyGetPathesContainingFiles(path, job.getConfiguration()); if (pathSet.isEmpty()) { FileInputFormat.addInputPath(job, path); } else { for (Path p : pathSet) { FileInputFormat.addInputPath(job, p); } } } } if (cmd.hasOption("I")) { if (cmd.hasOption("C")) { System.err.println("'I' and 'C' both parameters can not be used together."); return null; } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("I")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'I' parameter missing minimum args of (family path*)"); return null; } for (String p : getSubArray(values, 1)) { Path path = new Path(p); CsvBlurMapper.addFamilyPath(job, values[0], path); FileInputFormat.addInputPath(job, path); } } } } if (cmd.hasOption("s")) { CsvBlurMapper.setSeparator(job, StringEscapeUtils.unescapeJava(cmd.getOptionValue("s"))); } if (cmd.hasOption("o")) { BlurOutputFormat.setOptimizeInFlight(job, false); } if (cmd.hasOption("l")) { BlurOutputFormat.setIndexLocally(job, false); } if (cmd.hasOption("b")) { int maxDocumentBufferSize = Integer.parseInt(cmd.getOptionValue("b")); BlurOutputFormat.setMaxDocumentBufferSize(job, maxDocumentBufferSize); } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("d")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'d' parameter missing minimum args of (family columname*)"); return null; } CsvBlurMapper.addColumns(job, values[0], getSubArray(values, 1)); } } BlurOutputFormat.setupJob(job, tableDescriptor); BlurMapReduceUtil.addDependencyJars(job.getConfiguration(), Splitter.class); if (cmd.hasOption("r")) { int reducerMultiplier = Integer.parseInt(cmd.getOptionValue("r")); BlurOutputFormat.setReducerMultiplier(job, reducerMultiplier); } final Path output; if (cmd.hasOption("out")) { output = new Path(cmd.getOptionValue("out")); } else { UserGroupInformation currentUser = UserGroupInformation.getCurrentUser(); String userName = currentUser.getUserName(); output = new Path("/user/" + userName + "/.blur-" + System.currentTimeMillis()); } BlurOutputFormat.setOutputPath(job, output); if (cmd.hasOption("import")) { ref.set(new Callable<Void>() { @Override public Void call() throws Exception { client.loadData(tableName, output.toUri().toString()); return null; } }); } return job; }  static void main(String... args); static Job setupJob(Configuration configuration, ControllerPool controllerPool,
      AtomicReference<Callable<Void>> ref, String... otherArgs); }
CsvBlurDriver { public static Job setupJob(Configuration configuration, ControllerPool controllerPool, AtomicReference<Callable<Void>> ref, String... otherArgs) throws Exception { CommandLine cmd = parse(otherArgs); if (cmd == null) { return null; } final String controllerConnectionStr = cmd.getOptionValue("c"); final String tableName = cmd.getOptionValue("t"); final Iface client = controllerPool.getClient(controllerConnectionStr); TableDescriptor tableDescriptor = client.describe(tableName); Job job = Job.getInstance(configuration, "Blur indexer [" + tableName + "]"); job.setJarByClass(CsvBlurDriver.class); job.setMapperClass(CsvBlurMapper.class); if (cmd.hasOption("p")) { job.getConfiguration().set(MAPRED_COMPRESS_MAP_OUTPUT, "true"); String codecStr = cmd.getOptionValue("p"); COMPRESSION compression; try { compression = COMPRESSION.valueOf(codecStr.trim().toUpperCase()); } catch (IllegalArgumentException e) { compression = null; } if (compression == null) { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, codecStr.trim()); } else { job.getConfiguration().set(MAPRED_MAP_OUTPUT_COMPRESSION_CODEC, compression.getClassName()); } } if (cmd.hasOption("a")) { CsvBlurMapper.setAutoGenerateRecordIdAsHashOfData(job, true); } if (cmd.hasOption("A")) { CsvBlurMapper.setAutoGenerateRowIdAsHashOfData(job, true); } if (cmd.hasOption("S")) { job.setInputFormatClass(SequenceFileInputFormat.class); } else { job.setInputFormatClass(TextInputFormat.class); } if (cmd.hasOption("C")) { if (cmd.hasOption("S")) { String[] optionValues = cmd.getOptionValues("C"); job.setInputFormatClass(CsvBlurCombineSequenceFileInputFormat.class); CombineFileInputFormat.setMinInputSplitSize(job, Long.parseLong(optionValues[0])); CombineFileInputFormat.setMaxInputSplitSize(job, Long.parseLong(optionValues[1])); } else { System.err.println("'C' can only be used with option 'S'"); return null; } } if (cmd.hasOption("i")) { for (String input : cmd.getOptionValues("i")) { Path path = new Path(input); Set<Path> pathSet = recurisvelyGetPathesContainingFiles(path, job.getConfiguration()); if (pathSet.isEmpty()) { FileInputFormat.addInputPath(job, path); } else { for (Path p : pathSet) { FileInputFormat.addInputPath(job, p); } } } } if (cmd.hasOption("I")) { if (cmd.hasOption("C")) { System.err.println("'I' and 'C' both parameters can not be used together."); return null; } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("I")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'I' parameter missing minimum args of (family path*)"); return null; } for (String p : getSubArray(values, 1)) { Path path = new Path(p); CsvBlurMapper.addFamilyPath(job, values[0], path); FileInputFormat.addInputPath(job, path); } } } } if (cmd.hasOption("s")) { CsvBlurMapper.setSeparator(job, StringEscapeUtils.unescapeJava(cmd.getOptionValue("s"))); } if (cmd.hasOption("o")) { BlurOutputFormat.setOptimizeInFlight(job, false); } if (cmd.hasOption("l")) { BlurOutputFormat.setIndexLocally(job, false); } if (cmd.hasOption("b")) { int maxDocumentBufferSize = Integer.parseInt(cmd.getOptionValue("b")); BlurOutputFormat.setMaxDocumentBufferSize(job, maxDocumentBufferSize); } Option[] options = cmd.getOptions(); for (Option option : options) { if (option.getOpt().equals("d")) { String[] values = option.getValues(); if (values.length < 2) { System.err.println("'d' parameter missing minimum args of (family columname*)"); return null; } CsvBlurMapper.addColumns(job, values[0], getSubArray(values, 1)); } } BlurOutputFormat.setupJob(job, tableDescriptor); BlurMapReduceUtil.addDependencyJars(job.getConfiguration(), Splitter.class); if (cmd.hasOption("r")) { int reducerMultiplier = Integer.parseInt(cmd.getOptionValue("r")); BlurOutputFormat.setReducerMultiplier(job, reducerMultiplier); } final Path output; if (cmd.hasOption("out")) { output = new Path(cmd.getOptionValue("out")); } else { UserGroupInformation currentUser = UserGroupInformation.getCurrentUser(); String userName = currentUser.getUserName(); output = new Path("/user/" + userName + "/.blur-" + System.currentTimeMillis()); } BlurOutputFormat.setOutputPath(job, output); if (cmd.hasOption("import")) { ref.set(new Callable<Void>() { @Override public Void call() throws Exception { client.loadData(tableName, output.toUri().toString()); return null; } }); } return job; }  static void main(String... args); static Job setupJob(Configuration configuration, ControllerPool controllerPool,
      AtomicReference<Callable<Void>> ref, String... otherArgs); static final String CSVLOADER; static final String MAPRED_COMPRESS_MAP_OUTPUT; static final String MAPRED_MAP_OUTPUT_COMPRESSION_CODEC; static final int DEFAULT_WIDTH; static final String HEADER; }