/** * Create a table and take a snapshot of the table used by the export test. */ @Before public void setUp() throws Exception { this.admin = TEST_UTIL.getAdmin(); tableName = TableName.valueOf("testtb-" + testName.getMethodName()); snapshotName = Bytes.toBytes("snaptb0-" + testName.getMethodName()); emptySnapshotName = Bytes.toBytes("emptySnaptb0-" + testName.getMethodName()); // create Table createTable(); // Take an empty snapshot admin.snapshot(emptySnapshotName, tableName); // Add some rows SnapshotTestingUtils.loadData(TEST_UTIL, tableName, 50, FAMILY); tableNumFiles = admin.getTableRegions(tableName).size(); // take a snapshot admin.snapshot(snapshotName, tableName); }
/** * Create a table and take a snapshot of the table used by the export test. */ @Before public void setUp() throws Exception { this.admin = TEST_UTIL.getAdmin(); tableName = TableName.valueOf("testtb-" + testName.getMethodName()); snapshotName = Bytes.toBytes("snaptb0-" + testName.getMethodName()); emptySnapshotName = Bytes.toBytes("emptySnaptb0-" + testName.getMethodName()); // create Table createTable(); // Take an empty snapshot admin.snapshot(emptySnapshotName, tableName); // Add some rows SnapshotTestingUtils.loadData(TEST_UTIL, tableName, 50, FAMILY); tableNumFiles = admin.getTableRegions(tableName).size(); // take a snapshot admin.snapshot(snapshotName, tableName); }
/** * Create a table and take a snapshot of the table used by the export test. */ @Before public void setUp() throws Exception { this.admin = TEST_UTIL.getAdmin(); tableName = TableName.valueOf("testtb-" + testName.getMethodName()); snapshotName = Bytes.toBytes("snaptb0-" + testName.getMethodName()); emptySnapshotName = Bytes.toBytes("emptySnaptb0-" + testName.getMethodName()); // create Table createTable(); // Take an empty snapshot admin.snapshot(emptySnapshotName, tableName); // Add some rows SnapshotTestingUtils.loadData(TEST_UTIL, tableName, 50, FAMILY); tableNumFiles = admin.getTableRegions(tableName).size(); // take a snapshot admin.snapshot(snapshotName, tableName); }