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



##########
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:
       [nit] this seems like a behavior change, before this change, it will 
fail whenever the `fs.getFileStatus` failed for any given table. after this 
change, we still continue to work on it if any partial `fs.getFileStatus` 
failed. 
   
   I'm okie with this change, but want to have some note down on this PR. 




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