You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2016/12/07 01:22:36 UTC

hbase git commit: HBASE-17152 Use new HFile API to open reader w/o block cache being created (Vladimir Rodionov)

Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 512c1ed9c -> 3d967f96d


HBASE-17152 Use new HFile API to open reader w/o block cache being created (Vladimir Rodionov)


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

Branch: refs/heads/HBASE-7912
Commit: 3d967f96dfd4c846e902c5f779749f146f676d8a
Parents: 512c1ed
Author: tedyu <yu...@gmail.com>
Authored: Tue Dec 6 17:22:33 2016 -0800
Committer: tedyu <yu...@gmail.com>
Committed: Tue Dec 6 17:22:33 2016 -0800

----------------------------------------------------------------------
 .../apache/hadoop/hbase/backup/util/RestoreServerUtil.java   | 3 +--
 .../org/apache/hadoop/hbase/mapreduce/HFileInputFormat2.java | 8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/3d967f96/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java
index 4173004..8c05027 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/backup/util/RestoreServerUtil.java
@@ -50,7 +50,6 @@ import org.apache.hadoop.hbase.classification.InterfaceStability;
 import org.apache.hadoop.hbase.client.Admin;
 import org.apache.hadoop.hbase.client.Connection;
 import org.apache.hadoop.hbase.io.HFileLink;
-import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.mapreduce.LoadIncrementalHFiles;
 import org.apache.hadoop.hbase.protobuf.generated.HBaseProtos.SnapshotDescription;
@@ -633,7 +632,7 @@ public class RestoreServerUtil {
               || HFileLink.isHFileLink(hfile.getName())) {
             continue;
           }
-          HFile.Reader reader = HFile.createReader(fs, hfile, new CacheConfig(conf), conf);
+          HFile.Reader reader = HFile.createReader(fs, hfile, conf);
           final byte[] first, last;
           try {
             reader.loadFileInfo();

http://git-wip-us.apache.org/repos/asf/hbase/blob/3d967f96/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileInputFormat2.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileInputFormat2.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileInputFormat2.java
index dfcd7be..f4c6e6e 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileInputFormat2.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/HFileInputFormat2.java
@@ -27,7 +27,6 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.PathFilter;
 import org.apache.hadoop.hbase.Cell;
-import org.apache.hadoop.hbase.io.hfile.CacheConfig;
 import org.apache.hadoop.hbase.io.hfile.HFile;
 import org.apache.hadoop.hbase.io.hfile.HFile.Reader;
 import org.apache.hadoop.hbase.io.hfile.HFileScanner;
@@ -56,6 +55,7 @@ public class HFileInputFormat2 extends FileInputFormat<NullWritable, Cell> {
    * in the way we're doing exports.
    */
   static final PathFilter HIDDEN_FILE_FILTER = new PathFilter() {
+    @Override
     public boolean accept(Path p) {
       String name = p.getName();
       return !name.startsWith("_") && !name.startsWith(".");
@@ -79,14 +79,14 @@ public class HFileInputFormat2 extends FileInputFormat<NullWritable, Cell> {
     private boolean seeked = false;
 
     @Override
-    public void initialize(InputSplit split, TaskAttemptContext context) 
+    public void initialize(InputSplit split, TaskAttemptContext context)
         throws IOException, InterruptedException {
       FileSplit fileSplit = (FileSplit) split;
       conf = context.getConfiguration();
       Path path = fileSplit.getPath();
       FileSystem fs = path.getFileSystem(conf);
       LOG.info("Initialize HFileRecordReader for {}", path);
-      this.in = HFile.createReader(fs, path, new CacheConfig(conf), conf);
+      this.in = HFile.createReader(fs, path, conf);
 
       // The file info must be loaded before the scanner can be used.
       // This seems like a bug in HBase, but it's easily worked around.
@@ -144,7 +144,7 @@ public class HFileInputFormat2 extends FileInputFormat<NullWritable, Cell> {
   protected List<FileStatus> listStatus(JobContext job) throws IOException {
     List<FileStatus> result = new ArrayList<FileStatus>();
 
-    // Explode out directories that match the original FileInputFormat filters 
+    // Explode out directories that match the original FileInputFormat filters
     // since HFiles are written to directories where the
     // directory name is the column name
     for (FileStatus status : super.listStatus(job)) {