amor949 opened a new issue, #2414:
URL: https://github.com/apache/shardingsphere-elasticjob/issues/2414

   java.util.ConcurrentModificationException: null
        at java.util.HashMap$HashIterator.nextNode(HashMap.java:1445)
        at java.util.HashMap$EntryIterator.next(HashMap.java:1479)
        at java.util.HashMap$EntryIterator.next(HashMap.java:1477)
        at 
com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter.findTreeCache(ZookeeperRegistryCenter.java:147)
        at 
com.dangdang.ddframe.job.reg.zookeeper.ZookeeperRegistryCenter.get(ZookeeperRegistryCenter.java:135)
        at 
com.dangdang.ddframe.job.lite.internal.storage.JobNodeStorage.getJobNodeData(JobNodeStorage.java:72)
        at 
com.dangdang.ddframe.job.lite.internal.election.LeaderService.isLeader(LeaderService.java:84)
        at 
com.dangdang.ddframe.job.lite.internal.election.ElectionListenerManager$LeaderAbdicationJobListener.dataChanged(ElectionListenerManager.java:91)
        at 
com.dangdang.ddframe.job.lite.internal.listener.AbstractJobListener.childEvent(AbstractJobListener.java:44)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:730)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$2.apply(TreeCache.java:724)
        at 
org.apache.curator.framework.listen.ListenerContainer$1.run(ListenerContainer.java:93)
        at 
com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:297)
        at 
org.apache.curator.framework.listen.ListenerContainer.forEach(ListenerContainer.java:85)
        at 
org.apache.curator.framework.recipes.cache.TreeCache.callListeners(TreeCache.java:723)
        at 
org.apache.curator.framework.recipes.cache.TreeCache.access$1400(TreeCache.java:70)
        at 
org.apache.curator.framework.recipes.cache.TreeCache$4.run(TreeCache.java:841)
        at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748) 
   
   
   private TreeCache findTreeCache(final String key) {
           for (Entry<String, TreeCache> entry : caches.entrySet()) {
               if (key.startsWith(entry.getKey())) {
                   return entry.getValue();
               }
           }
           return null;
       
}这个方法在多线程环境下会报错,因为用的是hashmap,能帮忙看下在什么环境下会需要多线程来获取作业节点吗?是不是改成ConcurrentHashMap就好了
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: 
[email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to