/** * Exercises the testMultiTransaction test with staging table specified. * @throws IOException * @throws SQLException */ @Test public void testMultiTransactionWithStaging() throws IOException, SQLException { final int TOTAL_RECORDS = 20; createTextFile(0, TOTAL_RECORDS, true); createTable(); createStagingTable(); runExport(getArgv(true, 5, 2, "--staging-table", getStagingTableName())); verifyExport(TOTAL_RECORDS); }
/** * Run 2 mappers with staging enabled, * make sure all records load in correctly. */ @Test public void testMultiMapTextExportWithStaging() throws IOException, SQLException { final int RECORDS_PER_MAP = 10; final int NUM_FILES = 2; for (int f = 0; f < NUM_FILES; f++) { createTextFile(f, RECORDS_PER_MAP, false); } createTable(); createStagingTable(); runExport(getArgv(true, 10, 10, "--staging-table", getStagingTableName())); verifyExport(RECORDS_PER_MAP * NUM_FILES); }