Package cloudtrace.thrift

Examples of cloudtrace.thrift.RemoteSpan


  public Set<Long> visit(SpanTreeVisitor visitor) {
    Set<Long> visited = new HashSet<Long>();
    List<Long> root = parentChildren.get(new Long(Span.ROOT_SPAN_ID));
    if (root == null || root.isEmpty())
      return visited;
    RemoteSpan rootSpan = nodes.get(root.iterator().next());
    if (rootSpan == null)
      return visited;
    recurse(0, null, rootSpan, visitor, visited);
    return visited;
  }
View Full Code Here


    visited.add(node.spanId);
    List<RemoteSpan> children = new ArrayList<RemoteSpan>();
    List<Long> childrenIds = parentChildren.get(node.spanId);
    if (childrenIds != null) {
      for (Long childId : childrenIds) {
        RemoteSpan child = nodes.get(childId);
        if (child != null) {
          children.add(child);
        }
      }
    }
View Full Code Here

  private boolean printTimeStamps;
 
  public static RemoteSpan getRemoteSpan(Entry<Key,Value> entry) {
    TMemoryInputTransport transport = new TMemoryInputTransport(entry.getValue().get());
    TCompactProtocol protocol = new TCompactProtocol(transport);
    RemoteSpan span = new RemoteSpan();
    try {
      span.read(protocol);
    } catch (TException ex) {
      throw new RuntimeException(ex);
    }
    return span;
  }
View Full Code Here

  @Override
  public String next() {
    Entry<Key,Value> next = scanner.next();
    if (next.getKey().getColumnFamily().equals(SPAN_CF)) {
      StringBuilder result = new StringBuilder();
      RemoteSpan span = getRemoteSpan(next);
      result.append("----------------------\n");
      result.append(String.format(" %12s:%s\n", "name", span.description));
      result.append(String.format(" %12s:%s\n", "trace", Long.toHexString(span.traceId)));
      result.append(String.format(" %12s:%s\n", "loc", span.svc + "@" + span.sender));
      result.append(String.format(" %12s:%s\n", "span", Long.toHexString(span.spanId)));
View Full Code Here

TOP

Related Classes of cloudtrace.thrift.RemoteSpan

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.