Repository: asterixdb Updated Branches: refs/heads/master 214d3735d -> ceff6042d
[NO ISSUE][LOG] Reduce Logging level for metadata pages lookups - user model changes: no - storage format changes: no - interface changes: no Change-Id: I99c9eba4f462089d840e51610576604cf61faf95 Reviewed-on: https://asterix-gerrit.ics.uci.edu/2204 Sonar-Qube: Jenkins <[email protected]> Tested-by: Jenkins <[email protected]> Contrib: Jenkins <[email protected]> Integration-Tests: Jenkins <[email protected]> Reviewed-by: Michael Blow <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/ceff6042 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/ceff6042 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/ceff6042 Branch: refs/heads/master Commit: ceff6042d8a3d8b925c2ffbf9388a174dc885a38 Parents: 214d373 Author: Abdullah Alamoudi <[email protected]> Authored: Thu Dec 7 15:59:15 2017 -0800 Committer: Michael Blow <[email protected]> Committed: Fri Dec 8 05:40:18 2017 -0800 ---------------------------------------------------------------------- .../am/lsm/common/util/ComponentUtils.java | 53 ++++++++++++++------ 1 file changed, 39 insertions(+), 14 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/ceff6042/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/util/ComponentUtils.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/util/ComponentUtils.java b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/util/ComponentUtils.java index d9f5c8f..0097a37 100644 --- a/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/util/ComponentUtils.java +++ b/hyracks-fullstack/hyracks/hyracks-storage-am-lsm-common/src/main/java/org/apache/hyracks/storage/am/lsm/common/util/ComponentUtils.java @@ -76,28 +76,41 @@ public class ComponentUtils { * @throws HyracksDataException */ public static void get(ILSMIndex index, IValueReference key, IPointable pointable) throws HyracksDataException { - LOGGER.log(Level.INFO, "Getting " + key + " from index " + index); + boolean loggable = LOGGER.isLoggable(Level.FINE); + if (loggable) { + LOGGER.log(Level.FINE, "Getting " + key + " from index " + index); + } // Lock the opTracker to ensure index components don't change synchronized (index.getOperationTracker()) { index.getCurrentMemoryComponent().getMetadata().get(key, pointable); if (pointable.getLength() == 0) { - LOGGER.log(Level.INFO, key + " was not found in mutable memory component of " + index); + if (loggable) { + LOGGER.log(Level.FINE, key + " was not found in mutable memory component of " + index); + } // was not found in the in current mutable component, search in the other in memory components fromImmutableMemoryComponents(index, key, pointable); if (pointable.getLength() == 0) { - LOGGER.log(Level.INFO, key + " was not found in all immmutable memory components of " + index); + if (loggable) { + LOGGER.log(Level.FINE, key + " was not found in all immmutable memory components of " + index); + } // was not found in the in all in memory components, search in the disk components fromDiskComponents(index, key, pointable); - if (pointable.getLength() == 0) { - LOGGER.log(Level.INFO, key + " was not found in all disk components of " + index); - } else { - LOGGER.log(Level.INFO, key + " was found in disk components of " + index); + if (loggable) { + if (pointable.getLength() == 0) { + LOGGER.log(Level.FINE, key + " was not found in all disk components of " + index); + } else { + LOGGER.log(Level.FINE, key + " was found in disk components of " + index); + } } } else { - LOGGER.log(Level.INFO, key + " was found in the immutable memory components of " + index); + if (loggable) { + LOGGER.log(Level.FINE, key + " was found in the immutable memory components of " + index); + } } } else { - LOGGER.log(Level.INFO, key + " was found in mutable memory component of " + index); + if (loggable) { + LOGGER.log(Level.FINE, key + " was found in mutable memory component of " + index); + } } } } @@ -122,9 +135,14 @@ public class ComponentUtils { private static void fromDiskComponents(ILSMIndex index, IValueReference key, IPointable pointable) throws HyracksDataException { - LOGGER.log(Level.INFO, "Getting " + key + " from disk components of " + index); + boolean loggable = LOGGER.isLoggable(Level.FINE); + if (loggable) { + LOGGER.log(Level.FINE, "Getting " + key + " from disk components of " + index); + } for (ILSMDiskComponent c : index.getDiskComponents()) { - LOGGER.log(Level.INFO, "Getting " + key + " from disk components " + c); + if (loggable) { + LOGGER.log(Level.FINE, "Getting " + key + " from disk components " + c); + } c.getMetadata().get(key, pointable); if (pointable.getLength() != 0) { // Found @@ -134,13 +152,20 @@ public class ComponentUtils { } private static void fromImmutableMemoryComponents(ILSMIndex index, IValueReference key, IPointable pointable) { - LOGGER.log(Level.INFO, "Getting " + key + " from immutable memory components of " + index); + boolean loggable = LOGGER.isLoggable(Level.FINE); + if (loggable) { + LOGGER.log(Level.FINE, "Getting " + key + " from immutable memory components of " + index); + } List<ILSMMemoryComponent> memComponents = index.getMemoryComponents(); int numOtherMemComponents = memComponents.size() - 1; int next = index.getCurrentMemoryComponentIndex(); - LOGGER.log(Level.INFO, index + " has " + numOtherMemComponents + " immutable memory components"); + if (loggable) { + LOGGER.log(Level.FINE, index + " has " + numOtherMemComponents + " immutable memory components"); + } for (int i = 0; i < numOtherMemComponents; i++) { - LOGGER.log(Level.INFO, "trying to get " + key + " from immutable memory components number: " + (i + 1)); + if (loggable) { + LOGGER.log(Level.FINE, "trying to get " + key + " from immutable memory components number: " + (i + 1)); + } next = next - 1; if (next < 0) { next = memComponents.size() - 1;
