private static Map<String, Node> indexSpansById(final Collection<SpanData> spans) {
    final Map<String, Node> spansById = new HashMap<>(spans.size());
    spans.forEach(span -> spansById.put(span.getSpanId(), new Node(span)));
    return spansById;
  }
A Rudimentary tool for visualizing a hierarchy of spans. Given a collection of spans, indexes
them from parents to children and prints them out one per line, indented.
hbase-client/src/test/java/org/apache/hadoop/hbase/client/trace/StringTraceRenderer.java