Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.0 4d8c6c1b8 -> bf01eb209
PHOENIX-1958 Minimize memory allocation on new connection Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/bf01eb20 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/bf01eb20 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/bf01eb20 Branch: refs/heads/4.x-HBase-1.0 Commit: bf01eb209c336ef689afa8c78f905d84d6150caa Parents: 4d8c6c1 Author: James Taylor <[email protected]> Authored: Sat May 9 18:13:49 2015 -0700 Committer: James Taylor <[email protected]> Committed: Sat May 9 18:15:42 2015 -0700 ---------------------------------------------------------------------- .../src/main/java/org/apache/phoenix/util/ReadOnlyProps.java | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/bf01eb20/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java b/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java index 47137ef..a6fb7a5 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/util/ReadOnlyProps.java @@ -27,6 +27,9 @@ import java.util.Properties; import java.util.regex.Matcher; import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + import com.google.common.base.Objects; import com.google.common.collect.ImmutableMap; import com.google.common.collect.Maps; @@ -40,6 +43,7 @@ import com.google.common.collect.Maps; * @since 1.2.2 */ public class ReadOnlyProps implements Iterable<Entry<String, String>> { + private static final Logger logger = LoggerFactory.getLogger(ReadOnlyProps.class); public static final ReadOnlyProps EMPTY_PROPS = new ReadOnlyProps(); private final Map<String, String> props; @@ -296,6 +300,7 @@ public class ReadOnlyProps implements Iterable<Entry<String, String>> { String value = entry.getValue().toString(); String oldValue = props.get(key); if (!Objects.equal(oldValue, value)) { + if (logger.isDebugEnabled()) logger.debug("Creating new ReadOnlyProps due to " + key + " with " + oldValue + "!=" + value); return new ReadOnlyProps(this, overrides); } }
