You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "James Xu (JIRA)" <ji...@apache.org> on 2013/12/14 09:25:06 UTC

[jira] [Created] (STORM-91) Registering already registered serializations causes strange runtime errors

James Xu created STORM-91:
-----------------------------

             Summary: Registering already registered serializations causes strange runtime errors
                 Key: STORM-91
                 URL: https://issues.apache.org/jira/browse/STORM-91
             Project: Apache Storm (Incubating)
          Issue Type: Bug
            Reporter: James Xu


https://github.com/nathanmarz/storm/issues/279

e.g. if registering String:

java.lang.RuntimeException: com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: Class is not registered: char[]
Note: To register this class use: kryo.register(char[].class);
Serialization trace:
value (java.lang.String)
    at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:82)
    at backtype.storm.utils.DisruptorQueue.consumeBatchWhenAvailable(DisruptorQueue.java:55)
    at backtype.storm.disruptor$consume_batch_when_available.invoke(disruptor.clj:56)
    at backtype.storm.disruptor$consume_loop_STAR_$fn__1596.invoke(disruptor.clj:67)
    at backtype.storm.util$async_loop$fn__465.invoke(util.clj:377)
    at clojure.lang.AFn.run(AFn.java:24)
    at java.lang.Thread.run(Thread.java:662)
Caused by: com.esotericsoftware.kryo.KryoException: java.lang.IllegalArgumentException: Class is not registered: char[]
Note: To register this class use: kryo.register(char[].class);
Serialization trace:
value (java.lang.String)
    at com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.write(FieldSerializer.java:495)
    at com.esotericsoftware.kryo.serializers.FieldSerializer.write(FieldSerializer.java:213)
    at com.esotericsoftware.kryo.Kryo.writeClassAndObject(Kryo.java:554)
    at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:77)
    at com.esotericsoftware.kryo.serializers.CollectionSerializer.write(CollectionSerializer.java:18)
    at com.esotericsoftware.kryo.Kryo.writeObject(Kryo.java:472)
    at backtype.storm.serialization.KryoValuesSerializer.serializeInto(KryoValuesSerializer.java:27)
    at backtype.storm.serialization.KryoTupleSerializer.serialize(KryoTupleSerializer.java:27)
    at backtype.storm.daemon.worker$mk_transfer_fn$fn__4120$fn__4124.invoke(worker.clj:99)
    at backtype.storm.util$fast_list_map.invoke(util.clj:770)
    at backtype.storm.daemon.worker$mk_transfer_fn$fn__4120.invoke(worker.clj:99)
    at backtype.storm.daemon.executor$start_batch_transfer__GT_worker_handler_BANG_$fn__3898.invoke(executor.clj:205)
    at backtype.storm.disruptor$clojure_handler$reify__1584.onEvent(disruptor.clj:43)
    at backtype.storm.utils.DisruptorQueue.consumeBatchToCursor(DisruptorQueue.java:79)
    ... 6 more
Caused by: java.lang.IllegalArgumentException: Class is not registered: char[]
Note: To register this class use: kryo.register(char[].class);
    at com.esotericsoftware.kryo.Kryo.getRegistration(Kryo.java:426)
    at com.esotericsoftware.kryo.Kryo.getSerializer(Kryo.java:446)
    at com.esotericsoftware.kryo.serializers.FieldSerializer$ObjectField.write(FieldSerializer.java:477)
    ... 19 more
This error catching should happen at registration time (ideally in Kryo itself). Or, even better, Storm should allow duplicate registrations and skip any duplicates when initializing Kryo. This is consistent with how serialization registration works w.r.t. component configs.



--
This message was sent by Atlassian JIRA
(v6.1.4#6159)