/** {@inheritDoc} */ @Override public void majorCompactRegion(byte[] bytes) throws IOException { LOG.info("majorCompactRegion is a no-op"); }
/** {@inheritDoc} */ @Override public void majorCompactRegion(byte[] bytes, byte[] bytes2) throws IOException { LOG.info("majorCompactRegion is a no-op"); }
/** {@inheritDoc} */ @Override public void compactRegion(byte[] bytes) throws IOException { LOG.info("compactRegion is a no-op"); }
/** {@inheritDoc} */ @Override public void mergeRegions(byte[] encodedNameOfRegionA, byte[] encodedNameOfRegionB, boolean forcible) throws IOException { LOG.info("mergeRegions is a no-op"); }
/** {@inheritDoc} */ @Override public void compactRegion(byte[] bytes, byte[] bytes2) throws IOException { LOG.info("compactRegion is a no-op"); }
/** {@inheritDoc} */ @Override public void move(byte[] encodedRegionName, byte[] destServerName) throws HBaseIOException, MasterNotRunningException, ZooKeeperConnectionException { LOG.info("move is a no-op"); }
/** {@inheritDoc} */ @Override public void assign(byte[] regionName) throws MasterNotRunningException, ZooKeeperConnectionException, IOException { LOG.info("assign is a no-op"); }
/** {@inheritDoc} */ @Override public void splitRegion(byte[] bytes, byte[] bytes2) throws IOException { LOG.info("split is a no-op"); }
/** {@inheritDoc} */ @Override public void compactRegion(byte[] bytes) throws IOException { LOG.info("compactRegion is a no-op"); }
/** {@inheritDoc} */ @Override public void split(TableName tableName) throws IOException { LOG.info("split is a no-op"); }
/** {@inheritDoc} */ @Override public void split(TableName tableName, byte[] bytes) throws IOException { LOG.info("split is a no-op"); }
/** {@inheritDoc} */ @Override public void flushRegion(byte[] bytes) throws IOException { LOG.info("flushRegion is a no-op"); }
/** {@inheritDoc} */ @Override public void majorCompact(TableName tableName, byte[] bytes) throws IOException { LOG.info("majorCompact is a no-op"); }
/** {@inheritDoc} */ @Override public void unassign(byte[] regionName, boolean force) throws MasterNotRunningException, ZooKeeperConnectionException, IOException { LOG.info("unassign is a no-op"); }
/** {@inheritDoc} */ @Override public void split(TableName tableName, byte[] bytes) throws IOException { LOG.info("split is a no-op"); }
/** {@inheritDoc} */ @Override public void truncateTable(TableName tableName, boolean preserveSplits) throws IOException { if (!preserveSplits) { LOG.info("truncate will preserveSplits. The passed in variable is ignored."); } issueBulkDelete(tableName, ""); disabledTables.remove(tableName); }
/** {@inheritDoc} */ @Override public void truncateTable(TableName tableName, boolean preserveSplits) throws IOException { if (!preserveSplits) { LOG.info("truncate will preserveSplits. The passed in variable is ignored."); } issueBulkDelete(tableName, DropRowRangeRequest.newBuilder().setDeleteAllDataFromTable(true)); disabledTables.remove(tableName); }
@Override public CompletableFuture<Void> truncateTable(TableName tableName, boolean preserveSplits) { if (!preserveSplits) { LOG.info("truncate will preserveSplits. The passed in variable is ignored."); } DropRowRangeRequest request = DropRowRangeRequest .newBuilder() .setDeleteAllDataFromTable(true) .setName(bigtableInstanceName.toTableNameStr(tableName.getNameAsString())) .build(); return bigtableTableAdminClient.dropRowRangeAsync(request).thenApply(r -> null); }
@Override public Future<Void> truncateTableAsync(TableName tableName, boolean preserveSplits) throws IOException { if (!preserveSplits) { LOG.info("truncate will preserveSplits. The passed in variable is ignored."); } DropRowRangeRequest.Builder deleteRequest = DropRowRangeRequest.newBuilder().setDeleteAllDataFromTable(true); return FutureUtils.toCompletableFuture( bigtableTableAdminClient .dropRowRangeAsync(deleteRequest.setName(toBigtableName(tableName)).build())) .thenApply(r -> null); } /* ******* Unsupported methods *********** */
@Override public CompletableFuture<Void> truncateTable(TableName tableName, boolean preserveSplits) { if (!preserveSplits) { LOG.info("truncate will preserveSplits. The passed in variable is ignored."); } DropRowRangeRequest request = DropRowRangeRequest .newBuilder() .setDeleteAllDataFromTable(true) .setName(bigtableInstanceName.toTableNameStr(tableName.getNameAsString())) .build(); return bigtableTableAdminClient.dropRowRangeAsync(request).thenApply(r -> null); }