hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mberto...@apache.org
Subject [12/19] hbase git commit: HBASE-13456 Improve HFilePrettyPrinter first hbase:meta region processing (Samir Ahmic)
Date Sat, 18 Apr 2015 09:26:15 GMT
HBASE-13456 Improve HFilePrettyPrinter first hbase:meta region processing (Samir Ahmic)


Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/3ccae378
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/3ccae378
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/3ccae378

Branch: refs/heads/hbase-12439
Commit: 3ccae37866bde3783e1866ce92026a9410860515
Parents: 0dfeba3
Author: Jerry He <jerryjch@apache.org>
Authored: Fri Apr 17 11:29:33 2015 -0700
Committer: Jerry He <jerryjch@apache.org>
Committed: Fri Apr 17 11:29:33 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/hbase/io/hfile/HFile.java    | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3ccae378/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
index 09233a2..0b84ab2 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/HFile.java
@@ -832,7 +832,7 @@ public class HFile {
   }
 
   /**
-   * Returns all files belonging to the given region directory. Could return an
+   * Returns all HFiles belonging to the given region directory. Could return an
    * empty list.
    *
    * @param fs  The file system reference.
@@ -842,18 +842,20 @@ public class HFile {
    */
   static List<Path> getStoreFiles(FileSystem fs, Path regionDir)
       throws IOException {
-    List<Path> res = new ArrayList<Path>();
+    List<Path> regionHFiles = new ArrayList<Path>();
     PathFilter dirFilter = new FSUtils.DirFilter(fs);
     FileStatus[] familyDirs = fs.listStatus(regionDir, dirFilter);
     for(FileStatus dir : familyDirs) {
       FileStatus[] files = fs.listStatus(dir.getPath());
       for (FileStatus file : files) {
-        if (!file.isDirectory()) {
-          res.add(file.getPath());
+        if (!file.isDirectory() &&
+            (!file.getPath().toString().contains(HConstants.HREGION_OLDLOGDIR_NAME)) &&
+            (!file.getPath().toString().contains(HConstants.RECOVERED_EDITS_DIR))) {
+          regionHFiles.add(file.getPath());
         }
       }
     }
-    return res;
+    return regionHFiles;
   }
 
   /**


Mime
View raw message