/** * Program entry point. This method does not return; it calls System.exit() with the * return code from the called tool. * * @param args The command-line arguments, starting with the name of the tool to run. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(args)); } }
String[] nonToolNameArgs = Arrays.copyOfRange(args, 1, args.length); FijiTool tool = getToolForName(toolName); return run(tool, nonToolNameArgs);
FijiTool subTool = new FijiToolLauncher().getToolForName(toolName); if (null != subTool) { System.out.println(subTool.getName() + ": " + subTool.getDescription());
/** * Programmatic entry point to the tool launcher if a tool is already selected. * Hadoop property-based arguments will be parsed by FijiToolLauncher.run() * in a manner similar to Hadoop's ToolRunner. * * @param tool The FijiTool to run. * @param args The command-line arguments, excluding the name of the tool to run. * @throws Exception If there is an error. * @return 0 on program success, non-zero on error. */ public int run(FijiTool tool, String[] args) throws Exception { Configuration conf = getConf(); if (conf == null) { conf = new Configuration(); setConf(conf); } // Mimic behavior of Hadoop's ToolRunner.run(). GenericOptionsParser parser = new GenericOptionsParser(conf, args); conf = HBaseConfiguration.addHbaseResources(conf); tool.setConf(conf); // Get remaining arguments and invoke the tool with them. String[] toolArgs = parser.getRemainingArgs(); // Work around for CDH4 and Hadoop1 setting different "GenericOptionsParser used" flags. conf.setBooleanIfUnset("mapred.used.genericoptionsparser", true); conf.setBooleanIfUnset("mapreduce.client.genericoptionsparser.used", true); return tool.toolMain(Arrays.asList(toolArgs)); }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new ScanTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new LsTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new FijiLaunchMapReduce(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new LayoutTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new DeleteTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new VersionTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new FijiProduce(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new FijiGather(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new SynthesizeUserDataTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new UninstallTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new InstallTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new MetadataTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new GetTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new FijiJobHistory(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new IncrementTool(), args)); } }
/** * Program entry point. * * @param args The command-line arguments. * @throws Exception If there is an error. */ public static void main(String[] args) throws Exception { System.exit(new FijiToolLauncher().run(new PutTool(), args)); } }