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

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


    @Test
    public void testEquals() throws IOException {
        FastBlobSchema otherSchema = new FastBlobSchema("test", 3);

        otherSchema.addField("field1", new FieldDefinition(FieldType.INT));
        otherSchema.addField("field2", new TypedFieldDefinition(FieldType.OBJECT, "Field2"));
        otherSchema.addField("field3", new FieldDefinition(FieldType.FLOAT));

        Assert.assertTrue(otherSchema.equals(schema));
View Full Code Here


    @Test
    public void testEquals() throws IOException {
        FastBlobSchema otherSchema = new FastBlobSchema("test", 3);

        otherSchema.addField("field1", new FieldDefinition(FieldType.INT));
        otherSchema.addField("field2", new TypedFieldDefinition(FieldType.OBJECT, "Field2"));
        otherSchema.addField("field3", new FieldDefinition(FieldType.FLOAT));

        Assert.assertTrue(otherSchema.equals(schema));

View Full Code Here

    public void testEquals() throws IOException {
        FastBlobSchema otherSchema = new FastBlobSchema("test", 3);

        otherSchema.addField("field1", new FieldDefinition(FieldType.INT));
        otherSchema.addField("field2", new TypedFieldDefinition(FieldType.OBJECT, "Field2"));
        otherSchema.addField("field3", new FieldDefinition(FieldType.FLOAT));

        Assert.assertTrue(otherSchema.equals(schema));


        FastBlobSchema anotherSchema = new FastBlobSchema("test", 3);
View Full Code Here

        Assert.assertTrue(otherSchema.equals(schema));


        FastBlobSchema anotherSchema = new FastBlobSchema("test", 3);

        anotherSchema.addField("field1", new FieldDefinition(FieldType.INT));
        anotherSchema.addField("field2", new TypedFieldDefinition(FieldType.OBJECT, "Field2"));
        anotherSchema.addField("field3", new FieldDefinition(FieldType.INT));

        Assert.assertFalse(anotherSchema.equals(schema));
    }
View Full Code Here


        FastBlobSchema anotherSchema = new FastBlobSchema("test", 3);

        anotherSchema.addField("field1", new FieldDefinition(FieldType.INT));
        anotherSchema.addField("field2", new TypedFieldDefinition(FieldType.OBJECT, "Field2"));
        anotherSchema.addField("field3", new FieldDefinition(FieldType.INT));

        Assert.assertFalse(anotherSchema.equals(schema));
    }
View Full Code Here

        FastBlobSchema anotherSchema = new FastBlobSchema("test", 3);

        anotherSchema.addField("field1", new FieldDefinition(FieldType.INT));
        anotherSchema.addField("field2", new TypedFieldDefinition(FieldType.OBJECT, "Field2"));
        anotherSchema.addField("field3", new FieldDefinition(FieldType.INT));

        Assert.assertFalse(anotherSchema.equals(schema));
    }

View Full Code Here

    }

    protected FastBlobSchema schema(FastBlobSchemaField... fields) {
        FastBlobSchema schema = new FastBlobSchema(schemaName, fields.length);
        for(FastBlobSchemaField field : fields) {
            schema.addField(field.name, field.type);
        }
        return schema;
    }

    protected List<NFTypeSerializer<?>> serializers(NFTypeSerializer<?>... serializers) {
View Full Code Here

    }

    @Test
    public void remapsListFieldOrdinals() {
        FastBlobSchema schema = new FastBlobSchema("Test", 2);
        schema.addField("intField", new FieldDefinition(FieldType.INT));
        schema.addField("listField", new TypedFieldDefinition(FieldType.LIST, "ElementType"));

        Random rand = new Random();

        for(int i=0;i<1000;i++) {
View Full Code Here

    @Test
    public void remapsListFieldOrdinals() {
        FastBlobSchema schema = new FastBlobSchema("Test", 2);
        schema.addField("intField", new FieldDefinition(FieldType.INT));
        schema.addField("listField", new TypedFieldDefinition(FieldType.LIST, "ElementType"));

        Random rand = new Random();

        for(int i=0;i<1000;i++) {
View Full Code Here

    }

    @Test
    public void remapsMapFieldOrdinals() {
        FastBlobSchema schema = new FastBlobSchema("Test", 2);
        schema.addField("intField", new FieldDefinition(FieldType.INT));
        schema.addField("mapField", new MapFieldDefinition("ElementType", "ElementType"));

        Random rand = new Random();

        for(int i=0;i<1000;i++) {
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.