Class AvroFieldSerialization<T>

  extended by com.datasalt.pangool.tuplemr.serialization.AvroFieldSerialization<T>
All Implemented Interfaces:

public class AvroFieldSerialization<T>
extends Object
implements<T>, Schema.Field.FieldConfigurable

Nested Class Summary
static class AvroFieldSerialization.AvroFieldDeserializer<T>
static class AvroFieldSerialization.AvroFieldSerializer<T>
Constructor Summary
Method Summary
 boolean accept(Class<?> c)
   <T> getDeserializer(Class<T> clazz)
   <T> getSerializer(Class<T> clazz)
 void setFieldProperties(Map<String,String> readProperties, Map<String,String> targetProperties)
          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 AvroFieldSerialization()
Method Detail


public<T> getDeserializer(Class<T> clazz)
Specified by:
getDeserializer in interface<T>


public<T> getSerializer(Class<T> clazz)
Specified by:
getSerializer in interface<T>


public void setFieldProperties(Map<String,String> readProperties,
                               Map<String,String> targetProperties)
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
readProperties - Properties of this field, present when reading (deserializing).
targetProperties - 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<?> c)
Specified by:
accept in interface<T>

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