[ 
https://issues.apache.org/jira/browse/HDFS-6879?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14109832#comment-14109832
 ] 

Colin Patrick McCabe commented on HDFS-6879:
--------------------------------------------

There are a bunch of whitespace changes in this patch we don't really want.  It 
would be nice to minimize the patch size so that "git blame" is more useful in 
the future.

{code}
+        if (Trace.isTracing()) {
+          Trace.addTimelineAnnotation("IPC client was not connected. 
Connecting...");
+        }
{code}

Let's include the hostname we're connecting to.  I also don't think we need to 
write "was not connected".  That's kind of assumed if we're connecting.  Maybe 
something more like "IPC client connecting to <hostname>" / "IPC client 
connected to <hostname>"

{code}
+      if (header.hasTraceInfo() &&
+          (header.getTraceInfo() != null) &&
+          header.getTraceInfo().hasTraceId()) {
{code}

This is redundant, right?  Protobuf fields are never null if they're present, 
so we just need to check header.getTraceInfo != null, not hasTraceInfo.

In {{Server#run}}, we don't log the exception if the while loop is terminated 
by an {{InterruptedException}}.

{code}
+message RPCTInfo {
+  optional int64 traceId = 1;
+  optional int64 parentId = 2;
+}
{code}
"RPCTInfo"  is an ambiguous name.  It also doesn't end with "Proto," which is 
our convention (for better or worse).  How about naming this 
"RpcTraceInfoProto" or something like that?

SpanReceiverHost: can we call this "SpanReceiverManager"?  It doesn't seem to 
have anything to do with hosts.  Similar for the config key.

A higher-level question.  There are also situations where we'd like to be able 
to trace just a specific RPC.  For example, we might find that writing to a 
particular HDFS file is slow, and we'd like to be able to run some tests on 
writing to this particular file while forcing tracing to be on.  What's the 
plan for this?  Perhaps we could add a config option to the DFSClient to force 
tracing to on, that could be used on "sample runs."

> Adding tracing to Hadoop RPC
> ----------------------------
>
>                 Key: HDFS-6879
>                 URL: https://issues.apache.org/jira/browse/HDFS-6879
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>            Reporter: Masatake Iwasaki
>         Attachments: HDFS-6879-0.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to