From de60f4999ee394a7e5bc9e6396ab3d915d160e63 Mon Sep 17 00:00:00 2001 From: eclark Date: Thu, 22 Aug 2013 21:15:30 +0000 Subject: [PATCH] HBASE-9290 Add logging in IntegrationTestBigLinkedList Verify reduce phase git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1516609 13f79535-47bb-0310-9956-ffa450edef68 --- .../hadoop/hbase/test/IntegrationTestBigLinkedList.java | 2 ++ .../hadoop/hbase/test/IntegrationTestLoadAndVerify.java | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java index 9df9ad6e1e3..b1956df7749 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestBigLinkedList.java @@ -576,6 +576,8 @@ public class IntegrationTestBigLinkedList extends IntegrationTestBase { refsSb.append(Bytes.toStringBinary(ref)); } keyString = Bytes.toStringBinary(key.getBytes(), 0, key.getLength()); + + LOG.error("Linked List error: Key = " + keyString + " References = " + refsSb.toString()); } if (defCount == 0 && refs.size() > 0) { diff --git a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java index 22a866b5d85..9e8c8cc3837 100644 --- a/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java +++ b/hbase-it/src/test/java/org/apache/hadoop/hbase/test/IntegrationTestLoadAndVerify.java @@ -26,6 +26,8 @@ import java.util.regex.Pattern; import com.google.common.collect.Sets; import org.apache.commons.cli.CommandLine; +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.fs.FileSystem; import org.apache.hadoop.fs.Path; @@ -239,6 +241,7 @@ public class IntegrationTestLoadAndVerify extends IntegrationTestBase { public static class VerifyMapper extends TableMapper { static final BytesWritable EMPTY = new BytesWritable(HConstants.EMPTY_BYTE_ARRAY); + @Override protected void map(ImmutableBytesWritable key, Result value, Context context) throws IOException, InterruptedException { @@ -257,6 +260,7 @@ public class IntegrationTestLoadAndVerify extends IntegrationTestBase { } public static class VerifyReducer extends Reducer { + private static final Log LOG = LogFactory.getLog(VerifyReducer.class); private Counter refsChecked; private Counter rowsWritten; @@ -285,6 +289,7 @@ public class IntegrationTestLoadAndVerify extends IntegrationTestBase { if (!gotOriginalRow) { String parsedRow = makeRowReadable(referredRow.getBytes(), referredRow.getLength()); String binRow = Bytes.toStringBinary(referredRow.getBytes(), 0, referredRow.getLength()); + LOG.error("Reference error row " + parsedRow); ctx.write(new Text(binRow), new Text(parsedRow)); rowsWritten.increment(1); }