[
https://issues.apache.org/jira/browse/HDFS-11622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15960131#comment-15960131
]
Karan Mehta commented on HDFS-11622:
------------------------------------
bq. As you pointed out, the current dataStreamer span in branch-2.7 seems not
to have situation setting multiple parents. It looks like extention for future
use?
Looks like an extension, since branch-2.7 depends on HTrace-3.1 which doesn't
have that API. I had a quick look at the code, while creating a new
{{MilliSpan}}, the constructor can take only 1 parent as the input. Only if
explicit spans are built using {{Builder}} class inside the {{MilliSpan}} class
they can be assigned an array of parents. At this point, the usages of this
builder class also have provided only single parentId as input. According to my
knowledge, for this particular branch we can go ahead by saving the traceId in
the {{DFSPacket}} if its seems acceptable. Let me know your thoughts.
If you want, I can submit a patch for this one.
> TraceId hardcoded to 0 in DataStreamer, correlation between multiple spans is
> lost
> ----------------------------------------------------------------------------------
>
> Key: HDFS-11622
> URL: https://issues.apache.org/jira/browse/HDFS-11622
> Project: Hadoop HDFS
> Issue Type: Bug
> Components: tracing
> Reporter: Karan Mehta
>
> In the {{run()}} method of {{DataStreamer}} class, the following code is
> written. {{parents\[0\]}} refer to the {{spanId}} of the parent span.
> {code}
> one = dataQueue.getFirst(); // regular data packet
> long parents[] = one.getTraceParents();
> if (parents.length > 0) {
> scope = Trace.startSpan("dataStreamer", new TraceInfo(0,
> parents[0]));
> // TODO: use setParents API once it's available from HTrace
> 3.2
> // scope = Trace.startSpan("dataStreamer", Sampler.ALWAYS);
> // scope.getSpan().setParents(parents);
> }
> {code}
> The {{scope}} starts a new TraceSpan with a traceId hardcoded to 0. Ideally
> it should be taken when {{currentPacket.addTraceParent(Trace.currentSpan())}}
> is invoked. This JIRA is to propose an additional long field inside the
> {{DFSPacket}} class which holds the parent {{traceId}}.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]