Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AC692200BE0 for ; Sat, 3 Dec 2016 01:06:45 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AB183160B24; Sat, 3 Dec 2016 00:06:45 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 07ABC160B2A for ; Sat, 3 Dec 2016 01:06:44 +0100 (CET) Received: (qmail 17431 invoked by uid 500); 3 Dec 2016 00:06:44 -0000 Mailing-List: contact commits-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hbase.apache.org Delivered-To: mailing list commits@hbase.apache.org Received: (qmail 17215 invoked by uid 99); 3 Dec 2016 00:06:44 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2016 00:06:44 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id C5672E055E; Sat, 3 Dec 2016 00:06:43 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: apurtell@apache.org To: commits@hbase.apache.org Date: Sat, 03 Dec 2016 00:06:43 -0000 Message-Id: <47840180725d49deb31af7084b7a1e80@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] hbase git commit: HBASE-16409 Row key for bad row should be properly delimited in VerifyReplication archived-at: Sat, 03 Dec 2016 00:06:45 -0000 Repository: hbase Updated Branches: refs/heads/0.98 358067eac -> 4cdd0adfb HBASE-16409 Row key for bad row should be properly delimited in VerifyReplication Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/e05e70c2 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/e05e70c2 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/e05e70c2 Branch: refs/heads/0.98 Commit: e05e70c24551f62fce0be3ad7d4f5bc5a26fd51d Parents: 358067e Author: tedyu Authored: Sat Aug 20 17:18:27 2016 -0700 Committer: Andrew Purtell Committed: Thu Dec 1 16:43:26 2016 -0800 ---------------------------------------------------------------------- .../hbase/mapreduce/replication/VerifyReplication.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/e05e70c2/hbase-server/src/main/java/org/apache/hadoop/hbase/mapreduce/replication/VerifyReplication.java ---------------------------------------------------------------------- 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 a5d1ddd..6c1e490 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 @@ -80,6 +80,7 @@ public class VerifyReplication extends Configured implements Tool { static int versions = -1; static String tableName = null; static String families = null; + static String delimiter = null; static String peerId = null; static String rowPrefixes = null; @@ -182,7 +183,8 @@ public class VerifyReplication extends Configured implements Tool { private void logFailRowAndIncreaseCounter(Context context, Counters counter, Result row) { context.getCounter(counter).increment(1); context.getCounter(Counters.BADROWS).increment(1); - LOG.error(counter.toString() + ", rowkey=" + Bytes.toString(row.getRow())); + LOG.error(counter.toString() + ", rowkey=" + delimiter + Bytes.toString(row.getRow()) + + delimiter); } @Override @@ -387,6 +389,12 @@ public class VerifyReplication extends Configured implements Tool { printUsage("Invalid argument '" + cmd + "'"); } + final String delimiterArgKey = "--delimiter="; + if (cmd.startsWith(delimiterArgKey)) { + delimiter = cmd.substring(delimiterArgKey.length()); + continue; + } + if (i == args.length-2) { peerId = cmd; } @@ -422,7 +430,7 @@ public class VerifyReplication extends Configured implements Tool { System.err.println("ERROR: " + errorMsg); } System.err.println("Usage: verifyrep [--starttime=X]" + - " [--endtime=Y] [--families=A] [--row-prefixes=B] "); + " [--endtime=Y] [--families=A] [--row-prefixes=B] [--delimiter=] "); System.err.println(); System.err.println("Options:"); System.err.println(" starttime beginning of the time range"); @@ -431,6 +439,7 @@ public class VerifyReplication extends Configured implements Tool { System.err.println(" versions number of cell versions to verify"); System.err.println(" families comma-separated list of families to copy"); System.err.println(" row-prefixes comma-separated list of row key prefixes to filter on "); + System.err.println(" delimiter the delimiter used in display around rowkey"); System.err.println(); System.err.println("Args:"); System.err.println(" peerid Id of the peer used for verification, must match the one given for replication");