hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-17136 Fix logging message in LoadIncrementalHFiles (Vladimir Rodionov)
Date Tue, 06 Dec 2016 19:53:05 GMT
Repository: hbase
Updated Branches:
  refs/heads/HBASE-7912 ff68ba065 -> 72dfdc8a7


HBASE-17136 Fix logging message in LoadIncrementalHFiles (Vladimir Rodionov)


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

Branch: refs/heads/HBASE-7912
Commit: 72dfdc8a7f5ab0e0d617e64be7dd36f64c623231
Parents: ff68ba0
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Dec 6 11:52:58 2016 -0800
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Dec 6 11:52:58 2016 -0800

----------------------------------------------------------------------
 .../hbase/mapreduce/LoadIncrementalHFiles.java   | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/72dfdc8a/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 b1ed43c..4ff674f 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
@@ -911,7 +911,8 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
 
         try {
           LOG.debug("Going to connect to server " + getLocation() + " for row "
-              + Bytes.toStringBinary(getRow()) + " with hfile group " + famPaths);
+              + Bytes.toStringBinary(getRow()) + " with hfile group " +
+              LoadIncrementalHFiles.this.toString(famPaths));
           byte[] regionName = getLocation().getRegionInfo().getRegionName();
           if (!isSecureBulkLoadEndpointAvailable()) {
             success = ProtobufUtil.bulkLoadHFile(getStub(), famPaths, regionName, assignSeqIds);
@@ -983,6 +984,22 @@ public class LoadIncrementalHFiles extends Configured implements Tool
{
     }
   }
 
+  private final String toString(List<Pair<byte[], String>> list) {
+    StringBuffer sb = new StringBuffer();
+    sb.append("[");
+    if(list != null){
+      for(Pair<byte[], String> pair: list) {
+        sb.append("{");
+        sb.append(Bytes.toStringBinary(pair.getFirst()));
+        sb.append(",");
+        sb.append(pair.getSecond());
+        sb.append("}");
+      }
+    }
+    sb.append("]");
+    return sb.toString();
+  }
+
   private boolean isSecureBulkLoadEndpointAvailable() {
     String classes = getConf().get(CoprocessorHost.REGION_COPROCESSOR_CONF_KEY, "");
     return classes.contains("org.apache.hadoop.hbase.security.access.SecureBulkLoadEndpoint");


Mime
View raw message