com.datasalt.pangool.serialization
Class ThriftSerialization

java.lang.Object
  extended by com.datasalt.pangool.serialization.ThriftSerialization
All Implemented Interfaces:
org.apache.hadoop.io.serializer.Serialization<org.apache.thrift.TBase>

public class ThriftSerialization
extends Object
implements org.apache.hadoop.io.serializer.Serialization<org.apache.thrift.TBase>

A Serialization for types generated by Apache Thrift. Thrift types all descend from TBase.

To use this serialization, make sure that the Hadoop property io.serializations includes the fully-qualified classname of this class: com.datasalt.pangool.tuplemr.serialization.thrift.ThriftSerialization.


Nested Class Summary
static class ThriftSerialization.TDeserializerAdapter
           
static class ThriftSerialization.TSerializerAdapter
           
 
Constructor Summary
ThriftSerialization()
           
 
Method Summary
 boolean accept(Class<?> c)
           
static void enableThriftSerialization(org.apache.hadoop.conf.Configuration conf)
          Enables Thrift Serialization support in Hadoop.
 org.apache.hadoop.io.serializer.Deserializer<org.apache.thrift.TBase> getDeserializer(Class<org.apache.thrift.TBase> c)
           
 org.apache.hadoop.io.serializer.Serializer<org.apache.thrift.TBase> getSerializer(Class<org.apache.thrift.TBase> c)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThriftSerialization

public ThriftSerialization()
Method Detail

accept

public boolean accept(Class<?> c)
Specified by:
accept in interface org.apache.hadoop.io.serializer.Serialization<org.apache.thrift.TBase>

getSerializer

public org.apache.hadoop.io.serializer.Serializer<org.apache.thrift.TBase> getSerializer(Class<org.apache.thrift.TBase> c)
Specified by:
getSerializer in interface org.apache.hadoop.io.serializer.Serialization<org.apache.thrift.TBase>

getDeserializer

public org.apache.hadoop.io.serializer.Deserializer<org.apache.thrift.TBase> getDeserializer(Class<org.apache.thrift.TBase> c)
Specified by:
getDeserializer in interface org.apache.hadoop.io.serializer.Serialization<org.apache.thrift.TBase>

enableThriftSerialization

public static void enableThriftSerialization(org.apache.hadoop.conf.Configuration conf)
Enables Thrift Serialization support in Hadoop.



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