[ https://issues.apache.org/jira/browse/HDFS-7054?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15949993#comment-15949993 ]
Karan Mehta commented on HDFS-7054: ----------------------------------- I have hit a corner case bug from the Apache Phoenix Test documented as PHOENIX-3752. The corresponding HDFS bug is HDFS-11583. A simple patch would consist of following changes. {code} long lastPacket = Time.monotonicNow(); - TraceScope scope = NullScope.INSTANCE; while (!streamerClosed && dfsClient.clientRunning) { + TraceScope scope = NullScope.INSTANCE; {code} and {code} if (!one.isHeartbeatPacket()) { - span = scope.detach(); + span = scope.getSpan(); one.setTraceSpan(span); dataQueue.removeFirst(); ackQueue.addLast(one); {code} If the current span is detached from the scope, then calling the close method on it does not have any effect. How does these changes seem? I am also curious as to why the traceId was hardcoded to 0, since it may defeat the purpose of a trace which is coming from Phoenix or HBase code level. A comment near this code block is also shown below. {code} // TODO: use setParents API once it's available from HTrace 3.2 // scope = Trace.startSpan("dataStreamer", Sampler.ALWAYS); // scope.getSpan().setParents(parents); {code} This sampling frequency is hardcoded to {{ALWAYS}}, which also suggests that this span will not follow the sampling frequency associated with the current request, which may have been originated from HBase or Phoenix level. Can you provide any insight on this? > Make DFSOutputStream tracing more fine-grained > ---------------------------------------------- > > Key: HDFS-7054 > URL: https://issues.apache.org/jira/browse/HDFS-7054 > Project: Hadoop HDFS > Issue Type: Sub-task > Components: datanode, namenode > Affects Versions: 2.6.0 > Reporter: Colin P. McCabe > Assignee: Colin P. McCabe > Fix For: 2.7.0 > > Attachments: HDFS-7054.001.patch, HDFS-7054.002.patch, > HDFS-7054.003.patch > > -- This message was sent by Atlassian JIRA (v6.3.15#6346) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org