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 047DF200B9E for ; Sat, 24 Sep 2016 03:02:55 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 03243160AD6; Sat, 24 Sep 2016 01:02:55 +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 16382160AD0 for ; Sat, 24 Sep 2016 03:02:53 +0200 (CEST) Received: (qmail 79960 invoked by uid 500); 24 Sep 2016 01:02:53 -0000 Mailing-List: contact commits-help@asterixdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@asterixdb.apache.org Delivered-To: mailing list commits@asterixdb.apache.org Received: (qmail 79949 invoked by uid 99); 24 Sep 2016 01:02:53 -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, 24 Sep 2016 01:02:53 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0EC8FE01C1; Sat, 24 Sep 2016 01:02:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: tillw@apache.org To: commits@asterixdb.apache.org Message-Id: <023ffddf3ca34aea9ed247c4325256ba@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: asterixdb git commit: Reduced logging Date: Sat, 24 Sep 2016 01:02:52 +0000 (UTC) archived-at: Sat, 24 Sep 2016 01:02:55 -0000 Repository: asterixdb Updated Branches: refs/heads/master 6762f03ec -> a1eb7533f Reduced logging Change-Id: I3a3756427999c4b79a01cd5a9cbfe79adf44b95b Reviewed-on: https://asterix-gerrit.ics.uci.edu/1204 Sonar-Qube: Jenkins Tested-by: Jenkins Integration-Tests: Jenkins Reviewed-by: Yingyi Bu Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/a1eb7533 Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/a1eb7533 Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/a1eb7533 Branch: refs/heads/master Commit: a1eb7533fb982bc7667dc685a7710d6490b00ac9 Parents: 6762f03 Author: Till Westmann Authored: Fri Sep 23 15:37:23 2016 -0700 Committer: Till Westmann Committed: Fri Sep 23 18:02:28 2016 -0700 ---------------------------------------------------------------------- .../asterix/app/translator/QueryTranslator.java | 4 ++- .../core/rewriter/base/HeuristicOptimizer.java | 2 +- .../MaterializingPipelinedPartition.java | 10 ++++--- .../storage/common/buffercache/BufferCache.java | 29 ++++++++++---------- 4 files changed, 25 insertions(+), 20 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a1eb7533/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java ---------------------------------------------------------------------- diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java index 5a45dd1..c196ecc 100644 --- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java +++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/translator/QueryTranslator.java @@ -2558,7 +2558,9 @@ public class QueryTranslator extends AbstractLangTranslator implements IStatemen sessionConfig.out().flush(); return; } else if (sessionConfig.isExecuteQuery() && compiled != null) { - GlobalConfig.ASTERIX_LOGGER.info(compiled.toJSON().toString(1)); + if (GlobalConfig.ASTERIX_LOGGER.isLoggable(Level.FINE)) { + GlobalConfig.ASTERIX_LOGGER.fine(compiled.toJSON().toString(1)); + } JobId jobId = JobUtils.runJob(hcc, compiled, false); JSONObject response = new JSONObject(); http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a1eb7533/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java index 4d72576..6de9969 100644 --- a/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java +++ b/hyracks-fullstack/algebricks/algebricks-core/src/main/java/org/apache/hyracks/algebricks/core/rewriter/base/HeuristicOptimizer.java @@ -82,7 +82,7 @@ public class HeuristicOptimizer { runOptimizationSets(plan, logicalRewrites); computeSchemaBottomUpForPlan(plan); runPhysicalOptimizations(plan, physicalRewrites); - logPlanAt("Optimized Plan", Level.INFO); + logPlanAt("Optimized Plan", Level.FINE); } private void logPlanAt(String name, Level lvl) throws AlgebricksException { http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a1eb7533/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/partitions/MaterializingPipelinedPartition.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/partitions/MaterializingPipelinedPartition.java b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/partitions/MaterializingPipelinedPartition.java index 7d90a8b..4713aa6 100644 --- a/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/partitions/MaterializingPipelinedPartition.java +++ b/hyracks-fullstack/hyracks/hyracks-control/hyracks-control-nc/src/main/java/org/apache/hyracks/control/nc/partitions/MaterializingPipelinedPartition.java @@ -62,6 +62,8 @@ public class MaterializingPipelinedPartition implements IFrameWriter, IPartition protected boolean flushRequest; + private Level openCloseLevel = Level.FINE; + public MaterializingPipelinedPartition(IHyracksTaskContext ctx, PartitionManager manager, PartitionId pid, TaskAttemptId taId, Executor executor) { this.ctx = ctx; @@ -159,8 +161,8 @@ public class MaterializingPipelinedPartition implements IFrameWriter, IPartition @Override public void open() throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("open(" + pid + " by " + taId); + if (LOGGER.isLoggable(openCloseLevel)) { + LOGGER.log(openCloseLevel, "open(" + pid + " by " + taId); } size = 0; eos = false; @@ -191,8 +193,8 @@ public class MaterializingPipelinedPartition implements IFrameWriter, IPartition @Override public void close() throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("close(" + pid + " by " + taId); + if (LOGGER.isLoggable(openCloseLevel)) { + LOGGER.log(openCloseLevel, "close(" + pid + " by " + taId); } synchronized (this) { eos = true; http://git-wip-us.apache.org/repos/asf/asterixdb/blob/a1eb7533/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java ---------------------------------------------------------------------- diff --git a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java index 1b75f94..28ba981 100644 --- a/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java +++ b/hyracks-fullstack/hyracks/hyracks-storage-common/src/main/java/org/apache/hyracks/storage/common/buffercache/BufferCache.java @@ -74,6 +74,7 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { private final Queue headerPageCache = new ConcurrentLinkedQueue<>(); //DEBUG + private Level fileOpsLevel = Level.FINE; private ArrayList confiscatedPages; private Lock confiscateLock; private HashMap confiscatedPagesOwner; @@ -789,8 +790,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { @Override public void createFile(FileReference fileRef) throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Creating file: " + fileRef + " in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Creating file: " + fileRef + " in cache: " + this); } synchronized (fileInfoMap) { fileMapManager.registerFile(fileRef); @@ -799,8 +800,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { @Override public int createMemFile() throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Creating memory file in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Creating memory file in cache: " + this); } int fileId; synchronized (fileInfoMap) { @@ -815,8 +816,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { @Override public void openFile(int fileId) throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Opening file: " + fileId + " in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Opening file: " + fileId + " in cache: " + this); } synchronized (fileInfoMap) { BufferedFileHandle fInfo; @@ -916,8 +917,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { @Override public void closeFile(int fileId) throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Closing file: " + fileId + " in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Closing file: " + fileId + " in cache: " + this); } if (LOGGER.isLoggable(Level.FINE)) { LOGGER.fine(dumpState()); @@ -932,8 +933,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { throw new HyracksDataException("Closed fileId: " + fileId + " more times than it was opened."); } } - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Closed file: " + fileId + " in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Closed file: " + fileId + " in cache: " + this); } } @@ -954,8 +955,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { @Override public synchronized void deleteFile(int fileId, boolean flushDirtyPages) throws HyracksDataException { - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Deleting file: " + fileId + " in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Deleting file: " + fileId + " in cache: " + this); } synchronized (fileInfoMap) { sweepAndFlush(fileId, flushDirtyPages); @@ -997,8 +998,8 @@ public class BufferCache implements IBufferCacheInternal, ILifeCycleComponent { @Override public synchronized void deleteMemFile(int fileId) throws HyracksDataException { //TODO: possible sanity chcecking here like in above? - if (LOGGER.isLoggable(Level.INFO)) { - LOGGER.info("Deleting memory file: " + fileId + " in cache: " + this); + if (LOGGER.isLoggable(fileOpsLevel)) { + LOGGER.log(fileOpsLevel, "Deleting memory file: " + fileId + " in cache: " + this); } synchronized (virtualFiles) { virtualFiles.remove(fileId);