z-york commented on a change in pull request #92:
URL: 
https://github.com/apache/hbase-operator-tools/pull/92#discussion_r705670536



##########
File path: hbase-hbck2/src/main/java/org/apache/hbase/hbck1/HBaseFsck.java
##########
@@ -2168,13 +2169,18 @@ public void loadHdfsRegionDirs() throws IOException, 
InterruptedException {
     // List all tables from HDFS
     List<FileStatus> tableDirs = Lists.newArrayList();
 
-    List<Path> paths = FSUtils.getTableDirs(fs, rootDir);
-    for (Path path : paths) {
-      TableName tableName = CommonFSUtils.getTableName(path);
-      if ((!checkMetaOnly && isTableIncluded(tableName)) ||
-          tableName.equals(TableName.META_TABLE_NAME)) {
-        tableDirs.add(fs.getFileStatus(path));
+    if (!checkMetaOnly) {
+      for (Path tableDir : this.tableDirs) {
+        try {
+          fs.getFileStatus(tableDir);
+        } catch (IOException ioe) {
+          LOG.warn("Failed to get Table directory for included table: {}",
+              CommonFSUtils.getTableName(tableDir), ioe);
+        }

Review comment:
       This isn't really a behavior change since FSUtils.getTableDirs will do a 
list and only include those tables that exist on the FS (even if a table is 
passed that doesn't exist within the table dirs). With this change there isn't 
any checking that the directory exists before this getFileStatus so this is 
essentially doing the same thing as before.




-- 
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.

To unsubscribe, e-mail: issues-unsubscr...@hbase.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to