You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sentry.apache.org by "guoquanshen (JIRA)" <ji...@apache.org> on 2014/08/20 10:38:29 UTC

[jira] [Updated] (SENTRY-396) The Thrift multiplexedProcessor registers mutil processor failed

     [ https://issues.apache.org/jira/browse/SENTRY-396?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

guoquanshen updated SENTRY-396:
-------------------------------

    Description: 
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 name
	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

  was:
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 name
	registeredProcessor = registeredProcessor || factory.register(processor);
}{code}


> The Thrift multiplexedProcessor registers mutil processor failed
> ----------------------------------------------------------------
>
>                 Key: SENTRY-396
>                 URL: https://issues.apache.org/jira/browse/SENTRY-396
>             Project: Sentry
>          Issue Type: Bug
>    Affects Versions: 1.4.0
>            Reporter: guoquanshen
>            Assignee: guoquanshen
>             Fix For: 1.5.0
>
>
> 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 name
> 	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
(v6.2#6252)