From 0da798374e0244b1f098c51274efd1628e19a198 Mon Sep 17 00:00:00 2001 From: chenheng Date: Mon, 25 Apr 2016 12:01:29 +0800 Subject: [PATCH] HBASE-15596 hbAdmin is not closed after LoadIncrementalHFiles completes --- .../apache/hadoop/hbase/mapreduce/LoadIncrementalHFiles.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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()); -- 1.9.3 (Apple Git-50)