Examples of LongMapValue


Examples of eu.stratosphere.api.java.record.io.avro.AvroRecordInputFormat.LongMapValue

    // check enums
    StringValue enumValue = record.getField(10, StringValue.class);
    Assert.assertEquals("string representation of enum not equal", enumValue.getValue(), TEST_ENUM_COLOR.toString());
   
    // check maps
    LongMapValue lm = record.getField(11, AvroRecordInputFormat.LongMapValue.class);
    Assert.assertEquals("map value of key 1 not equal", lm.get(new StringValue(TEST_MAP_KEY1)).getValue(), TEST_MAP_VALUE1);
    Assert.assertEquals("map value of key 2 not equal", lm.get(new StringValue(TEST_MAP_KEY2)).getValue(), TEST_MAP_VALUE2);
   
   
    Assert.assertFalse("expecting second element", format.reachedEnd());
    Assert.assertNotNull("expecting second element", format.nextRecord(record));
   
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.