Package com.asakusafw.directio.hive.serde

Examples of com.asakusafw.directio.hive.serde.DataModelDescriptor


                "model = {",
                "  @directio.hive.field(name = 'f')",
                "  simple : INT;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("f");
        assertThat(property, is(notNullValue()));
        assertThat(property.getFieldName(), is("f"));
        assertThat(property.getInspector().getTypeName(), is("int"));

        Method simple = descriptor.getDataModelClass().getMethod("getSimpleOption");
        HiveField field = simple.getAnnotation(HiveField.class);
        assertThat(field, is(notNullValue()));
        assertThat(field.name(), is("f"));
    }
View Full Code Here


                "model = {",
                "  @directio.hive.string",
                "  simple : DECIMAL;",
                "};"
        });
        DataModelDescriptor descriptor = descriptor(loader, "ModelDescriptorFactory");
        PropertyDescriptor property = descriptor.findPropertyDescriptor("simple");
        assertThat(property, is(notNullValue()));
        assertThat(property.getTypeInfo(), is((TypeInfo) TypeInfoFactory.stringTypeInfo));
    }
View Full Code Here

TOP

Related Classes of com.asakusafw.directio.hive.serde.DataModelDescriptor

Copyright © 2018 www.massapicom. 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.