@Test @SuppressWarnings("deprecation") public void shouldPrintUsage() throws Exception { String expectedOutput = "rowcounter <outputdir> <tablename> <column1> [<column2>...]"; String result = new OutputReader(System.out) { @Override void doRead() { assertEquals(-1, RowCounter.printUsage()); } }.read(); assertTrue(result.startsWith(expectedOutput)); }
static int printUsage() { System.out.println(NAME + " <outputdir> <tablename> <column1> [<column2>...]"); return -1; }
RowCounter extends Configured implements Tool { static int printUsage() { System.out.println(NAME + " <outputdir> <tablename> <column1> [<column2>...]"); return -1; } }
RowCounter extends Configured implements Tool { static int printUsage() { System.out.println(NAME + " <outputdir> <tablename> <column1> [<column2>...]"); return -1; }  }
RowCounter extends Configured implements Tool { static int printUsage() { System.out.println(NAME + " <outputdir> <tablename> <column1> [<column2>...]"); return -1; }  JobConf createSubmittableJob(String[] args); int run(final String[] args); static void main(String[] args); }
RowCounter extends Configured implements Tool { static int printUsage() { System.out.println(NAME + " <outputdir> <tablename> <column1> [<column2>...]"); return -1; }  JobConf createSubmittableJob(String[] args); int run(final String[] args); static void main(String[] args);  }