Package org.apache.hadoop.io

Examples of org.apache.hadoop.io.DataOutputBuffer.writeUTF()


  }

  @Test
  public void testExecDeserialization() throws IOException {
    DataOutputBuffer dob = new DataOutputBuffer();
    dob.writeUTF(methodName);
    dob.writeInt(1);
    Scan scan = new Scan();
    HbaseObjectWritable.writeObject(dob, scan, Scan.class, new Configuration());
    dob.writeUTF("org.apache.hadoop.hbase.client.Scan");
    Bytes.writeByteArray(dob, new byte[]{'a'});
View Full Code Here


    DataOutputBuffer dob = new DataOutputBuffer();
    dob.writeUTF(methodName);
    dob.writeInt(1);
    Scan scan = new Scan();
    HbaseObjectWritable.writeObject(dob, scan, Scan.class, new Configuration());
    dob.writeUTF("org.apache.hadoop.hbase.client.Scan");
    Bytes.writeByteArray(dob, new byte[]{'a'});
    // this is the dynamic protocol name
    dob.writeUTF(protocolName);

    DataInputBuffer dib = new DataInputBuffer();
View Full Code Here

    Scan scan = new Scan();
    HbaseObjectWritable.writeObject(dob, scan, Scan.class, new Configuration());
    dob.writeUTF("org.apache.hadoop.hbase.client.Scan");
    Bytes.writeByteArray(dob, new byte[]{'a'});
    // this is the dynamic protocol name
    dob.writeUTF(protocolName);

    DataInputBuffer dib = new DataInputBuffer();
    dib.reset(dob.getData(), dob.getLength());

    Exec after = new Exec();
View Full Code Here

 
  public byte[] toBytes() throws IOException {
    DataOutputBuffer out = new DataOutputBuffer();
    extent.write(out);
    out.writeLong(timestamp);
    out.writeUTF(server);
    out.writeUTF(filename);
    out.write(tabletId);
    out.write(logSet.size());
    for (String s : logSet) {
      out.writeUTF(s);
View Full Code Here

  public byte[] toBytes() throws IOException {
    DataOutputBuffer out = new DataOutputBuffer();
    extent.write(out);
    out.writeLong(timestamp);
    out.writeUTF(server);
    out.writeUTF(filename);
    out.write(tabletId);
    out.write(logSet.size());
    for (String s : logSet) {
      out.writeUTF(s);
    }
View Full Code Here

    out.writeUTF(server);
    out.writeUTF(filename);
    out.write(tabletId);
    out.write(logSet.size());
    for (String s : logSet) {
      out.writeUTF(s);
    }
    return Arrays.copyOf(out.getData(), out.getLength());
  }
 
  public void fromBytes(byte bytes[]) throws IOException {
View Full Code Here

    public byte[] toBytes() throws IOException {
      DataOutputBuffer out = new DataOutputBuffer();
      extent.write(out);
      out.writeLong(timestamp);
      out.writeUTF(server);
      out.writeUTF(filename);
      out.write(tabletId);
      out.write(logSet.size());
      for (String s : logSet) {
        out.writeUTF(s);
      }
View Full Code Here

      out.writeUTF(server);
      out.writeUTF(filename);
      out.write(tabletId);
      out.write(logSet.size());
      for (String s : logSet) {
        out.writeUTF(s);
      }
      return Arrays.copyOf(out.getData(), out.getLength());
    }
   
    public void fromBytes(byte bytes[]) throws IOException {
View Full Code Here

   
    public byte[] toBytes() throws IOException {
      DataOutputBuffer out = new DataOutputBuffer();
      extent.write(out);
      out.writeLong(timestamp);
      out.writeUTF(server);
      out.writeUTF(filename);
      out.write(tabletId);
      out.write(logSet.size());
      for (String s : logSet) {
        out.writeUTF(s);
View Full Code Here

        DataOutputBuffer outBuffer = new DataOutputBuffer();

        try {
            outBuffer.reset();

            outBuffer.writeUTF(payload.getApp());
            outBuffer.writeInt(payload.getNumMessages());
            outBuffer.writeByte(payload.getCompression());
            outBuffer.writeLong(payload.getCrc());
            outBuffer.writeInt(payload.getMessages().length);
            outBuffer.write(payload.getMessages());
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.