accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject git commit: ACCUMULO-3132 get TInfo out of TraceRepo
Date Tue, 16 Sep 2014 21:53:28 GMT
Repository: accumulo
Updated Branches:
  refs/heads/master 58558e741 -> 498f32bdf


ACCUMULO-3132 get TInfo out of TraceRepo


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

Branch: refs/heads/master
Commit: 498f32bdf32ca563abbfb98cd0db60a8cf093184
Parents: 58558e7
Author: Eric C. Newton <eric.newton@gmail.com>
Authored: Tue Sep 16 17:52:24 2014 -0400
Committer: Eric C. Newton <eric.newton@gmail.com>
Committed: Tue Sep 16 17:52:55 2014 -0400

----------------------------------------------------------------------
 .../org/apache/accumulo/master/tableOps/TraceRepo.java | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/498f32bd/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
----------------------------------------------------------------------
diff --git a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
index dd691b4..9b1a735 100644
--- a/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
+++ b/server/master/src/main/java/org/apache/accumulo/master/tableOps/TraceRepo.java
@@ -29,17 +29,20 @@ public class TraceRepo<T> implements Repo<T> {
   
   private static final long serialVersionUID = 1L;
   
-  TInfo tinfo;
+  long traceId;
+  long parentId;
   Repo<T> repo;
   
   public TraceRepo(Repo<T> repo) {
     this.repo = repo;
-    tinfo = Tracer.traceInfo();
+    TInfo tinfo = Tracer.traceInfo();
+    traceId = tinfo.traceId;
+    parentId = tinfo.parentId;
   }
   
   @Override
   public long isReady(long tid, T environment) throws Exception {
-    Span span = Trace.trace(tinfo, repo.getDescription());
+    Span span = Trace.trace(new TInfo(traceId, parentId), repo.getDescription());
     try {
       return repo.isReady(tid, environment);
     } finally {
@@ -49,7 +52,7 @@ public class TraceRepo<T> implements Repo<T> {
   
   @Override
   public Repo<T> call(long tid, T environment) throws Exception {
-    Span span = Trace.trace(tinfo, repo.getDescription());
+    Span span = Trace.trace(new TInfo(traceId, parentId), repo.getDescription());
     try {
       Repo<T> result = repo.call(tid, environment);
       if (result == null)
@@ -62,7 +65,7 @@ public class TraceRepo<T> implements Repo<T> {
   
   @Override
   public void undo(long tid, T environment) throws Exception {
-    Span span = Trace.trace(tinfo, repo.getDescription());
+    Span span = Trace.trace(new TInfo(traceId, parentId), repo.getDescription());
     try {
       repo.undo(tid, environment);
     } finally {


Mime
View raw message