Examples of writeDouble()


Examples of org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.writeDouble()

    prot.writeI32(100);
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
    prot.writeListBegin(new TList());
    prot.writeDouble(348.55);
    prot.writeDouble(234.22);
    prot.writeListEnd();
    prot.writeFieldEnd();

    prot.writeFieldBegin(new TField());
View Full Code Here

Examples of org.apache.hadoop.typedbytes.TypedBytesOutput.writeDouble()

            TypedBytesOutput out =
                new TypedBytesOutput(new DataOutputStream(bytes));
                   
            out.writeVectorHeader(array.length);
            for (int i=0; i<array.length; ++i) {
                out.writeDouble(array[i]);
            }
           
            TypedBytesWritable val =
                new TypedBytesWritable(bytes.toByteArray());
           
View Full Code Here

Examples of org.apache.qpid.client.message.JMSBytesMessage.writeDouble()

    public void testEOFDouble() throws Exception
    {
        try
        {
            JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
            bm.writeDouble(1.3d);
            bm.reset();
            bm.readDouble();
            // should throw
            bm.readDouble();
            fail("expected exception did not occur");
View Full Code Here

Examples of org.apache.qpid.client.message.JMSStreamMessage.writeDouble()

    public void testEOFDouble() throws Exception
    {
        try
        {
            JMSStreamMessage bm = TestMessageHelper.newJMSStreamMessage();
            bm.writeDouble(1.3d);
            bm.reset();
            bm.readDouble();
            // should throw
            bm.readDouble();
            fail("expected exception did not occur");
View Full Code Here

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

  }
   
  public static void testDouble() throws Exception {
    TMemoryBuffer buf = new TMemoryBuffer(1000);
    TProtocol proto = factory.getProtocol(buf);
    proto.writeDouble(123.456);
    double out = proto.readDouble();
    if (out != 123.456) {
      throw new RuntimeException("Double was supposed to be " + 123.456 + " but was " + out);
    }
  }
View Full Code Here

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

      }
      if (struct.isSetNumEntries()) {
        oprot.writeI64(struct.numEntries);
      }
      if (struct.isSetIngestRate()) {
        oprot.writeDouble(struct.ingestRate);
      }
      if (struct.isSetQueryRate()) {
        oprot.writeDouble(struct.queryRate);
      }
      if (struct.isSetSplitCreationTime()) {
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQBytesMessage.writeDouble()

    }
  }
  public void testReadDouble() {
    ActiveMQBytesMessage msg = new ActiveMQBytesMessage();
    try {
      msg.writeDouble(3.3d);
      msg.reset();
      assertTrue(msg.readDouble() == 3.3d);
    } catch (JMSException jmsEx) {
      jmsEx.printStackTrace();
      assertTrue(false);
View Full Code Here

Examples of org.codehaus.activemq.message.ActiveMQStreamMessage.writeDouble()

  public void testReadDouble()
  {
    ActiveMQStreamMessage msg = new ActiveMQStreamMessage();
    try {
      double test = 4.4d;
      msg.writeDouble(test);
      msg.reset();
      assertTrue(msg.readDouble()==test);
      msg.reset();
      assertTrue(msg.readString().equals(new Double(test).toString()));
    }catch(JMSException jmsEx){
View Full Code Here

Examples of org.elasticsearch.common.io.stream.BytesStreamOutput.writeDouble()

        out.writeInt(-1);
        out.writeVInt(2);
        out.writeLong(-3);
        out.writeVLong(4);
        out.writeFloat(1.1f);
        out.writeDouble(2.2);
        out.writeUTF("hello");
        out.writeUTF("goodbye");

        BytesStreamInput in = new BytesStreamInput(out.copiedByteArray());
        assertThat(in.readBoolean(), equalTo(false));
View Full Code Here

Examples of org.hornetq.api.core.HornetQBuffer.writeDouble()

      Double d1 = RandomUtil.randomDouble();
      float f1 = RandomUtil.randomFloat();

      dynamic.writeUTF(str1);
      dynamic.writeString(str2);
      dynamic.writeDouble(d1);
      dynamic.writeFloat(f1);

      LargeMessageControllerImpl readBuffer = splitBuffer(3, dynamic.toByteBuffer().array());

      Assert.assertEquals(str1, readBuffer.readUTF());
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.