All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.twitter.elephantbird.mapreduce.io.ThriftBlockWriter Maven / Gradle / Ivy

There is a newer version: 4.17
Show newest version
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);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy