Class TupleFieldSerialization

  extended by com.datasalt.pangool.tuplemr.serialization.TupleFieldSerialization
All Implemented Interfaces:
Schema.Field.FieldConfigurable, org.apache.hadoop.conf.Configurable,<ITuple>

public class TupleFieldSerialization
extends Object
implements<ITuple>, Schema.Field.FieldConfigurable, org.apache.hadoop.conf.Configurable

Serializes a Tuple withing a Pangool field. Allows for tuples inside tuples.

Constructor Summary
Method Summary
 boolean accept(Class<?> argClazz)
 org.apache.hadoop.conf.Configuration getConf()
   <ITuple> getDeserializer(Class<ITuple> argClazz)
   <ITuple> getSerializer(Class<ITuple> argClazz)
 void setConf(org.apache.hadoop.conf.Configuration conf)
 void setFieldProperties(Map<String,String> readProps, Map<String,String> targetProps)
          Sets the properties for this field.
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail


public TupleFieldSerialization()
Method Detail


public void setFieldProperties(Map<String,String> readProps,
                               Map<String,String> targetProps)
Description copied from interface: Schema.Field.FieldConfigurable
Sets the properties for this field.

Properties may come from configuration for serializing or may have been read from a data source when deserializing. As Fields may implement custom Serializers / Deserializers, backwards compatibility might be preserved by each implementation. For that, we provide both properties read from deserializing and properties specified by the user as "target" for this Field. Below we specify the exact meaning of each parameter:

Specified by:
setFieldProperties in interface Schema.Field.FieldConfigurable
readProps - Properties of this field, present when reading (deserializing).
targetProps - Properties of this field, specified for serializing. If readProps is also present, targetProps are to be taken as an updated configuration for this field. In this way backwards compatibility can be managed by each Serializer / Deserializer.


public boolean accept(Class<?> argClazz)
Specified by:
accept in interface<ITuple>


public<ITuple> getDeserializer(Class<ITuple> argClazz)
Specified by:
getDeserializer in interface<ITuple>


public<ITuple> getSerializer(Class<ITuple> argClazz)
Specified by:
getSerializer in interface<ITuple>


public org.apache.hadoop.conf.Configuration getConf()
Specified by:
getConf in interface org.apache.hadoop.conf.Configurable


public void setConf(org.apache.hadoop.conf.Configuration conf)
Specified by:
setConf in interface org.apache.hadoop.conf.Configurable

Copyright © –2014 Datasalt Systems S.L.. All rights reserved.