code: public static void enableThriftSerialization(Configuration conf) {
  		String ser = conf.get("io.serializations").trim();
  		if (ser.length() !=0 ) {
  			ser += ",";
  		}
  		//Adding the Thrift serialization
  		ser += ThriftSerialization.class.getName();
  		conf.set("io.serializations", ser);
    }
docs: Enables Thrift Serialization support in Hadoop.