sentry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "guoquanshen (JIRA)" <>
Subject [jira] [Commented] (SENTRY-396) The Thrift multiplexedProcessor registers mutil processor failed
Date Mon, 15 Sep 2014 02:59:33 GMT


guoquanshen commented on SENTRY-396:

[~prasadm], thanks for your commend. I guess you may be misunderstand my meaning, It's my
fault not to express what I thought correctly. The patch doesn't change the logic of registering
multiprocessors. I just adjust the order this process, that's meaningful. If there are two
processors need to register, one for hive/impala processing request called processorA, the
other for solr processing request called processorB. The original procedure is that:
registeredProcessor = registeredProcessor || factory.register(processor); if  processorA is
registered correctly, the processorB doesn't get a chance to register because of the short
circuit of the expression

but the changing order is that:
registeredProcessor = factory.register(processor) || registeredProcessor; Every processor
will get a chance to register even the previous processor failed 

> The Thrift multiplexedProcessor registers mutil processor failed
> ----------------------------------------------------------------
>                 Key: SENTRY-396
>                 URL:
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: guoquanshen
>            Assignee: guoquanshen
>             Fix For: 1.5.0
>         Attachments: SENTRY-396.patch
> The sentry service uses multiplexedProcessor to register multi processor, but the logic
isn't correct in my opinion. It use processFactory to register and the source code as following:
> {code}TMultiplexedProcessor processor = new TMultiplexedProcessor();
> boolean registeredProcessor = false;
> for (String processorFactory : processorFactories){
>     ProcessorFactory factory = (ProcessorFactory) #create factory instance with processorFactory
> 	registeredProcessor = registeredProcessor || factory.register(processor);
> }{code}
> If the first factory register successfully, registeredProcessor will become true then
the following factories don't get the chance to register

This message was sent by Atlassian JIRA

View raw message