From 9334e807b578241d2bf67048fd1ece69b27c310b Mon Sep 17 00:00:00 2001 From: Ashu Pachauri Date: Mon, 31 Oct 2016 12:39:10 -0700 Subject: [PATCH] HBASE-16977: VerifyReplication should log a printable representation of the row keys --- .../hadoop/hbase/mapreduce/replication/VerifyReplication.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java index 5f804dc..a991766 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java @@ -181,7 +181,8 @@ public class VerifyReplication extends Configured implements Tool { Result.compareResults(value, currentCompareRowInPeerTable); context.getCounter(Counters.GOODROWS).increment(1); if (verbose) { - LOG.info("Good row key: " + delimiter + Bytes.toString(value.getRow()) + delimiter); + LOG.info("Good row key: " + delimiter + + Bytes.toStringBinary(value.getRow()) + delimiter); } } catch (Exception e) { logFailRowAndIncreaseCounter(context, Counters.CONTENT_DIFFERENT_ROWS, value); @@ -211,18 +212,19 @@ public class VerifyReplication extends Configured implements Tool { if (!sourceResult.isEmpty()) { context.getCounter(Counters.GOODROWS).increment(1); if (verbose) { - LOG.info("Good row key: " + delimiter + Bytes.toString(row.getRow()) + delimiter); + LOG.info("Good row key: " + delimiter + + Bytes.toStringBinary(row.getRow()) + delimiter); } } return; } catch (Exception e) { LOG.error("recompare fail after sleep, rowkey=" + delimiter + - Bytes.toString(row.getRow()) + delimiter); + Bytes.toStringBinary(row.getRow()) + delimiter); } } context.getCounter(counter).increment(1); context.getCounter(Counters.BADROWS).increment(1); - LOG.error(counter.toString() + ", rowkey=" + delimiter + Bytes.toString(row.getRow()) + + LOG.error(counter.toString() + ", rowkey=" + delimiter + Bytes.toStringBinary(row.getRow()) + delimiter); } -- 2.8.0-rc2