com.datasalt.pangool.utils
Class ThriftUtils

java.lang.Object
  extended by com.datasalt.pangool.utils.ThriftUtils

public class ThriftUtils
extends Object


Constructor Summary
ThriftUtils()
           
 
Method Summary
static org.apache.thrift.TDeserializer getDeserializer()
          Return a Thrift deserializer.
static org.apache.thrift.TSerializer getSerializer()
          Return a Thrift serializer.
static String toJSON(org.apache.thrift.TBase thriftObject)
          Serializes a Thrift object with the protocol TSimpleJSONProtocol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThriftUtils

public ThriftUtils()
Method Detail

toJSON

public static String toJSON(org.apache.thrift.TBase thriftObject)
Serializes a Thrift object with the protocol TSimpleJSONProtocol. This format cannot be deserialized. Useful for logging, etc. Exceptions are ignored and returns an String with the exception error message.


getSerializer

public static org.apache.thrift.TSerializer getSerializer()
Return a Thrift serializer. One serializer is cached per each thread (so it is thread safe)


getDeserializer

public static org.apache.thrift.TDeserializer getDeserializer()
Return a Thrift deserializer. One deserializer is cached per each thread (so it is thread safe)



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