accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bil...@apache.org
Subject accumulo git commit: ACCUMULO-3760 make kv data in RemoteSpan strings instead of binary and remove unused methods of internal Span wrapper
Date Wed, 29 Apr 2015 00:24:57 GMT
Repository: accumulo
Updated Branches:
  refs/heads/1.7 42588869a -> f99638795


ACCUMULO-3760 make kv data in RemoteSpan strings instead of binary and remove unused methods
of internal Span wrapper


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

Branch: refs/heads/1.7
Commit: f9963879503b5a9b4db9e29aad5bb004c4bb08d6
Parents: 4258886
Author: Billie Rinaldi <billie@apache.org>
Authored: Tue Apr 28 17:24:30 2015 -0700
Committer: Billie Rinaldi <billie@apache.org>
Committed: Tue Apr 28 17:24:30 2015 -0700

----------------------------------------------------------------------
 .../org/apache/accumulo/core/trace/Span.java    | 87 +-------------------
 .../gc/GarbageCollectWriteAheadLogs.java        |  2 +-
 .../monitor/servlets/trace/ShowTrace.java       | 10 +--
 .../accumulo/monitor/ShowTraceLinkTypeTest.java |  3 +-
 .../accumulo/tracer/AsyncSpanReceiver.java      | 13 +--
 .../accumulo/tracer/SendSpansViaThrift.java     |  9 +-
 .../apache/accumulo/tracer/TraceFormatter.java  |  9 +-
 .../apache/accumulo/tracer/ZooTraceClient.java  |  3 +-
 .../accumulo/tracer/thrift/RemoteSpan.java      | 68 +++++++--------
 server/tracer/src/main/thrift/tracer.thrift     |  4 +-
 .../apache/accumulo/trace/instrument/Span.java  | 20 +++--
 11 files changed, 70 insertions(+), 158 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/core/src/main/java/org/apache/accumulo/core/trace/Span.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/trace/Span.java b/core/src/main/java/org/apache/accumulo/core/trace/Span.java
index 702c9c1..412feec 100644
--- a/core/src/main/java/org/apache/accumulo/core/trace/Span.java
+++ b/core/src/main/java/org/apache/accumulo/core/trace/Span.java
@@ -17,18 +17,14 @@
 package org.apache.accumulo.core.trace;
 
 import org.apache.htrace.NullScope;
-import org.apache.htrace.TimelineAnnotation;
 import org.apache.htrace.TraceScope;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
-import java.util.List;
-import java.util.Map;
-
 /**
  * This is a wrapper for a TraceScope object, which is a wrapper for a Span and its parent.
Not recommended for client use.
  */
-public class Span implements org.apache.htrace.Span {
+public class Span {
   public static final Span NULL_SPAN = new Span(NullScope.INSTANCE);
   private TraceScope scope = null;
   protected org.apache.htrace.Span span = null;
@@ -59,7 +55,6 @@ public class Span implements org.apache.htrace.Span {
       span.addKVAnnotation(k.getBytes(UTF_8), v.getBytes(UTF_8));
   }
 
-  @Override
   public void stop() {
     if (scope == null) {
       if (span != null) {
@@ -69,84 +64,4 @@ public class Span implements org.apache.htrace.Span {
       scope.close();
     }
   }
-
-  @Override
-  public long getStartTimeMillis() {
-    return span.getStartTimeMillis();
-  }
-
-  @Override
-  public long getStopTimeMillis() {
-    return span.getStopTimeMillis();
-  }
-
-  @Override
-  public long getAccumulatedMillis() {
-    return span.getAccumulatedMillis();
-  }
-
-  @Override
-  public boolean isRunning() {
-    return span.isRunning();
-  }
-
-  @Override
-  public String getDescription() {
-    return span.getDescription();
-  }
-
-  @Override
-  public long getSpanId() {
-    return span.getSpanId();
-  }
-
-  @Override
-  public long getTraceId() {
-    return span.getTraceId();
-  }
-
-  @Override
-  public Span child(String s) {
-    return new Span(span.child(s));
-  }
-
-  @Override
-  public long getParentId() {
-    return span.getParentId();
-  }
-
-  @Override
-  public void addKVAnnotation(byte[] k, byte[] v) {
-    span.addKVAnnotation(k, v);
-  }
-
-  @Override
-  public void addTimelineAnnotation(String s) {
-    span.addTimelineAnnotation(s);
-  }
-
-  @Override
-  public Map<byte[],byte[]> getKVAnnotations() {
-    return span.getKVAnnotations();
-  }
-
-  @Override
-  public List<TimelineAnnotation> getTimelineAnnotations() {
-    return span.getTimelineAnnotations();
-  }
-
-  @Override
-  public String getProcessId() {
-    return span.getProcessId();
-  }
-
-  @Override
-  public String toJson() {
-    return span.toJson();
-  }
-
-  @Override
-  public String toString() {
-    return span.toString();
-  }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
----------------------------------------------------------------------
diff --git a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
index 9f537af..a9a3f65 100644
--- a/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
+++ b/server/gc/src/main/java/org/apache/accumulo/gc/GarbageCollectWriteAheadLogs.java
@@ -50,6 +50,7 @@ import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.replication.ReplicationTableOfflineException;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.tabletserver.log.LogEntry;
+import org.apache.accumulo.core.trace.Span;
 import org.apache.accumulo.core.trace.Trace;
 import org.apache.accumulo.core.volume.Volume;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
@@ -71,7 +72,6 @@ import org.apache.hadoop.fs.LocatedFileStatus;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.RemoteIterator;
 import org.apache.hadoop.io.Text;
-import org.apache.htrace.Span;
 import org.apache.zookeeper.KeeperException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTrace.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTrace.java
b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTrace.java
index a4a67d7..ab9bd95 100644
--- a/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTrace.java
+++ b/server/monitor/src/main/java/org/apache/accumulo/monitor/servlets/trace/ShowTrace.java
@@ -17,9 +17,7 @@
 package org.apache.accumulo.monitor.servlets.trace;
 
 import static java.lang.Math.min;
-import static java.nio.charset.StandardCharsets.UTF_8;
 
-import java.nio.ByteBuffer;
 import java.security.PrivilegedAction;
 import java.util.Collection;
 import java.util.Map.Entry;
@@ -167,11 +165,9 @@ public class ShowTrace extends Basic {
       sb.append("  <table class='indent,noborder'>\n");
       if (hasData) {
         sb.append("  <tr><th>Key</th><th>Value</th></tr>\n");
-        for (Entry<ByteBuffer,ByteBuffer> entry : node.data.entrySet()) {
-          String key = new String(entry.getKey().array(), entry.getKey().arrayOffset(), entry.getKey().limit(),
UTF_8);
-          String value = new String(entry.getValue().array(), entry.getValue().arrayOffset(),
entry.getValue().limit(), UTF_8);
-          sb.append("  <tr><td>" + BasicServlet.sanitize(key) + "</td>");
-          sb.append("<td>" + BasicServlet.sanitize(value) + "</td></tr>\n");
+        for (Entry<String,String> entry : node.data.entrySet()) {
+          sb.append("  <tr><td>" + BasicServlet.sanitize(entry.getKey()) + "</td>");
+          sb.append("<td>" + BasicServlet.sanitize(entry.getValue()) + "</td></tr>\n");
         }
       }
       if (hasAnnotations) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/monitor/src/test/java/org/apache/accumulo/monitor/ShowTraceLinkTypeTest.java
----------------------------------------------------------------------
diff --git a/server/monitor/src/test/java/org/apache/accumulo/monitor/ShowTraceLinkTypeTest.java
b/server/monitor/src/test/java/org/apache/accumulo/monitor/ShowTraceLinkTypeTest.java
index b4840a7..e7e5a16 100644
--- a/server/monitor/src/test/java/org/apache/accumulo/monitor/ShowTraceLinkTypeTest.java
+++ b/server/monitor/src/test/java/org/apache/accumulo/monitor/ShowTraceLinkTypeTest.java
@@ -16,7 +16,6 @@
  */
 package org.apache.accumulo.monitor;
 
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.Collections;
 
@@ -27,7 +26,7 @@ import org.junit.Test;
 
 public class ShowTraceLinkTypeTest {
   private static RemoteSpan rs(long start, long stop, String description) {
-    return new RemoteSpan("sender", "svc", 0l, 0l, 0l, start, stop, description, Collections.<ByteBuffer,ByteBuffer>
emptyMap(),
+    return new RemoteSpan("sender", "svc", 0l, 0l, 0l, start, stop, description, Collections.<String,String>
emptyMap(),
         Collections.<Annotation> emptyList());
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
index 34a75d5..0ade243 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/AsyncSpanReceiver.java
@@ -18,7 +18,6 @@ package org.apache.accumulo.tracer;
 
 import java.net.InetAddress;
 import java.net.UnknownHostException;
-import java.nio.ByteBuffer;
 import java.util.AbstractQueue;
 import java.util.ArrayList;
 import java.util.HashMap;
@@ -39,6 +38,8 @@ import org.apache.htrace.TimelineAnnotation;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 /**
  * Deliver Span information periodically to a destination.
  * <ul>
@@ -64,7 +65,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements
SpanRece
 
   protected abstract void send(Destination resource, RemoteSpan span) throws Exception;
 
-  protected abstract SpanKey getSpanKey(Map<ByteBuffer,ByteBuffer> data);
+  protected abstract SpanKey getSpanKey(Map<String,String> data);
 
   Timer timer = new Timer("SpanSender", true);
   protected final AbstractQueue<RemoteSpan> sendQueue = new ConcurrentLinkedQueue<RemoteSpan>();
@@ -140,12 +141,12 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements
SpanRece
     }
   }
 
-  public static Map<ByteBuffer,ByteBuffer> convertToByteBuffers(Map<byte[],byte[]>
bytesMap) {
+  public static Map<String,String> convertToStrings(Map<byte[],byte[]> bytesMap)
{
     if (bytesMap == null)
       return null;
-    Map<ByteBuffer,ByteBuffer> result = new HashMap<ByteBuffer,ByteBuffer>();
+    Map<String,String> result = new HashMap<>();
     for (Entry<byte[],byte[]> bytes : bytesMap.entrySet()) {
-      result.put(ByteBuffer.wrap(bytes.getKey()), ByteBuffer.wrap(bytes.getValue()));
+      result.put(new String(bytes.getKey(), UTF_8), new String(bytes.getValue(), UTF_8));
     }
     return result;
   }
@@ -162,7 +163,7 @@ public abstract class AsyncSpanReceiver<SpanKey,Destination> implements
SpanRece
 
   @Override
   public void receiveSpan(Span s) {
-    Map<ByteBuffer,ByteBuffer> data = convertToByteBuffers(s.getKVAnnotations());
+    Map<String,String> data = convertToStrings(s.getKVAnnotations());
 
     SpanKey dest = getSpanKey(data);
     if (dest != null) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/tracer/src/main/java/org/apache/accumulo/tracer/SendSpansViaThrift.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/SendSpansViaThrift.java
b/server/tracer/src/main/java/org/apache/accumulo/tracer/SendSpansViaThrift.java
index 3cc762e..0f2fbaa 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/SendSpansViaThrift.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/SendSpansViaThrift.java
@@ -16,12 +16,9 @@
  */
 package org.apache.accumulo.tracer;
 
-import static java.nio.charset.StandardCharsets.UTF_8;
-
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.net.Socket;
-import java.nio.ByteBuffer;
 import java.util.Map;
 
 import org.apache.accumulo.tracer.thrift.RemoteSpan;
@@ -84,11 +81,11 @@ public class SendSpansViaThrift extends AsyncSpanReceiver<String,Client>
{
     }
   }
 
-  private static final ByteBuffer DEST = ByteBuffer.wrap("dest".getBytes(UTF_8));
+  private static final String DEST = "dest";
 
   @Override
-  protected String getSpanKey(Map<ByteBuffer,ByteBuffer> data) {
-    String dest = new String(data.get(DEST).array());
+  protected String getSpanKey(Map<String,String> data) {
+    String dest = data.get(DEST);
     if (dest != null && dest.startsWith(THRIFT)) {
       String hostAddress = dest.substring(THRIFT.length());
       String[] hostAddr = hostAddress.split(":", 2);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceFormatter.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceFormatter.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceFormatter.java
index 0ec93b4..48ec8cf 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceFormatter.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/TraceFormatter.java
@@ -16,9 +16,6 @@
  */
 package org.apache.accumulo.tracer;
 
-import static java.nio.charset.StandardCharsets.UTF_8;
-
-import java.nio.ByteBuffer;
 import java.text.SimpleDateFormat;
 import java.util.Date;
 import java.util.Iterator;
@@ -92,10 +89,8 @@ public class TraceFormatter implements Formatter {
       result.append(String.format(" %12s:%s%n", "start", dateFormatter.format(span.start)));
       result.append(String.format(" %12s:%s%n", "ms", span.stop - span.start));
       if (span.data != null) {
-        for (Entry<ByteBuffer,ByteBuffer> entry : span.data.entrySet()) {
-          String key = new String(entry.getKey().array(), entry.getKey().arrayOffset(), entry.getKey().limit(),
UTF_8);
-          String value = new String(entry.getValue().array(), entry.getValue().arrayOffset(),
entry.getValue().limit(), UTF_8);
-          result.append(String.format(" %12s:%s%n", key, value));
+        for (Entry<String,String> entry : span.data.entrySet()) {
+          result.append(String.format(" %12s:%s%n", entry.getKey(), entry.getValue()));
         }
       }
       if (span.annotations != null) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/tracer/src/main/java/org/apache/accumulo/tracer/ZooTraceClient.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/ZooTraceClient.java b/server/tracer/src/main/java/org/apache/accumulo/tracer/ZooTraceClient.java
index 8011a59..3cfc5bc 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/ZooTraceClient.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/ZooTraceClient.java
@@ -18,7 +18,6 @@ package org.apache.accumulo.tracer;
 
 import static java.nio.charset.StandardCharsets.UTF_8;
 
-import java.nio.ByteBuffer;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
@@ -76,7 +75,7 @@ public class ZooTraceClient extends SendSpansViaThrift implements Watcher
{
   }
 
   @Override
-  synchronized protected String getSpanKey(Map<ByteBuffer,ByteBuffer> data) {
+  synchronized protected String getSpanKey(Map<String,String> data) {
     if (hosts.size() > 0) {
       String host = hosts.get(random.nextInt(hosts.size()));
       return host;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
index 0b19554..285aebd 100644
--- a/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
+++ b/server/tracer/src/main/java/org/apache/accumulo/tracer/thrift/RemoteSpan.java
@@ -59,8 +59,8 @@ import org.slf4j.LoggerFactory;
   private static final org.apache.thrift.protocol.TField START_FIELD_DESC = new org.apache.thrift.protocol.TField("start",
org.apache.thrift.protocol.TType.I64, (short)6);
   private static final org.apache.thrift.protocol.TField STOP_FIELD_DESC = new org.apache.thrift.protocol.TField("stop",
org.apache.thrift.protocol.TType.I64, (short)7);
   private static final org.apache.thrift.protocol.TField DESCRIPTION_FIELD_DESC = new org.apache.thrift.protocol.TField("description",
org.apache.thrift.protocol.TType.STRING, (short)8);
-  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data",
org.apache.thrift.protocol.TType.MAP, (short)10);
-  private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations",
org.apache.thrift.protocol.TType.LIST, (short)11);
+  private static final org.apache.thrift.protocol.TField DATA_FIELD_DESC = new org.apache.thrift.protocol.TField("data",
org.apache.thrift.protocol.TType.MAP, (short)9);
+  private static final org.apache.thrift.protocol.TField ANNOTATIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("annotations",
org.apache.thrift.protocol.TType.LIST, (short)10);
 
   private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
new HashMap<Class<? extends IScheme>, SchemeFactory>();
   static {
@@ -76,7 +76,7 @@ import org.slf4j.LoggerFactory;
   public long start; // required
   public long stop; // required
   public String description; // required
-  public Map<ByteBuffer,ByteBuffer> data; // required
+  public Map<String,String> data; // required
   public List<Annotation> annotations; // required
 
   /** The set of fields this struct contains, along with convenience methods for finding
and manipulating them. */
@@ -89,8 +89,8 @@ import org.slf4j.LoggerFactory;
     START((short)6, "start"),
     STOP((short)7, "stop"),
     DESCRIPTION((short)8, "description"),
-    DATA((short)10, "data"),
-    ANNOTATIONS((short)11, "annotations");
+    DATA((short)9, "data"),
+    ANNOTATIONS((short)10, "annotations");
 
     private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
 
@@ -121,9 +121,9 @@ import org.slf4j.LoggerFactory;
           return STOP;
         case 8: // DESCRIPTION
           return DESCRIPTION;
-        case 10: // DATA
+        case 9: // DATA
           return DATA;
-        case 11: // ANNOTATIONS
+        case 10: // ANNOTATIONS
           return ANNOTATIONS;
         default:
           return null;
@@ -192,8 +192,8 @@ import org.slf4j.LoggerFactory;
         new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
     tmpMap.put(_Fields.DATA, new org.apache.thrift.meta_data.FieldMetaData("data", org.apache.thrift.TFieldRequirementType.DEFAULT,

         new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,

-            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING
           , true), 
-            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING
           , true))));
+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),

+            new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
     tmpMap.put(_Fields.ANNOTATIONS, new org.apache.thrift.meta_data.FieldMetaData("annotations",
org.apache.thrift.TFieldRequirementType.DEFAULT, 
         new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,

             new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
Annotation.class))));
@@ -213,7 +213,7 @@ import org.slf4j.LoggerFactory;
     long start,
     long stop,
     String description,
-    Map<ByteBuffer,ByteBuffer> data,
+    Map<String,String> data,
     List<Annotation> annotations)
   {
     this();
@@ -254,7 +254,7 @@ import org.slf4j.LoggerFactory;
       this.description = other.description;
     }
     if (other.isSetData()) {
-      Map<ByteBuffer,ByteBuffer> __this__data = new HashMap<ByteBuffer,ByteBuffer>(other.data);
+      Map<String,String> __this__data = new HashMap<String,String>(other.data);
       this.data = __this__data;
     }
     if (other.isSetAnnotations()) {
@@ -480,18 +480,18 @@ import org.slf4j.LoggerFactory;
     return (this.data == null) ? 0 : this.data.size();
   }
 
-  public void putToData(ByteBuffer key, ByteBuffer val) {
+  public void putToData(String key, String val) {
     if (this.data == null) {
-      this.data = new HashMap<ByteBuffer,ByteBuffer>();
+      this.data = new HashMap<String,String>();
     }
     this.data.put(key, val);
   }
 
-  public Map<ByteBuffer,ByteBuffer> getData() {
+  public Map<String,String> getData() {
     return this.data;
   }
 
-  public RemoteSpan setData(Map<ByteBuffer,ByteBuffer> data) {
+  public RemoteSpan setData(Map<String,String> data) {
     this.data = data;
     return this;
   }
@@ -620,7 +620,7 @@ import org.slf4j.LoggerFactory;
       if (value == null) {
         unsetData();
       } else {
-        setData((Map<ByteBuffer,ByteBuffer>)value);
+        setData((Map<String,String>)value);
       }
       break;
 
@@ -1109,17 +1109,17 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 10: // DATA
+          case 9: // DATA
             if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
               {
                 org.apache.thrift.protocol.TMap _map0 = iprot.readMapBegin();
-                struct.data = new HashMap<ByteBuffer,ByteBuffer>(2*_map0.size);
+                struct.data = new HashMap<String,String>(2*_map0.size);
                 for (int _i1 = 0; _i1 < _map0.size; ++_i1)
                 {
-                  ByteBuffer _key2;
-                  ByteBuffer _val3;
-                  _key2 = iprot.readBinary();
-                  _val3 = iprot.readBinary();
+                  String _key2;
+                  String _val3;
+                  _key2 = iprot.readString();
+                  _val3 = iprot.readString();
                   struct.data.put(_key2, _val3);
                 }
                 iprot.readMapEnd();
@@ -1129,7 +1129,7 @@ import org.slf4j.LoggerFactory;
               org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
             }
             break;
-          case 11: // ANNOTATIONS
+          case 10: // ANNOTATIONS
             if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
               {
                 org.apache.thrift.protocol.TList _list4 = iprot.readListBegin();
@@ -1197,10 +1197,10 @@ import org.slf4j.LoggerFactory;
         oprot.writeFieldBegin(DATA_FIELD_DESC);
         {
           oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
org.apache.thrift.protocol.TType.STRING, struct.data.size()));
-          for (Map.Entry<ByteBuffer, ByteBuffer> _iter7 : struct.data.entrySet())
+          for (Map.Entry<String, String> _iter7 : struct.data.entrySet())
           {
-            oprot.writeBinary(_iter7.getKey());
-            oprot.writeBinary(_iter7.getValue());
+            oprot.writeString(_iter7.getKey());
+            oprot.writeString(_iter7.getValue());
           }
           oprot.writeMapEnd();
         }
@@ -1294,10 +1294,10 @@ import org.slf4j.LoggerFactory;
       if (struct.isSetData()) {
         {
           oprot.writeI32(struct.data.size());
-          for (Map.Entry<ByteBuffer, ByteBuffer> _iter9 : struct.data.entrySet())
+          for (Map.Entry<String, String> _iter9 : struct.data.entrySet())
           {
-            oprot.writeBinary(_iter9.getKey());
-            oprot.writeBinary(_iter9.getValue());
+            oprot.writeString(_iter9.getKey());
+            oprot.writeString(_iter9.getValue());
           }
         }
       }
@@ -1351,13 +1351,13 @@ import org.slf4j.LoggerFactory;
       if (incoming.get(8)) {
         {
           org.apache.thrift.protocol.TMap _map11 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
org.apache.thrift.protocol.TType.STRING, iprot.readI32());
-          struct.data = new HashMap<ByteBuffer,ByteBuffer>(2*_map11.size);
+          struct.data = new HashMap<String,String>(2*_map11.size);
           for (int _i12 = 0; _i12 < _map11.size; ++_i12)
           {
-            ByteBuffer _key13;
-            ByteBuffer _val14;
-            _key13 = iprot.readBinary();
-            _val14 = iprot.readBinary();
+            String _key13;
+            String _val14;
+            _key13 = iprot.readString();
+            _val14 = iprot.readString();
             struct.data.put(_key13, _val14);
           }
         }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/server/tracer/src/main/thrift/tracer.thrift
----------------------------------------------------------------------
diff --git a/server/tracer/src/main/thrift/tracer.thrift b/server/tracer/src/main/thrift/tracer.thrift
index 19350fb..4802c89 100644
--- a/server/tracer/src/main/thrift/tracer.thrift
+++ b/server/tracer/src/main/thrift/tracer.thrift
@@ -33,8 +33,8 @@ struct RemoteSpan {
    6:i64 start, 
    7:i64 stop, 
    8:string description, 
-   10:map<binary, binary> data,
-   11:list<Annotation> annotations
+   9:map<string, string> data,
+   10:list<Annotation> annotations
 }
 
 service SpanReceiver {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/f9963879/trace/src/main/java/org/apache/accumulo/trace/instrument/Span.java
----------------------------------------------------------------------
diff --git a/trace/src/main/java/org/apache/accumulo/trace/instrument/Span.java b/trace/src/main/java/org/apache/accumulo/trace/instrument/Span.java
index 2004623..8e70e33 100644
--- a/trace/src/main/java/org/apache/accumulo/trace/instrument/Span.java
+++ b/trace/src/main/java/org/apache/accumulo/trace/instrument/Span.java
@@ -52,23 +52,33 @@ public class Span extends org.apache.accumulo.core.trace.Span implements
Cloudtr
   }
 
   @Override
+  public long getStartTimeMillis() {
+    return span.getStartTimeMillis();
+  }
+
+  @Override
+  public long getStopTimeMillis() {
+    return span.getStopTimeMillis();
+  }
+
+  @Override
   public long accumulatedMillis() {
-    return getAccumulatedMillis();
+    return span.getAccumulatedMillis();
   }
 
   @Override
   public boolean running() {
-    return isRunning();
+    return span.isRunning();
   }
 
   @Override
   public String description() {
-    return getDescription();
+    return span.getDescription();
   }
 
   @Override
   public long spanId() {
-    return getSpanId();
+    return span.getSpanId();
   }
 
   @Override
@@ -78,7 +88,7 @@ public class Span extends org.apache.accumulo.core.trace.Span implements
Cloudtr
 
   @Override
   public long parentId() {
-    return getParentId();
+    return span.getParentId();
   }
 
   @Override


Mime
View raw message