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

[email protected] commented on FLUME-1124:
------------------------------------------------------



bq.  On 2012-04-17 15:44:12, Brock Noland wrote:
bq.  > 
flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleSupervisor.java,
 line 68
bq.  > <https://reviews.apache.org/r/4753/diff/3/?file=102382#file102382line68>
bq.  >
bq.  >     This isn't your code but it looks like there are a few problems here.
bq.  >     
bq.  >     1) monitorService on MonitorRunnable is not set so an NPE (which is 
not being logged is thrown:
bq.  >     
bq.  >     java.lang.NullPointerException
bq.  >          at 
org.apache.flume.lifecycle.LifecycleSupervisor$MonitorRunnable.run(LifecycleSupervisor.java:255)
bq.  >          at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
bq.  >          at 
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
bq.  >          at 
java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
bq.  >          at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
bq.  >          at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180)
bq.  >          at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204)
bq.  >          at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
bq.  >          at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
bq.  >          at java.lang.Thread.run(Thread.java:662)
bq.  >     
bq.  >     2) The NPE is not being logged.
bq.  >     3) If the NPE did not occur we'd have a bigger issue as 
scheduleAtFixedRate is called here but the runnable reschedules itself.
bq.  >     4) Calling first supervise() and then start() creates two threads 
monitoring this service.

Hi Brock,

None of the issues are caused by this change. I can look into these and fix 
them, it seems like it is because of the way the start method is written. Here 
is a brief explanation:
1 and 2) This is caused by the start() function being called without supervise 
being called. The reason we have not been seeing this seems to be that when 
start is called, the different  components have not been added. So it never 
goes into the loop.
3) Agree this is an issue, but because of the explanation to (1 and 2) above.
4) Agreed, we should not be doing this. I will update the relevant code.


- Hari


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4753/#review6983
-----------------------------------------------------------


On 2012-04-17 15:06:58, Hari Shreedharan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4753/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-17 15:06:58)
bq.  
bq.  
bq.  Review request for Flume.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  All components are started by the same executor, which is different from 
the executor service that checks the status of the components.
bq.  
bq.  
bq.  This addresses bug FLUME-1124.
bq.      https://issues.apache.org/jira/browse/FLUME-1124
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
flume-ng-core/src/main/java/org/apache/flume/lifecycle/LifecycleSupervisor.java 
a7407e6 
bq.  
bq.  Diff: https://reviews.apache.org/r/4753/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Hari
bq.  
bq.


                
> Lifecycle supervisor can cause thread contention, sometimes causing 
> components to not startup.
> ----------------------------------------------------------------------------------------------
>
>                 Key: FLUME-1124
>                 URL: https://issues.apache.org/jira/browse/FLUME-1124
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.1.0
>            Reporter: Hari Shreedharan
>            Assignee: Hari Shreedharan
>             Fix For: v1.2.0
>
>         Attachments: FLUME-1124-1.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to