This is an automated email from the ASF dual-hosted git repository.

eyang pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new d023663  HDDS-1833. Moved RefCountedDB stacktrace to log level trace.  
          Contributed by Siddharth Wagle
d023663 is described below

commit d023663e3e2038ff73e9f1f8d931c8946adb048e
Author: Eric Yang <ey...@apache.org>
AuthorDate: Mon Jul 29 12:05:24 2019 -0400

    HDDS-1833. Moved RefCountedDB stacktrace to log level trace.
               Contributed by Siddharth Wagle
---
 .../ozone/container/common/utils/ReferenceCountedDB.java | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git 
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/ReferenceCountedDB.java
 
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/ReferenceCountedDB.java
index 81cde5b..819f22c 100644
--- 
a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/ReferenceCountedDB.java
+++ 
b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/utils/ReferenceCountedDB.java
@@ -19,6 +19,8 @@
 package org.apache.hadoop.ozone.container.common.utils;
 
 import com.google.common.base.Preconditions;
+
+import org.apache.commons.lang.exception.ExceptionUtils;
 import org.apache.hadoop.utils.MetadataStore;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -52,20 +54,18 @@ public class ReferenceCountedDB implements Closeable {
 
   public void incrementReference() {
     this.referenceCount.incrementAndGet();
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("IncRef {} to refCnt {} \n", containerDBPath,
-          referenceCount.get());
-      new Exception().printStackTrace();
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("IncRef {} to refCnt {}, stackTrace: {}", containerDBPath,
+          referenceCount.get(), ExceptionUtils.getStackTrace(new Throwable()));
     }
   }
 
   public void decrementReference() {
     int refCount = this.referenceCount.decrementAndGet();
     Preconditions.checkArgument(refCount >= 0, "refCount:", refCount);
-    if (LOG.isDebugEnabled()) {
-      LOG.debug("DecRef {} to refCnt {} \n", containerDBPath,
-          referenceCount.get());
-      new Exception().printStackTrace();
+    if (LOG.isTraceEnabled()) {
+      LOG.trace("DecRef {} to refCnt {}, stackTrace: {}", containerDBPath,
+          referenceCount.get(), ExceptionUtils.getStackTrace(new Throwable()));
     }
   }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to