Search in sources :

Example 6 with OneOfEach

use of thrift.test.OneOfEach in project parquet-mr by apache.

the class TestThriftToPigCompatibility method testOneOfEach.

@Test
public void testOneOfEach() throws Exception {
    OneOfEach a = new OneOfEach(true, false, (byte) 8, (short) 16, (int) 32, (long) 64, (double) 1234, "string", "å", false, ByteBuffer.wrap("a".getBytes()), new ArrayList<Byte>(), new ArrayList<Short>(), new ArrayList<Long>());
    validateSameTupleAsEB(a);
}
Also used : OneOfEach(thrift.test.OneOfEach) Test(org.junit.Test)

Example 7 with OneOfEach

use of thrift.test.OneOfEach in project parquet-mr by apache.

the class TestParquetReadProtocol method testOneOfEach.

@Test
public void testOneOfEach() throws TException {
    final List<Byte> bytes = new ArrayList<Byte>();
    bytes.add((byte) 1);
    final List<Short> shorts = new ArrayList<Short>();
    shorts.add((short) 1);
    final List<Long> longs = new ArrayList<Long>();
    longs.add((long) 1);
    OneOfEach a = new OneOfEach(true, false, (byte) 8, (short) 16, (int) 32, (long) 64, (double) 1234, "string", "å", false, ByteBuffer.wrap("a".getBytes()), bytes, shorts, longs);
    validate(a);
}
Also used : ArrayList(java.util.ArrayList) OneOfEach(thrift.test.OneOfEach) Test(org.junit.Test)

Aggregations

OneOfEach (thrift.test.OneOfEach)7 Test (org.junit.Test)6 ThriftFixtures (com.twitter.elephantbird.examples.proto.ThriftFixtures)1 Name (com.twitter.elephantbird.thrift.test.Name)1 Person (com.twitter.elephantbird.thrift.test.Person)1 PhoneNumber (com.twitter.elephantbird.thrift.test.PhoneNumber)1 TestName (com.twitter.elephantbird.thrift.test.TestName)1 TestPerson (com.twitter.elephantbird.thrift.test.TestPerson)1 TestUnion (com.twitter.elephantbird.thrift.test.TestUnion)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ByteArrayOutputStream (java.io.ByteArrayOutputStream)1 ArrayList (java.util.ArrayList)1 Configuration (org.apache.hadoop.conf.Configuration)1 HolyMoley (thrift.test.HolyMoley)1 Nesting (thrift.test.Nesting)1