PHOENIX-3275 Reduce logging level of mutable secondary index logging
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/27722998 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/27722998 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/27722998 Branch: refs/heads/calcite Commit: 27722998c35cbc14f8a6c1c1be1c0cc6b0f7769a Parents: c0f72b5 Author: James Taylor <jamestay...@apache.org> Authored: Tue Sep 13 22:52:42 2016 -0700 Committer: James Taylor <jamestay...@apache.org> Committed: Tue Sep 13 22:52:42 2016 -0700 ---------------------------------------------------------------------- .../phoenix/hbase/index/covered/NonTxIndexBuilder.java | 4 ++-- .../phoenix/hbase/index/covered/data/IndexMemStore.java | 10 +++++----- .../hbase/index/covered/update/IndexUpdateManager.java | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/27722998/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java index 10d164b..eb9dc96 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/NonTxIndexBuilder.java @@ -70,8 +70,8 @@ public class NonTxIndexBuilder extends BaseIndexBuilder { batchMutationAndAddUpdates(manager, state, mutation, indexMetaData); - if (LOG.isDebugEnabled()) { - LOG.debug("Found index updates for Mutation: " + mutation + "\n" + manager); + if (LOG.isTraceEnabled()) { + LOG.trace("Found index updates for Mutation: " + mutation + "\n" + manager); } return manager.toMap(); http://git-wip-us.apache.org/repos/asf/phoenix/blob/27722998/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java index 5b68fa2..0fc9e14 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/data/IndexMemStore.java @@ -113,8 +113,8 @@ public class IndexMemStore implements KeyValueStore { @Override public void add(KeyValue kv, boolean overwrite) { - if (LOG.isDebugEnabled()) { - LOG.info("Inserting: " + toString(kv)); + if (LOG.isTraceEnabled()) { + LOG.trace("Inserting: " + toString(kv)); } // if overwriting, we will always update if (!overwrite) { @@ -139,13 +139,13 @@ public class IndexMemStore implements KeyValueStore { private String toString(KeyValue kv) { return kv.toString() + "/value=" + - Bytes.toString(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()); + Bytes.toStringBinary(kv.getValueArray(), kv.getValueOffset(), kv.getValueLength()); } @Override public void rollback(KeyValue kv) { - if (LOG.isDebugEnabled()) { - LOG.debug("Rolling back: " + toString(kv)); + if (LOG.isTraceEnabled()) { + LOG.trace("Rolling back: " + toString(kv)); } // If the key is in the store, delete it this.kvset.remove(kv); http://git-wip-us.apache.org/repos/asf/phoenix/blob/27722998/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/update/IndexUpdateManager.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/update/IndexUpdateManager.java b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/update/IndexUpdateManager.java index 26f620f..a183186 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/update/IndexUpdateManager.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/hbase/index/covered/update/IndexUpdateManager.java @@ -209,7 +209,7 @@ public class IndexUpdateManager { public String toString() { StringBuffer sb = new StringBuffer("Pending Index Updates:\n"); for (Entry<ImmutableBytesPtr, Collection<Mutation>> entry : map.entrySet()) { - String tableName = Bytes.toString(entry.getKey().get()); + String tableName = Bytes.toStringBinary(entry.getKey().get()); sb.append(" Table: '" + tableName + "'\n"); for (Mutation m : entry.getValue()) { sb.append("\t"); @@ -218,7 +218,7 @@ public class IndexUpdateManager { } sb.append(m.getClass().getSimpleName() + ":" + ((m instanceof Put) ? m.getTimeStamp() + " " : "")); - sb.append(" row=" + Bytes.toString(m.getRow())); + sb.append(" row=" + Bytes.toStringBinary(m.getRow())); sb.append("\n"); if (m.getFamilyCellMap().isEmpty()) { sb.append("\t\t=== EMPTY ===\n");