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

Tsuyoshi OZAWA commented on HADOOP-11498:
-----------------------------------------

TraceSamplerFactory#createSampler don't throw RuntimeException with this patch. 
As a result, traceSampler in DFSClient can be null:
{code}
    traceSampler = TraceSamplerFactory.createSampler(conf);
{code}

Then, I think startSpan() can raise NPE since s can be null:

{code}
public static <T> TraceScope startSpan(String description, Sampler<T> s, T 
info) {
Span span = null;
if (isTracing() || s.next(info))
{ span = Tracer.getInstance().createNew(description); }
return continueSpan(span);
}
{code}
What do you think?

> Bump the version of HTrace to 3.1.0-incubating
> ----------------------------------------------
>
>                 Key: HADOOP-11498
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11498
>             Project: Hadoop Common
>          Issue Type: Improvement
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>         Attachments: HADOOP-11498.001.patch
>
>
> The package is renamed from org.htrace to org.apache.htrace.



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

Reply via email to