Hi! I suppose that you can run the LogAnalytics from other places with mandatory arguments, but if you run it from Main it is mandatory to put 1 argument. I don't find it inherently wrong if you don't consider the only execution being from main.
I actually don't use it, so I don't know wether the default values in the else make sense or not. By the way, I believe that it is forced to 1 argument in the main to be shown the help in some way... (and not having to use a command "help"). Regards, Alfonso Nishikawa 2015-08-21 13:46 GMT-01:00 Furkan KAMACI <[email protected]>: > There is a piece of code at LogAnalytics: > > public static void main(String[] args) throws Exception { > if(args.length < 2) { > System.err.println(USAGE); > System.exit(1); > } > > //run as any other MR job > int ret = ToolRunner.run(new LogAnalytics(), args); > System.exit(ret); > > } > > However at run method it says that: > > if(args.length > 0) { > > String dataStoreClass = args[0]; > inStore = DataStoreFactory. > getDataStore(dataStoreClass, Long.class, Pageview.class, conf); > if(args.length > 1) { > dataStoreClass = args[1]; > } > outStore = DataStoreFactory. > getDataStore(dataStoreClass, String.class, MetricDatum.class, conf); > } else { > inStore = DataStoreFactory.getDataStore(Long.class, Pageview.class, conf); > outStore = DataStoreFactory.getDataStore(String.class, > MetricDatum.class, conf); > } > > So, when you check *run* method after *main*, args do not need to be > greater or equal to 2? > > I can commit a patch for it? > > Kind Regards, > > Furkan KAMACI >

