Package com.cloudera.flume.handlers.hdfs

Examples of com.cloudera.flume.handlers.hdfs.WriteableEvent.readFields()


    ByteArrayInputStream bais = new ByteArrayInputStream(bs);
    GZIPInputStreamExposeSize gzis = new GZIPInputStreamExposeSize(bais);
    DataInputStream dis = new DataInputStream(gzis);

    WriteableEvent out = new WriteableEvent();
    out.readFields(dis);
    long gunSz = gzis.getDecompressSize(); // must be done before closed.
    dis.close();
    super.append(out);
    gunzipSize.addAndGet(gunSz);
  }
View Full Code Here


    byte[] data = e.get(BatchingDecorator.BATCH_DATA);
    DataInput in = new DataInputStream(new ByteArrayInputStream(data));
    batchCnt.incrementAndGet();
    for (int i = 0; i < sz; i++) {
      WriteableEvent we = new WriteableEvent();
      we.readFields(in);
      super.append(we);
      unbatchedCnt.incrementAndGet();
    }
  }
View Full Code Here

    ByteArrayInputStream bais = new ByteArrayInputStream(bs);
    GZIPInputStream gzis = new GZIPInputStream(bais);
    DataInputStream dis = new DataInputStream(gzis);

    WriteableEvent out = new WriteableEvent();
    out.readFields(dis);
    dis.close();
    super.append(out);
  }

  public static SinkDecoBuilder builder() {
View Full Code Here

    int sz = ByteBuffer.wrap(e.get(BatchingDecorator.BATCH_SIZE)).getInt();
    byte[] data = e.get(BatchingDecorator.BATCH_DATA);
    DataInput in = new DataInputStream(new ByteArrayInputStream(data));
    for (int i = 0; i < sz; i++) {
      WriteableEvent we = new WriteableEvent();
      we.readFields(in);
      super.append(we);
    }
  }

  public static SinkDecoBuilder builder() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.