If I have a generic Serializer/Deserializers that take some runtime
information to instantiate, how would this work in the current
serializer/deserializer APIs? And depending on this runtime information, may
return different Objects although they may all derive from the same class.

For example, for Thrift, I may have something called a ThriftSerializer that
is general:

{code}
Public class ThriftDeserializer<T extends ThriftBase> implements
Deserializer {
  T deserialize(T);
}
{code}

How would I instantiate this, since the current getDeserializer takes only
the Class but not configuration object.
How would I implement createKey in RecordReader


In other words, I think we need a  {code}Class<?> getClass();  {code} method
in Deserializer() and a {code}Deserializer getDeserializer(Class,
Configuration conf); {code} method in Serializer.java.

Or is there another way to do this?

IF not, I can open a JIRA for implementing parameterized serializers.

Thanks, pete



Reply via email to