Heron 中发生 java.lang.VerifyError: Bad type on operand stack 异常

2024-06-13

我尝试使用以下代码从zookeeper获取PhysicalPlan:

String stateMgrClass = Context.stateManagerClass(this.config);
IStateManager stateManager = null;
stateManager = ReflectionUtils.newInstance(stateMgrClass);
stateManager.initialize(this.config);
SchedulerStateManagerAdaptor stateManagerAdaptor = new SchedulerStateManagerAdaptor(stateManager, 5000);
PhysicalPlans.PhysicalPlan physicalPlan = stateManagerAdaptor.getPhysicalPlan(this.topologyName);

然后发生异常: java.lang.VerifyError: Bad type on operand stack :

Exception in thread "Thread-4" java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    com/twitter/heron/proto/system/PhysicalPlans$PhysicalPlan$Builder.mergeTopology(Lcom/twitter/heron/api/generated/TopologyAPI$Topology;)Lcom/twitter/heron/proto/system/PhysicalPlans$PhysicalPlan$Builder; @72: invokevirtual
  Reason:
    Type 'com/twitter/heron/api/generated/TopologyAPI$Topology' (current frame, stack[1]) is not assignable to 'com/google/protobuf/AbstractMessage'
  Current Frame:
    bci: @72
    flags: { }
    locals: { 'com/twitter/heron/proto/system/PhysicalPlans$PhysicalPlan$Builder', 'com/twitter/heron/api/generated/TopologyAPI$Topology' }
    stack: { 'com/google/protobuf/SingleFieldBuilderV3', 'com/twitter/heron/api/generated/TopologyAPI$Topology' }
  Bytecode:
    0x0000000: 2ab4 0014 c700 3f2a b400 1604 7e04 a000
    0x0000010: 292a b400 09c6 0022 2ab4 0009 b800 4fa5
    0x0000020: 0018 2a2a b400 09b8 0055 2bb6 0056 b600
    0x0000030: 57b5 0009 a700 082a 2bb5 0009 2ab6 0037
    0x0000040: a700 0c2a b400 142b b600 5857 2a59 b400
    0x0000050: 1604 80b5 0016 2ab0                    
  Stackmap Table:
    same_frame(@55)
    same_frame(@60)
    same_frame(@67)
    same_frame(@76)

    at com.twitter.heron.proto.system.PhysicalPlans$PhysicalPlan.toBuilder(PhysicalPlans.java:4211)
    at com.twitter.heron.proto.system.PhysicalPlans$PhysicalPlan.newBuilder(PhysicalPlans.java:4204)
    at com.twitter.heron.statemgr.FileSystemStateManager.getPhysicalPlan(FileSystemStateManager.java:165)
    at com.twitter.heron.spi.statemgr.SchedulerStateManagerAdaptor.getPhysicalPlan(SchedulerStateManagerAdaptor.java:289)
    at zyt.custom.my.scheduler.aurora.AuroraSchedulerController.basedWeightSchedule(AuroraSchedulerController.java:782)
    at zyt.custom.my.scheduler.aurora.AuroraSchedulerThread.run(AuroraSchedulerThread.java:54)

我不知道是什么导致了这个异常。感谢您的帮助。


当类的版本在编译时和运行时不同时,就会出现异常。

最近,当我尝试使用旧版本的探查器时,我遇到了这样的问题,当探查器启动时,将调用某个操作时会抛出 verifyError 。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Heron 中发生 java.lang.VerifyError: Bad type on operand stack 异常 的相关文章

随机推荐