You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@htrace.apache.org by "Colin Patrick McCabe (JIRA)" <ji...@apache.org> on 2015/10/04 08:42:26 UTC

[jira] [Commented] (HTRACE-272) TracerPool load multiple inscance of same receiver class when simple classname is given

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

Colin Patrick McCabe commented on HTRACE-272:
---------------------------------------------

Great catch!  We should fix this.

One comment, though: it seems like under the new logic, you can retrieve a SpanReceiver in any namespace just by specifying its short (dotless) class name.  So if one Tracer creates {{foo.bar.MySpanReceiver}}, then later another can fetch it by its short name {{MySpanReceiver}}.  But if the order is reversed, {{MySpanReceiver}} doesn't find anything, since the full name is needed to first create it (for anything not in {{org.apache.htrace.core}}).

I think maybe we should keep this behavior to the "blessed" namespaces like {{org.apache.htrace.core}} for right now.  So maybe if you're given Foo just find possible hits in {{org.apache.htrace.core.Foo}}, but not {{some.random.namespace.Foo}}... for now at least?

> TracerPool load multiple inscance of same receiver class when simple classname is given
> ---------------------------------------------------------------------------------------
>
>                 Key: HTRACE-272
>                 URL: https://issues.apache.org/jira/browse/HTRACE-272
>             Project: HTrace
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 4.0.1
>            Reporter: Masatake Iwasaki
>            Assignee: Masatake Iwasaki
>         Attachments: HTRACE-272.001.patch
>
>
> {{TracerPool#loadReceiverType}} returns existing reference only {{if (receiver.getClass().getName().equals(className))}} but the className could be short name of the receiver class. Multiple instances of the same receiver class are loaded in that case.



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