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

chenshangan commented on FLUME-2420:
------------------------------------

This happens when we try to close all sinks. Following is the exception stack:
{code}
11 七月 2014 09:33:00,741 ERROR [pool-2-thread-1] 
(org.apache.flume.node.Application.stopAllSinks:119)  - Error while stopping 
SinkRunner: { policy:org.apache.flume.sink.DefaultSinkProcessor@6435d824 
counterGroup:{ name:null counters:{runner.backoffs.consecutive=0, 
runner.backoffs=224} } }
java.util.ConcurrentModificationException    at 
java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:394)    
at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:413)
    at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:412)
    at org.apache.flume.sink.hdfs.HDFSEventSink.stop(HDFSEventSink.java:615)    
at 
org.apache.flume.sink.DefaultSinkProcessor.stop(DefaultSinkProcessor.java:53)   
 at org.apache.flume.SinkRunner.stop(SinkRunner.java:122)
    at 
org.apache.flume.lifecycle.LifecycleSupervisor.unsupervise(LifecycleSupervisor.java:172)
    at org.apache.flume.node.Application.stopAllSinks(Application.java:117)    
at 
org.apache.flume.node.SinkZookeeperRunnable.run(SinkZookeeperRunnable.java:71)
    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
   
    at java.lang.Thread.run(Thread.java:722)
{code}

> HDFSEventSink#stop might throw ConcurrentModificationException
> --------------------------------------------------------------
>
>                 Key: FLUME-2420
>                 URL: https://issues.apache.org/jira/browse/FLUME-2420
>             Project: Flume
>          Issue Type: Bug
>          Components: Sinks+Sources
>    Affects Versions: v1.5.0
>            Reporter: chenshangan
>            Assignee: chenshangan
>         Attachments: FLUME-2420.patch
>
>
> There's a chance that bucketWriter callback and HDFSEventSink#stop operate on 
> sfWriter together. So synchronized should apply before operation on sfWriter.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to