[
https://issues.apache.org/jira/browse/HTRACE-222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14648164#comment-14648164
]
Masatake Iwasaki commented on HTRACE-222:
-----------------------------------------
bq. I think that the list of active SpanReceivers should be global (like it is
currently), but we should close all of them when the last Tracer is closed, or
when the process is exiting. So instead of reference-counting each
SpanReceiver, we simply keep a count of the number of active Tracer objects.
I agree that this way is simpler and better.
bq. I also think we should never create more than one copy of each type of
SpanReceiver.
Should {{SpanReciverPool#addReceiver}} be private if SpanRecieverPool is
responsible for uniqueness of instance of SpanReciever implementations?
bq. Another thing to keep in mind is that Hadoop has an API for adding and
removing SpanReceivers at runtime. So we need to support that.
{{SpanReciverPool#removeReceiver}} allows Tracer A to close the span receiver
while Tracer B is using it. I think adding {{SpanReciverPool#receiveSpan}}
which calls {{receiveSpan}} of each span receiver (and making Tracer call it)
is an option. Tracers do not need reference to SpanReceiver anymore in this
case.
> 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, HTRACE-222.002.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)