Package krati.store.avro

Examples of krati.store.avro.AvroGenericRecordSerializer.deserialize()


        assertEquals(record.get("fname"), record1.get("fname"));
        assertEquals(record.get("lname"), record1.get("lname"));
       
        GenericRecord record2 = null;
        try {
            record2 = readerSerializer.deserialize(writerBytes);
        } catch(SerializationException e) {}
        assertNull(record2);
       
        GenericRecord record3 = resolvingSerializer.deserialize(writerBytes);
        assertEquals(record.get("id"), record3.get("id"));
View Full Code Here


        GenericRecord record = createRecordV1(schemaV1, 1);
        writerBytes = writerSerializer.serialize(record);
       
        Serializer<GenericRecord> readerSerializer =
            new AvroGenericRecordSerializer(schemaV1);
        GenericRecord record1 = readerSerializer.deserialize(writerBytes);
        assertEquals(record.get("id"), record1.get("id"));
        assertEquals(record.get("age"), record1.get("age"));
        assertEquals(record.get("fname"), record1.get("fname"));
        assertEquals(record.get("lname"), record1.get("lname"));
       
View Full Code Here

        assertEquals(record.get("lname"), record1.get("lname"));
       
        record = createRecordV2(schemaV2, 1);
        writerBytes = writerSerializer.serialize(record);
       
        GenericRecord record2 = readerSerializer.deserialize(writerBytes);
        assertEquals(record.get("id"), record2.get("id"));
        assertEquals(record.get("age"), record2.get("age"));
        assertEquals(record.get("fname"), record2.get("fname"));
        assertEquals(record.get("lname"), record2.get("lname"));
    }
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.