public class HadoopWritableSerializationTool extends Object
The helper methods assume all Writable instances are wrapped in an ObjectWritable. The reason for this approach, consistent with other support classes in this package, is to allow mappers and reducers to use the generic ObjectWritable since entry inputs maybe be associated with different adapters, and thus have different associated Writable instances. Configuration of Hadoop Mappers and Reducers requires a specific type.
Constructor and Description |
---|
HadoopWritableSerializationTool(org.apache.hadoop.mapreduce.JobContext jobContext) |
HadoopWritableSerializationTool(TransientAdapterStore adapterStore,
InternalAdapterStore internalAdapterStore) |
Modifier and Type | Method and Description |
---|---|
Object |
fromWritable(short adapterId,
org.apache.hadoop.io.ObjectWritable writable) |
Object |
fromWritable(String typeName,
org.apache.hadoop.io.ObjectWritable writable) |
DataTypeAdapter<?> |
getAdapter(String typeName) |
TransientAdapterStore |
getAdapterStore() |
HadoopWritableSerializer<Object,org.apache.hadoop.io.Writable> |
getHadoopWritableSerializerForAdapter(short adapterId) |
HadoopWritableSerializer<Object,org.apache.hadoop.io.Writable> |
getHadoopWritableSerializerForAdapter(String typeName) |
InternalDataAdapter<?> |
getInternalAdapter(short adapterId) |
org.apache.hadoop.io.ObjectWritable |
toWritable(short adapterId,
Object entry) |
public HadoopWritableSerializationTool(org.apache.hadoop.mapreduce.JobContext jobContext)
public HadoopWritableSerializationTool(TransientAdapterStore adapterStore, InternalAdapterStore internalAdapterStore)
public TransientAdapterStore getAdapterStore()
public InternalDataAdapter<?> getInternalAdapter(short adapterId)
public DataTypeAdapter<?> getAdapter(String typeName)
public HadoopWritableSerializer<Object,org.apache.hadoop.io.Writable> getHadoopWritableSerializerForAdapter(short adapterId)
public HadoopWritableSerializer<Object,org.apache.hadoop.io.Writable> getHadoopWritableSerializerForAdapter(String typeName)
public org.apache.hadoop.io.ObjectWritable toWritable(short adapterId, Object entry)
public Object fromWritable(String typeName, org.apache.hadoop.io.ObjectWritable writable)
public Object fromWritable(short adapterId, org.apache.hadoop.io.ObjectWritable writable)
Copyright © 2013–2022. All rights reserved.