Repository: hbase
Updated Branches:
  refs/heads/branch-1.2 23d0846a7 -> 8a20ba049


HBASE-15596 hbAdmin is not closed after LoadIncrementalHFiles completes


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

Branch: refs/heads/branch-1.2
Commit: 8a20ba049143395bffd304feeffff860217c4ca9
Parents: 23d0846
Author: chenheng <chenh...@apache.org>
Authored: Mon May 9 11:42:14 2016 +0800
Committer: chenheng <chenh...@apache.org>
Committed: Mon May 9 11:42:14 2016 +0800

----------------------------------------------------------------------
 .../hadoop/hbase/mapreduce/LoadIncrementalHFiles.java   | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/8a20ba04/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
----------------------------------------------------------------------
diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
index 752a639..9630a35 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java
@@ -373,10 +373,10 @@ public class LoadIncrementalHFiles extends Configured 
implements Tool {
        */
       boolean validateHFile = 
getConf().getBoolean("hbase.loadincremental.validate.hfile", true);
       if(!validateHFile) {
-       LOG.warn("You are skipping HFiles validation, it might cause some data 
loss if files " +
-           "are not correct. If you fail to read data from your table after 
using this " +
-           "option, consider removing the files and bulkload again without 
this option. " +
-           "See HBASE-13985");
+        LOG.warn("You are skipping HFiles validation, it might cause some data 
loss if files " +
+          "are not correct. If you fail to read data from your table after 
using this " +
+          "option, consider removing the files and bulkload again without this 
option. " +
+          "See HBASE-13985");
       }
       discoverLoadQueue(queue, hfofDir, validateHFile);
       // check whether there is invalid family name in HFiles to be bulkloaded
@@ -1035,7 +1035,9 @@ public class LoadIncrementalHFiles extends Configured 
implements Tool {
         throw new TableNotFoundException(errorMsg);
       }
     }
-
+    if (hbAdmin != null) {
+      hbAdmin.close();
+    }
     Path hfofDir = new Path(dirPath);
 
     try (Connection connection = ConnectionFactory.createConnection(getConf());

Reply via email to