Apache9 commented on a change in pull request #2476:
URL: https://github.com/apache/hbase/pull/2476#discussion_r499598985
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/master/procedure/DeleteTableProcedure.java
##########
@@ -357,22 +358,29 @@ protected static void deleteFromFs(final
MasterProcedureEnv env,
/**
* There may be items for this table still up in hbase:meta in the case
where the info:regioninfo
* column was empty because of some write error. Remove ALL rows from
hbase:meta that have to do
- * with this table. See HBASE-12980.
+ * with this table.
+ * <p/>
+ * See HBASE-12980.
*/
private static void cleanRegionsInMeta(final MasterProcedureEnv env, final
TableName tableName)
- throws IOException {
- Connection connection = env.getMasterServices().getConnection();
- Scan tableScan = MetaTableAccessor.getScanForTableName(connection,
tableName);
- try (Table metaTable = connection.getTable(TableName.META_TABLE_NAME)) {
- List<Delete> deletes = new ArrayList<>();
- try (ResultScanner resScanner = metaTable.getScanner(tableScan)) {
- for (Result result : resScanner) {
- deletes.add(new Delete(result.getRow()));
+ throws IOException {
+ Scan tableScan =
MetaTableAccessor.getScanForTableName(env.getMasterConfiguration(), tableName)
+ .setFilter(new KeyOnlyFilter());
+ long now = EnvironmentEdgeManager.currentTime();
+ List<Delete> deletes = new ArrayList<>();
+ try (
Review comment:
They are in the try-with-resources section? This is a '(' not a '{'...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]