helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kisho...@apache.org
Subject git commit: REmoved unwnted log statement and reduced priority of loggib
Date Wed, 28 Nov 2012 07:30:30 GMT
Updated Branches:
  refs/heads/master 310431629 -> 64f7f2823


REmoved unwnted log statement and reduced priority of loggib


Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/64f7f282
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/64f7f282
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/64f7f282

Branch: refs/heads/master
Commit: 64f7f282309f111dab53ec418a475d1103a66ebc
Parents: 3104316
Author: Kishore Gopalakrishna <g.kishore@gmail.com>
Authored: Tue Nov 27 23:30:04 2012 -0800
Committer: Kishore Gopalakrishna <g.kishore@gmail.com>
Committed: Tue Nov 27 23:30:04 2012 -0800

----------------------------------------------------------------------
 .../controller/stages/StatsAggregationStage.java   |    4 +-
 .../apache/helix/manager/zk/CallbackHandler.java   |    2 +-
 .../helix/manager/zk/ZKHelixDataAccessor.java      |    5 +-
 .../helix/manager/zk/ZkBaseDataAccessor.java       |   24 ++++----
 .../java/org/apache/helix/manager/zk/ZkClient.java |   50 ++++++++-------
 .../java/org/apache/helix/model/IdealState.java    |    4 +-
 .../helix/monitoring/ZKPathDataDumpTask.java       |    1 -
 .../org/apache/helix/util/StatusUpdateUtil.java    |    9 ++-
 8 files changed, 53 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/controller/stages/StatsAggregationStage.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/controller/stages/StatsAggregationStage.java
b/helix-core/src/main/java/org/apache/helix/controller/stages/StatsAggregationStage.java
index d5c7c08..92c849c 100644
--- a/helix-core/src/main/java/org/apache/helix/controller/stages/StatsAggregationStage.java
+++ b/helix-core/src/main/java/org/apache/helix/controller/stages/StatsAggregationStage.java
@@ -172,7 +172,9 @@ public class StatsAggregationStage extends AbstractBaseStage
     }
     if (_statsHolder.getStatsList().size() == 0)
     {
-      logger.info("stat holder is empty");
+      if(logger.isTraceEnabled()){
+        logger.trace("stat holder is empty");
+      }
       return;
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java b/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
index f4492cd..61dd59a 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/CallbackHandler.java
@@ -223,7 +223,7 @@ public class CallbackHandler implements IZkChildListener, IZkDataListener
       {
         logger.info(Thread.currentThread().getId() + " END:INVOKE " + _path
             + " listener:" + _listener.getClass().getCanonicalName() + " Took: "
-            + (end - start));
+            + (end - start) +"ms");
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
index f3d5946..46274b8 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZKHelixDataAccessor.java
@@ -177,8 +177,9 @@ public class ZKHelixDataAccessor implements HelixDataAccessor, ControllerChangeL
         }
         else
         {
-          LOG.debug("getPropertyTransferUrl is null, skip updating the value");
-          // TODO: consider skip the write operation
+          if(LOG.isTraceEnabled()){
+            LOG.trace("getPropertyTransferUrl is null, skip updating the value");
+          }
           return true;
         }
       }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
index 7fd6209..77f33ce 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkBaseDataAccessor.java
@@ -405,9 +405,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T>
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("getData_async, size: " + paths.size() + ", paths: " + paths.get(0)
+        LOG.trace("getData_async, size: " + paths.size() + ", paths: " + paths.get(0)
           + ",... time: " + (endT - startT) + " ns");
       }
     }
@@ -673,9 +673,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T>
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("create_async, size: " + paths.size() + ", paths: " + paths.get(0)
+        LOG.trace("create_async, size: " + paths.size() + ", paths: " + paths.get(0)
           + ",... time: " + (endT - startT) + " ns");
       }
     }
@@ -840,9 +840,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T>
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.info("setData_async, size: " + paths.size() + ", paths: " + paths.get(0)
+        LOG.trace("setData_async, size: " + paths.size() + ", paths: " + paths.get(0)
           + ",... time: " + (endT - startT) + " ns");
       }
     }
@@ -1033,9 +1033,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T>
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.info("setData_async, size: " + paths.size() + ", paths: " + paths.get(0)
+        LOG.trace("setData_async, size: " + paths.size() + ", paths: " + paths.get(0)
           + ",... time: " + (endT - startT) + " ns");
       }
     }
@@ -1099,9 +1099,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T>
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.info("exists_async, size: " + paths.size() + ", paths: " + paths.get(0)
+        LOG.trace("exists_async, size: " + paths.size() + ", paths: " + paths.get(0)
           + ",... time: " + (endT - startT) + " ns");
       }
     }
@@ -1146,9 +1146,9 @@ public class ZkBaseDataAccessor<T> implements BaseDataAccessor<T>
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.info("delete_async, size: " + paths.size() + ", paths: " + paths.get(0)
+        LOG.trace("delete_async, size: " + paths.size() + ", paths: " + paths.get(0)
           + ",... time: " + (endT - startT) + " ns");
       }
     }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java
index f24fa84..7047708 100644
--- a/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java
+++ b/helix-core/src/main/java/org/apache/helix/manager/zk/ZkClient.java
@@ -64,9 +64,10 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
   {
     super(connection, connectionTimeout, new ByteArraySerializer());
     _zkSerializer = zkSerializer;
-
-    StackTraceElement[] calls = Thread.currentThread().getStackTrace();
-    LOG.info("create a new zkclient. " + Arrays.asList(calls));
+    if(LOG.isTraceEnabled()){
+      StackTraceElement[] calls = Thread.currentThread().getStackTrace();
+      LOG.info("create a new zkclient. " + Arrays.asList(calls));
+    }
   }
 
   public ZkClient(IZkConnection connection, int connectionTimeout,
@@ -136,11 +137,12 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
   @Override
   public void close() throws ZkInterruptedException
   {
-    StackTraceElement[] calls = Thread.currentThread().getStackTrace();
-    LOG.info("closing a zkclient. zookeeper: "
-        + (_connection == null ? "null" : ((ZkConnection) _connection).getZookeeper())
-        + ", callStack: " + Arrays.asList(calls));
-
+    if(LOG.isTraceEnabled()){
+      StackTraceElement[] calls = Thread.currentThread().getStackTrace();
+      LOG.trace("closing a zkclient. zookeeper: "
+          + (_connection == null ? "null" : ((ZkConnection) _connection).getZookeeper())
+          + ", callStack: " + Arrays.asList(calls));
+    }
     super.close();
   }
 
@@ -166,9 +168,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("exists, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("exists, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }
@@ -193,9 +195,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("exists, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("exists, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }
@@ -220,9 +222,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("getChildren, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("getChildren, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }
@@ -261,9 +263,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("getData, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("getData, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }
@@ -320,9 +322,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("setData, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("setData, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }
@@ -347,9 +349,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long end = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("setData, path: " + path + ", time: " + (end - start) + " ns");
+        LOG.trace("setData, path: " + path + ", time: " + (end - start) + " ns");
       }
     }
   }
@@ -383,9 +385,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("create, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("create, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }
@@ -419,9 +421,9 @@ public class ZkClient extends org.I0Itec.zkclient.ZkClient
     finally
     {
       long endT = System.nanoTime();
-      if (LOG.isDebugEnabled())
+      if (LOG.isTraceEnabled())
       {
-        LOG.debug("delete, path: " + path + ", time: " + (endT - startT) + " ns");
+        LOG.trace("delete, path: " + path + ", time: " + (endT - startT) + " ns");
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/model/IdealState.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/model/IdealState.java b/helix-core/src/main/java/org/apache/helix/model/IdealState.java
index ad629f0..f1121fe 100644
--- a/helix-core/src/main/java/org/apache/helix/model/IdealState.java
+++ b/helix-core/src/main/java/org/apache/helix/model/IdealState.java
@@ -226,7 +226,7 @@ public class IdealState extends HelixProperty
               .getListField(firstPartition).size());
         }
         logger
-            .warn("could NOT found replicas in idealState. Use size of the first list instead.
replica: "
+            .warn("could NOT find number of replicas in idealState. Use size of the first
list instead. replica: "
                 + replica + ", 1st partition: " + firstPartition);
         break;
       case CUSTOMIZED:
@@ -241,7 +241,7 @@ public class IdealState extends HelixProperty
               .getMapField(firstPartition).size());
         }
         logger
-            .warn("could NOT found replicas in idealState. Use size of the first map instead.
replica: "
+            .warn("could NOT find replicas in idealState. Use size of the first map instead.
replica: "
                 + replica + ", 1st partition: " + firstPartition);
         break;
       default:

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/monitoring/ZKPathDataDumpTask.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/monitoring/ZKPathDataDumpTask.java
b/helix-core/src/main/java/org/apache/helix/monitoring/ZKPathDataDumpTask.java
index 6a57303..4fa6ab5 100644
--- a/helix-core/src/main/java/org/apache/helix/monitoring/ZKPathDataDumpTask.java
+++ b/helix-core/src/main/java/org/apache/helix/monitoring/ZKPathDataDumpTask.java
@@ -85,7 +85,6 @@ public class ZKPathDataDumpTask extends TimerTask
     } catch (Exception e)
     {
       logger.error(e);
-      e.printStackTrace();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/64f7f282/helix-core/src/main/java/org/apache/helix/util/StatusUpdateUtil.java
----------------------------------------------------------------------
diff --git a/helix-core/src/main/java/org/apache/helix/util/StatusUpdateUtil.java b/helix-core/src/main/java/org/apache/helix/util/StatusUpdateUtil.java
index c2750e5..eed4909 100644
--- a/helix-core/src/main/java/org/apache/helix/util/StatusUpdateUtil.java
+++ b/helix-core/src/main/java/org/apache/helix/util/StatusUpdateUtil.java
@@ -507,9 +507,10 @@ public class StatusUpdateUtil
 
         // For now write participant StatusUpdates to log4j. 
         // we are using restlet as another data channel to report to controller.
-        
-        _logger.info("StatusUpdate path:" + propertyKey.getPath() + ", updates:"
+        if(_logger.isTraceEnabled()){
+           _logger.trace("StatusUpdate path:" + propertyKey.getPath() + ", updates:"
               + statusUpdateRecord);
+        }
         accessor.updateProperty(propertyKey, new StatusUpdate(statusUpdateRecord));
         
       }
@@ -532,7 +533,9 @@ public class StatusUpdateUtil
                                            statusUpdateKey);
       // For now write participant StatusUpdates to log4j. 
       // we are using restlet as another data channel to report to controller.
-      _logger.info("StatusUpdate path:" + propertyKey.getPath() + ", updates:" + record);
+      if(_logger.isTraceEnabled()){
+        _logger.trace("StatusUpdate path:" + propertyKey.getPath() + ", updates:" + record);
+      }
       accessor.updateProperty(propertyKey, new StatusUpdate(record));
     }
 


Mime
View raw message