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

Masatake Iwasaki commented on HTRACE-222:
-----------------------------------------

{code}
133         Constructor<T> constructor =
134             clazz.getConstructor(HTraceConfiguration.class);
{code}

This implicitly expect that constructer taking HTraceConfiguration as argument. 
Should we add {{SpanReceiver#init(HtraceConfiguration)}} or catch 
NoSuchMethodException and fall back to default constructor?

Adding test below to TestSpanReceiverPool results in NoSuchMethodException.

{code}
  public void TestCreateSpanReceiver() throws Throwable {
    String className = NoOpSpanReceiver.class.getName();
    HTraceConfiguration conf = HTraceConfiguration.EMPTY;
    SpanReceiver r1 = SpanReceiverPool.INSTANCE.getOrCreate(className, conf);
    SpanReceiver r2 = SpanReceiverPool.INSTANCE.getOrCreate(className, conf);
    Assert.assertTrue(r1 == r2);
  }
{code}


> Add SpanReceiverPool
> --------------------
>
>                 Key: HTRACE-222
>                 URL: https://issues.apache.org/jira/browse/HTRACE-222
>             Project: HTrace
>          Issue Type: Sub-task
>    Affects Versions: 4.0
>            Reporter: Colin Patrick McCabe
>            Assignee: Colin Patrick McCabe
>         Attachments: HTRACE-222.001.patch
>
>
> Add SpanReceiverPool, a pool of span receivers which can be used by multiple 
> Tracer objects.



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

Reply via email to