Examples of RemoteSpan


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

Examples of cloudtrace.thrift.RemoteSpan

    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

Examples of cloudtrace.thrift.RemoteSpan

  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

Examples of cloudtrace.thrift.RemoteSpan

  @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

Examples of org.apache.accumulo.cloudtrace.thrift.RemoteSpan

    Scanner scanner = conn.createScanner(TRACE_TABLE, conn.securityOperations().getUserAuthorizations(info.username));
    Range range = new Range(new Text("start:" + Long.toHexString(startTime)), new Text("start:" + Long.toHexString(endTime)));
    scanner.setRange(range);
    out.println("Trace            Day/Time                 (ms)  Start");
    for (Entry<Key,Value> entry : scanner) {
      RemoteSpan span = TraceFormatter.getRemoteSpan(entry);
      out.println(String.format("%016x %s %5d %s", span.traceId, TraceFormatter.formatDate(new Date(span.getStart())), span.stop - span.start, span.description));
    }
    return 0;
  }
View Full Code Here

Examples of org.apache.accumulo.cloudtrace.thrift.RemoteSpan

  public static int printTrace(Scanner scanner, final Printer out) {
    int count = 0;
    SpanTree tree = new SpanTree();
    long start = Long.MAX_VALUE;
    for (Entry<Key,Value> entry : scanner) {
      RemoteSpan span = TraceFormatter.getRemoteSpan(entry);
      tree.addNode(span);
      start = min(start, span.start);
      if (span.parentId <= 0)
        count++;
    }
View Full Code Here

Examples of org.apache.accumulo.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

Examples of org.apache.accumulo.cloudtrace.thrift.RemoteSpan

    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

Examples of org.apache.accumulo.cloudtrace.thrift.RemoteSpan

  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

Examples of org.apache.accumulo.cloudtrace.thrift.RemoteSpan

  public String next() {
    Entry<Key,Value> next = scanner.next();
    if (next.getKey().getColumnFamily().equals(SPAN_CF)) {
      StringBuilder result = new StringBuilder();
      SimpleDateFormat dateFormatter = new SimpleDateFormat(DATE_FORMAT);
      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
Copyright © 2018 www.massapi.com. 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.