@Test public void testBadArgs() throws Exception { try { FeedEvictor.main(null); Assert.fail("Expected an exception to be thrown"); } catch (Exception ignore) { } try { FeedEvictor.main(new String[] {"1","2"}); Assert.fail("Expected an exception to be thrown"); } catch (Exception ignore) { } }
public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Path confPath = new Path("file: LOG.info(confPath + " found ? " + confPath.getFileSystem(conf).exists(confPath)); conf.addResource(confPath); int ret = ToolRunner.run(conf, new FeedEvictor(), args); if (ret != 0) { throw new Exception("Unable to perform eviction action args: " + Arrays.toString(args)); } }
FeedEvictor extends Configured implements Tool { public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Path confPath = new Path("file: LOG.info(confPath + " found ? " + confPath.getFileSystem(conf).exists(confPath)); conf.addResource(confPath); int ret = ToolRunner.run(conf, new FeedEvictor(), args); if (ret != 0) { throw new Exception("Unable to perform eviction action args: " + Arrays.toString(args)); } } }
FeedEvictor extends Configured implements Tool { public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Path confPath = new Path("file: LOG.info(confPath + " found ? " + confPath.getFileSystem(conf).exists(confPath)); conf.addResource(confPath); int ret = ToolRunner.run(conf, new FeedEvictor(), args); if (ret != 0) { throw new Exception("Unable to perform eviction action args: " + Arrays.toString(args)); } }  }
FeedEvictor extends Configured implements Tool { public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Path confPath = new Path("file: LOG.info(confPath + " found ? " + confPath.getFileSystem(conf).exists(confPath)); conf.addResource(confPath); int ret = ToolRunner.run(conf, new FeedEvictor(), args); if (ret != 0) { throw new Exception("Unable to perform eviction action args: " + Arrays.toString(args)); } }  static void main(String[] args); @Override int run(String[] args); }
FeedEvictor extends Configured implements Tool { public static void main(String[] args) throws Exception { Configuration conf = new Configuration(); Path confPath = new Path("file: LOG.info(confPath + " found ? " + confPath.getFileSystem(conf).exists(confPath)); conf.addResource(confPath); int ret = ToolRunner.run(conf, new FeedEvictor(), args); if (ret != 0) { throw new Exception("Unable to perform eviction action args: " + Arrays.toString(args)); } }  static void main(String[] args); @Override int run(String[] args);  }