asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: Reduced logging
Date Sat, 24 Sep 2016 01:02:52 GMT
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 <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>


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 <tillw@apache.org>
Authored: Fri Sep 23 15:37:23 2016 -0700
Committer: Till Westmann <tillw@apache.org>
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<BufferCacheHeaderHelper> headerPageCache = new ConcurrentLinkedQueue<>();
 
     //DEBUG
+    private Level fileOpsLevel = Level.FINE;
     private ArrayList<CachedPage> confiscatedPages;
     private Lock confiscateLock;
     private HashMap<CachedPage, StackTraceElement[]> 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);


Mime
View raw message