@Test public void testMultiTableImport() throws IOException { String [] argv = getArgv(null, null); runImport(new ImportAllTablesTool(), argv);
@Test public void testMultiTableImportAsParquetFormat() throws IOException { String [] argv = getArgv(new String[]{"--as-parquetfile"}, null); runImport(new ImportAllTablesTool(), argv); Path warehousePath = new Path(this.getWarehouseDir()); int i = 0; for (String tableName : this.tableNames) { Path tablePath = new Path(warehousePath, tableName); // dequeue the expected value for this table. This // list has the same order as the tableNames list. String expectedVal = Integer.toString(i++) + "," + this.expectedStrings.get(0); this.expectedStrings.remove(0); List<String> result = new ParquetReader(tablePath).readAllInCsv(); assertEquals("Table " + tableName + " expected a different string", singletonList(expectedVal), result); } }
@Test public void testMultiTableImportWithExclude() throws IOException { String exclude = this.tableNames.get(0); String [] argv = getArgv(null, new String[]{ exclude }); runImport(new ImportAllTablesTool(), argv);