diff --git a/storm-client/src/jvm/org/apache/storm/serialization/DefaultKryoFactory.java b/storm-client/src/jvm/org/apache/storm/serialization/DefaultKryoFactory.java index d361e252eb3..ef00ea47f75 100644 --- a/storm-client/src/jvm/org/apache/storm/serialization/DefaultKryoFactory.java +++ b/storm-client/src/jvm/org/apache/storm/serialization/DefaultKryoFactory.java @@ -14,11 +14,15 @@ import com.esotericsoftware.kryo.Kryo; import com.esotericsoftware.kryo.Serializer; +import com.esotericsoftware.kryo.util.Util; import java.util.Map; import org.apache.storm.Config; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; public class DefaultKryoFactory implements IKryoFactory { + private static final Logger LOG = LoggerFactory.getLogger(DefaultKryoFactory.class); @Override public Kryo getKryo(Map conf) { @@ -51,6 +55,12 @@ public void overrideDefault(boolean value) { @Override public Serializer getDefaultSerializer(Class type) { if (override) { + LOG.warn("Class is not registered: {}\n" + + "Note: To register this class use: kryo.register({});\n" + + "Falling back to java serialization.", + Util.className(type), Util.className(type) + ); + return new SerializableSerializer(); } else { return super.getDefaultSerializer(type);