当我尝试创建Heron的自定义调度程序,并使用SchedulerStateManagerApaptor对象更新拓扑时,发生了此异常:
self.poslist = [(headposx,y) for y in reversed(range(headposy-self.length+1,headposy+1))]
以及实例化SchedulerStateManagerAdaptor对象的代码如下:
Exception in thread java.util.ConcurrentModificationException: The update lock can not be obtained for topology AuroraMonitorSentenceWordCountTopology. Another actor is performing an update on it. Failing this request, try again once current update is complete
at com.twitter.heron.scheduler.UpdateTopologyManager.updateTopology(UpdateTopologyManager.java:117)
at zyt.custom.my.scheduler.aurora.AuroraHotEdgeSchedulerWithTxtLog.triggerSchedule(AuroraHotEdgeSchedulerWithTxtLog.java:323)
at zyt.custom.my.scheduler.aurora.AuroraHotEdgeSchedulerWithTxtLog.access$400(AuroraHotEdgeSchedulerWithTxtLog.java:55)
at zyt.custom.my.scheduler.aurora.AuroraHotEdgeSchedulerWithTxtLog$2.run(AuroraHotEdgeSchedulerWithTxtLog.java:258)
at java.lang.Thread.run(Thread.java:748)
如何解决此异常?感谢您的帮助!
答案 0 :(得分:0)
Yitan-您是否要创建新的Aurora调度程序?
答案 1 :(得分:0)
根据异常消息,在计划第二个更新操作时,将进行一个更新操作。第一个正在进行的操作阻止了第二个进行。
那么您可以干净地尝试更新操作吗?还请检查更新完成后,您的实现是否正确释放了锁?