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

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

bq. So, if no receiver set up, traces go nowhere?

Yeah.

bq.  To see anything, you'd have to load a receiver with the just-added trace 
command (i.e.HDFS-6956)?

There's two ways to turn on tracing:
* set {{hadoop.htrace.spanreceiver.classes}} (usually to 
{{LocalFileSpanReceiver}} or {{ZipkinSpanReceiver}}
* use "hadoop trace \-add" to add tracing to an already-running daemon.

If you're testing, it's probably easier to just set up your Hadoop XML 
configuration so that tracing will be running as soon as the daemon starts up.  
This is also the only option for tracing a short-running program like the 
FSShell.  The dynamic changing is really more for production deployments, where 
people might not want this on all the time, but don't want to restart daemons 
to turn it on.

bq. If so, that seems cleaner. The alternative where files show up in /tmp if 
no receiver is set is less so. Drop this facility from this patch?

Well, the files don't show up in /tmp unless {{LocalFileSpanReceiver}} is 
configured.  By default, there are no trace span receivers configured, and 
nothing shows up in {{/tmp}}.

bq. On the patch, are these defined anywhere "NeverSampler"? Should we make it 
so they are? Or should they be toString of the enums?

This is another thing I'd like to add to HTrace.  I think HTrace should have 
some method that creates a sampler based on a string which is the class name.  
But right now that doesn't exist, so I had to add a hacked up version of it to 
Hadoop (for now).  We can easily take that out once HTrace has it, though.

I'd like to get the basic stuff in and then start shifting more things that we 
think could be common code into HTrace.

> Add tracing to DFSInputStream
> -----------------------------
>
>                 Key: HDFS-7055
>                 URL: https://issues.apache.org/jira/browse/HDFS-7055
>             Project: Hadoop HDFS
>          Issue Type: Sub-task
>          Components: datanode, namenode
>    Affects Versions: 2.6.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HDFS-7055.002.patch, HDFS-7055.003.patch, 
> HDFS-7055.004.patch, screenshot-get-1mb.png
>
>
> Add tracing to DFSInputStream.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to