protected void createTable() throws Exception { SnapshotTestingUtils.createTable(UTIL, tableName, FAMILY); }
public static void createTable(final HBaseTestingUtility util, final TableName tableName, final byte[]... families) throws IOException, InterruptedException { createTable(util, tableName, 1, families); }
public static void createTable(final HBaseTestingUtility util, final TableName tableName, final int regionReplication, final byte[]... families) throws IOException, InterruptedException { createTable(util, tableName, regionReplication, KEYS.length, families); }
public static void createPreSplitTable(final HBaseTestingUtility util, final TableName tableName, final int nRegions, final byte[]... families) throws IOException, InterruptedException { createTable(util, tableName, 1, nRegions, families); }
protected void createTable() throws Exception { SnapshotTestingUtils.createTable(UTIL, TABLE_NAME, TEST_FAM); }
protected void createTable() throws Exception { SnapshotTestingUtils.createTable(TEST_UTIL, tableName, getNumReplicas(), FAMILY); }
protected void createTable() throws IOException, InterruptedException { SnapshotTestingUtils.createTable(TEST_UTIL, tableName, getNumReplicas(), FAMILY); }
private SnapshotProtos.SnapshotDescription getSnapshot() throws Exception { if (snapshot == null) { final TableName snapshotTableName = TableName.valueOf("testCloneSnapshot"); long tid = System.currentTimeMillis(); final byte[] snapshotName = Bytes.toBytes("snapshot-" + tid); Admin admin = UTIL.getAdmin(); // create Table SnapshotTestingUtils.createTable(UTIL, snapshotTableName, getNumReplicas(), CF); // Load data SnapshotTestingUtils.loadData(UTIL, snapshotTableName, 500, CF); admin.disableTable(snapshotTableName); // take a snapshot admin.snapshot(snapshotName, snapshotTableName); admin.enableTable(snapshotTableName); List<SnapshotDescription> snapshotList = admin.listSnapshots(); snapshot = ProtobufUtil.createHBaseProtosSnapshotDesc(snapshotList.get(0)); } return snapshot; }
SnapshotTestingUtils.createTable(UTIL, TABLE2_NAME, TEST_FAM);
Admin admin = UTIL.getAdmin(); SnapshotTestingUtils.createTable(UTIL, snapshotTableName, getNumReplicas(), CF1, CF2);
@Test public void testRestoreSnapshotAfterTruncate() throws Exception { TableName tableName = TableName.valueOf(getValidMethodName()); SnapshotTestingUtils.createTable(TEST_UTIL, tableName, getNumReplicas(), FAMILY); SnapshotTestingUtils.loadData(TEST_UTIL, tableName, 500, FAMILY); int numOfRows = 0; try (Table table = TEST_UTIL.getConnection().getTable(tableName)) { numOfRows = countRows(table); } // take snapshot admin.snapshot("snap", tableName); admin.disableTable(tableName); admin.truncateTable(tableName, false); admin.disableTable(tableName); admin.restoreSnapshot("snap"); admin.enableTable(tableName); verifyRowCount(TEST_UTIL, tableName, numOfRows); SnapshotTestingUtils.verifyReplicasCameOnline(tableName, admin, getNumReplicas()); } }
SnapshotTestingUtils.createTable(UTIL, tableName, getNumReplicas(), TEST_FAM);
SnapshotTestingUtils.createTable(UTIL, tableName, getNumReplicas(), TEST_FAM); admin.disableTable(tableName);
public static void createTable(final HBaseTestingUtility util, final TableName tableName, final byte[]... families) throws IOException, InterruptedException { createTable(util, tableName, 1, families); }
public static void createTable(final HBaseTestingUtility util, final TableName tableName, final int regionReplication, final byte[]... families) throws IOException, InterruptedException { createTable(util, tableName, regionReplication, KEYS.length, families); }
public static void createPreSplitTable(final HBaseTestingUtility util, final TableName tableName, final int nRegions, final byte[]... families) throws IOException, InterruptedException { createTable(util, tableName, 1, nRegions, families); }
protected void createTable() throws Exception { SnapshotTestingUtils.createTable(UTIL, tableName, FAMILY); }
protected void createTable() throws Exception { SnapshotTestingUtils.createTable(UTIL, TABLE_NAME, TEST_FAM); }
protected void createTable() throws IOException, InterruptedException { SnapshotTestingUtils.createTable(TEST_UTIL, tableName, getNumReplicas(), FAMILY); }
protected void createTable() throws Exception { SnapshotTestingUtils.createTable(TEST_UTIL, tableName, getNumReplicas(), FAMILY); }