It seems to me that a org.apache.hadoop.io.serializer.Serialization
could be written to serialize the java types directly in the same format that the wrapper classes serialize the type into. That way the Mappers and Reducers don't have to deal with the wrapper classes.
相关问题
- Json.NET deserializing contents of a JObject?
- Spark on Yarn Container Failure
- Serializing a serialized Thrift struct to Kafka in
- GeoDjango: Distance Object is not serializable
- How do I send or save a function and recv or resto
相关文章
- Java写文件至HDFS失败
- serializing a list of objects into a file in java
- mapreduce count example
- Convert C# Object to Json Object
- When sending XML to JMS should I use TextMessage o
- Custom serialization for fields in Rails
- Do I need to expose a constructor in a WCF DataCon
- How to serialize Xml Date only from DateTime in C#
There is nothing stopping you changing the serialization to use a different mechanism such as java Serializable interface or something like thrift, protocol buffers etc.
In fact, Hadoop comes with an (experimental) Serialization implementation for Java Serializable objects - just configure the serialization factory to use it. The default serialization mechanism is
WritableSerialization
, but this can be changed by setting the following configuration property:Bear in mind however that anything that expects a Writable (Input/Output formats, partitioners, comparators) etc will need to be replaced by versions that can be passed a
Serializable
instance rather than aWritable
instance.Some more links for the curious reader: