com.twitter.elephantbird.mapreduce.io.ThriftBlockWriter Maven / Gradle / Ivy
package com.twitter.elephantbird.mapreduce.io;
import java.io.OutputStream;
import org.apache.thrift.TBase;
import com.twitter.elephantbird.util.TypeRef;
/**
* A class to write blocks of Thrift data of type M.
* See {@link ProtobufBlockWriter} for more documentation.
*/
public class ThriftBlockWriter> extends BinaryBlockWriter {
public ThriftBlockWriter(OutputStream out, Class protoClass) {
super(out, protoClass, new ThriftConverter(new TypeRef(protoClass){}), DEFAULT_NUM_RECORDS_PER_BLOCK);
}
public ThriftBlockWriter(OutputStream out, Class protoClass, int numRecordsPerBlock) {
super(out, protoClass, new ThriftConverter(new TypeRef(protoClass){}), numRecordsPerBlock);
}
}