accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [04/11] accumulo git commit: ACCUMULO-3866 Close the TraceScopes just in case.
Date Fri, 29 May 2015 01:28:52 GMT
ACCUMULO-3866 Close the TraceScopes just in case.


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/447d38bf
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/447d38bf
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/447d38bf

Branch: refs/heads/master
Commit: 447d38bf6159789e7402da278efed83f5573e4b8
Parents: 7c112a0
Author: Josh Elser <elserj@apache.org>
Authored: Thu May 28 19:52:05 2015 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Thu May 28 21:14:19 2015 -0400

----------------------------------------------------------------------
 core/src/main/java/org/apache/accumulo/core/trace/Trace.java      | 3 ++-
 .../src/main/java/org/apache/accumulo/trace/instrument/Trace.java | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/447d38bf/core/src/main/java/org/apache/accumulo/core/trace/Trace.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/trace/Trace.java b/core/src/main/java/org/apache/accumulo/core/trace/Trace.java
index 052c772..3ebd031 100644
--- a/core/src/main/java/org/apache/accumulo/core/trace/Trace.java
+++ b/core/src/main/java/org/apache/accumulo/core/trace/Trace.java
@@ -50,7 +50,8 @@ public class Trace {
     org.apache.htrace.Span span = org.apache.htrace.Trace.currentSpan();
     if (span != null) {
       span.stop();
-      org.apache.htrace.Tracer.getInstance().continueSpan(null);
+      // close() will no-op, but ensure safety if the implementation changes
+      org.apache.htrace.Tracer.getInstance().continueSpan(null).close();
     }
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/447d38bf/trace/src/main/java/org/apache/accumulo/trace/instrument/Trace.java
----------------------------------------------------------------------
diff --git a/trace/src/main/java/org/apache/accumulo/trace/instrument/Trace.java b/trace/src/main/java/org/apache/accumulo/trace/instrument/Trace.java
index 0d4b0cc..027fe8f 100644
--- a/trace/src/main/java/org/apache/accumulo/trace/instrument/Trace.java
+++ b/trace/src/main/java/org/apache/accumulo/trace/instrument/Trace.java
@@ -64,7 +64,8 @@ public class Trace extends org.apache.accumulo.core.trace.Trace {
   public static void endThread(Span span) {
     if (span != null) {
       span.stop();
-      org.apache.htrace.Tracer.getInstance().continueSpan(null);
+      // close() will no-op, but ensure safety if the implementation changes
+      org.apache.htrace.Tracer.getInstance().continueSpan(null).close();
     }
   }
 


Mime
View raw message