我在Storm拓扑配置中使用自定义序列化程序,如下所示:
config.put(Config.TOPOLOGY_FALL_BACK_ON_JAVA_SERIALIZATION, false);
config.registerSerialization(ObjectNode.class, ObjectNodeSerializer.class);
ObjectNodeSerializer.class在螺栓准备期间很好地实现了,但在拓扑执行期间从不调用序列化和反序列化方法。
答案 0 :(得分:1)
By default Storm will not serialize any tuple when it passes it to bolts within the same Worker. If you only have a single Worker process (running in local-cluster mode?) and want to test serialization, set following config
topology.testing.always.try.serialize: true