Examples of writeBinary()


Examples of com.facebook.presto.hive.shaded.org.apache.thrift.protocol.TTupleProtocol.writeBinary()

      }
      if (struct.isSetMy_string()) {
        oprot.writeString(struct.my_string);
      }
      if (struct.isSetMy_binary()) {
        oprot.writeBinary(struct.my_binary);
      }
      if (struct.isSetMy_string_string_map()) {
        {
          oprot.writeI32(struct.my_string_string_map.size());
          for (Map.Entry<String, String> _iter62 : struct.my_string_string_map.entrySet())
View Full Code Here

Examples of com.facebook.thrift.protocol.TBinaryProtocol.writeBinary()

    socket.flush();

    System.in.read();
    // Thread.sleep(30000);
    for (int i = 0; i < msg_size_mb; i++) {
      binprot.writeBinary(new byte[1024 * 1024]);
    }

    socket.close();
  }
}
View Full Code Here

Examples of com.facebook.thrift.protocol.TProtocol.writeBinary()

  }

  public static void testNakedBinary(byte[] data) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeBinary(data);
    // System.out.println(buf.inspect());
    byte[] out = proto.readBinary();
    if (!Arrays.equals(data, out)) {
      throw new RuntimeException("Binary was supposed to be '" + data + "' but was '" + out + "'");
    }
View Full Code Here

Examples of com.fasterxml.jackson.core.JsonGenerator.writeBinary()

            byte[] bytes = request.getObject() != null
                ? request.getSerializer().serialize( request.getObject() )
                : request.getCacheContent();

            g.writeFieldName( DirectMemoryConstants.CACHE_CONTENT_FIELD_NAME );
            g.writeBinary( bytes );

            if ( serializer != null )
            {
                g.writeStringField( DirectMemoryConstants.SERIALIZER_FIELD_NAME, serializer.getClass().getName() );
            }
View Full Code Here

Examples of org.apache.thrift.protocol.TBinaryProtocol.writeBinary()

    socket.flush();

    System.in.read();
    // Thread.sleep(30000);
    for (int i = 0; i < msg_size_mb; i++) {
      binprot.writeBinary(new byte[1024 * 1024]);
    }

    socket.close();
  }
}
View Full Code Here

Examples of org.apache.thrift.protocol.TProtocol.writeBinary()

  }

  public static void testNakedBinary(byte[] data) throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(0);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeBinary(data);
    // System.out.println(buf.inspect());
    byte[] out = proto.readBinary();
    if (!Arrays.equals(data, out)) {
      throw new RuntimeException("Binary was supposed to be '" + data + "' but was '" + out + "'");
    }
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.writeBinary()

      oprot.writeBitSet(optionals, 4);
      if (struct.isSetKey()) {
        oprot.writeString(struct.key);
      }
      if (struct.isSetValue()) {
        oprot.writeBinary(struct.value);
      }
      if (struct.isSetAnnotation_type()) {
        oprot.writeI32(struct.annotation_type.getValue());
      }
      if (struct.isSetHost()) {
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.writeBinary()

      if (struct.isSetAttributes()) {
        optionals.set(8);
      }
      oprot.writeBitSet(optionals, 9);
      if (struct.isSetStartRow()) {
        oprot.writeBinary(struct.startRow);
      }
      if (struct.isSetStopRow()) {
        oprot.writeBinary(struct.stopRow);
      }
      if (struct.isSetColumns()) {
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.writeBinary()

      oprot.writeBitSet(optionals, 9);
      if (struct.isSetStartRow()) {
        oprot.writeBinary(struct.startRow);
      }
      if (struct.isSetStopRow()) {
        oprot.writeBinary(struct.stopRow);
      }
      if (struct.isSetColumns()) {
        {
          oprot.writeI32(struct.columns.size());
          for (TColumn _iter79 : struct.columns)
View Full Code Here

Examples of org.apache.thrift.protocol.TTupleProtocol.writeBinary()

      }
      if (struct.isSetTimeRange()) {
        struct.timeRange.write(oprot);
      }
      if (struct.isSetFilterString()) {
        oprot.writeBinary(struct.filterString);
      }
      if (struct.isSetBatchSize()) {
        oprot.writeI32(struct.batchSize);
      }
      if (struct.isSetAttributes()) {
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.