Package com.netflix.zeno.fastblob.record.schema

Examples of com.netflix.zeno.fastblob.record.schema.FastBlobSchema.numFields()


        FastBlobSchema schema = rec.getSchema();
        ByteData fromSpace = rec.getByteData();

        long currentPointerPosition = rec.position();

        for(int i=0;i<schema.numFields();i++) {
            FieldDefinition fieldDef = schema.getFieldDefinition(i);
            int length = rec.getFieldLength(schema.getFieldName(i));

            TypedFieldDefinition typedFieldDef;
            int ordinal;
View Full Code Here


        schema.writeTo(new DataOutputStream(os));

        FastBlobSchema deserialized = FastBlobSchema.readFrom(new DataInputStream(new ByteArrayInputStream(os.toByteArray())));

        Assert.assertEquals(3, deserialized.numFields());
        Assert.assertEquals(FieldType.INT, deserialized.getFieldType("field1"));
        Assert.assertEquals(FieldType.OBJECT, deserialized.getFieldType("field2"));
        Assert.assertEquals(FieldType.FLOAT, deserialized.getFieldType("field3"));
    }
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.