You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@accumulo.apache.org by David Medinets <da...@gmail.com> on 2012/11/13 02:39:52 UTC

TFile.java - is it needed?

I searched for TFile and found six references as shown below. Each
reference is to a static method or value. It seems like TFile comes
from Hadoop? Can we pull this information from an Hadoop jar file or
can we pull the static stuff into the BCFile class?

BCFile.java
  123: fsOutputBuffer.setCapacity(TFile.getFSOutputBufferSize(conf));
  461: decompressor, TFile.getFSInputBufferSize(conf));
Compression.java
  75: LZO(TFile.COMPRESSION_LZO) {
  140: GZ(TFile.COMPRESSION_GZ) {
  184: NONE(TFile.COMPRESSION_NONE) {
  213: SNAPPY(TFile.COMPRESSION_SNAPPY) {

Here is what is used from TFile.java:

  static int getFSInputBufferSize(Configuration conf) {
    return conf.getInt(FS_INPUT_BUF_SIZE_ATTR, 256 * 1024);
  }

  /** snappy codec **/
  public static final String COMPRESSION_SNAPPY = "snappy";
  /** compression: gzip */
  public static final String COMPRESSION_GZ = "gz";
  /** compression: lzo */
  public static final String COMPRESSION_LZO = "lzo";
  /** compression: none */
  public static final String COMPRESSION_NONE = "none";