我在 Storm 拓扑配置中使用自定义序列化程序,如下所示:
config.put(Config.TOPOLOGY_FALL_BACK_ON_JAVA_SERIALIZATION, false);
config.registerSerialization(ObjectNode.class, ObjectNodeSerializer.class);
ObjectNodeSerializer.class 在螺栓准备期间很好地实例化,但在拓扑执行期间从不调用序列化和反序列化方法。
我在 Storm 拓扑配置中使用自定义序列化程序,如下所示:
config.put(Config.TOPOLOGY_FALL_BACK_ON_JAVA_SERIALIZATION, false);
config.registerSerialization(ObjectNode.class, ObjectNodeSerializer.class);
ObjectNodeSerializer.class 在螺栓准备期间很好地实例化,但在拓扑执行期间从不调用序列化和反序列化方法。