Examples of toObject()


Examples of voldemort.serialization.Serializer.toObject()

                                                                                             JsonTypes.STRING,
                                                                                             "color",
                                                                                             JsonTypes.STRING)));
        assertEquals("Key order in Map should not matter while serializing/deserializing",
                     data,
                     outOfOrderSerializer.toObject(getSerializer(typeSig).toBytes(data)));

        outOfOrderSerializer = new JsonTypeSerializer(new JsonTypeDefinition(ImmutableMap.of("color",
                                                                                             JsonTypes.STRING,
                                                                                             "name",
                                                                                             JsonTypes.STRING,
View Full Code Here

Examples of voldemort.serialization.Serializer.toObject()

                                                                                             JsonTypes.STRING,
                                                                                             "age",
                                                                                             JsonTypes.INT32)));
        assertEquals("Key order in Map should not matter while serializing/deserializing",
                     data,
                     outOfOrderSerializer.toObject(getSerializer(typeSig).toBytes(data)));

    }

    public void testToObjectIsInverseOfToBytes() {
        /* test primitive types */
 
View Full Code Here

Examples of voldemort.serialization.StringSerializer.toObject()

        while(entriesIterator.hasNext()) {
            try {
                Pair<ByteArray, Versioned<byte[]>> kvPair = entriesIterator.next();
                byte[] keyBytes = kvPair.getFirst().get();
                byte[] valueBytes = kvPair.getSecond().getValue();
                keyObject = serializer.toObject(keyBytes);
                if(!keyObject.equals(MetadataVersionStoreUtils.VERSIONS_METADATA_KEY)) {
                    continue;
                }
                valueObject = serializer.toObject(valueBytes);
            } catch(Exception e) {
View Full Code Here

Examples of voldemort.serialization.StringSerializer.toObject()

                byte[] valueBytes = kvPair.getSecond().getValue();
                keyObject = serializer.toObject(keyBytes);
                if(!keyObject.equals(MetadataVersionStoreUtils.VERSIONS_METADATA_KEY)) {
                    continue;
                }
                valueObject = serializer.toObject(valueBytes);
            } catch(Exception e) {
                System.err.println("Error while retrieving Metadata versions from node : " + nodeId
                                   + ". Exception = \n");
                e.printStackTrace();
                System.exit(-1);
View Full Code Here

Examples of voldemort.serialization.json.JsonTypeSerializer.toObject()

                    data.seek(position);
                    int size = data.readInt();
                    byte[] value = new byte[size];
                    data.readFully(value);
                    System.out.println(ByteUtils.toHexString(keyMd5) + "\t=>\t"
                                       + serializer.toObject(value).toString());
                }
            } catch(EOFException e) {
                // no biggie
            }
            System.out.println();
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.