Package com.asakusafw.directio.hive.common

Examples of com.asakusafw.directio.hive.common.SimpleFieldInfo


     * @throws Exception if exists
     */
    @Test
    public void w_location() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo));
        emit(new SimpleCreateTable(table)
                .withLocation("hdfs://localhost/user/dwh/testing"));
    }
View Full Code Here


     * @throws Exception if exists
     */
    @Test
    public void w_multiple_fields() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo))
            .withField(new SimpleFieldInfo("col2", TypeInfoFactory.stringTypeInfo))
            .withField(new SimpleFieldInfo("col3", TypeInfoFactory.timestampTypeInfo));
        emit(new SimpleCreateTable(table));
    }
View Full Code Here

     * @throws Exception if exists
     */
    @Test
    public void w_field_comment() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo)
                    .withFieldComment("Hello, world!"));
        emit(new SimpleCreateTable(table));
    }
View Full Code Here

     */
    @Test
    public void w_table_comment() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withTableComment("Hello, world!")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo));
        emit(new SimpleCreateTable(table));
    }
View Full Code Here

     */
    @Test
    public void w_simple_row_format() throws Exception {
        DelimitedRowFormatInfo format = new DelimitedRowFormatInfo();
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo))
            .withRowFormat(format)
            .withFormatName("TEXT");
        emit(new SimpleCreateTable(table));
    }
View Full Code Here

        format.setMapKeysTerminatedBy("=");
        format.setLinesTerminatedBy("\n");
        format.setNullDefinedAs("\0");

        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo))
            .withRowFormat(format)
            .withFormatName("TEXT");
        emit(new SimpleCreateTable(table));
    }
View Full Code Here

     * @throws Exception if exists
     */
    @Test
    public void w_tblproperties() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo))
            .withTableProperty("orc.compress", "SNAPPY")
            .withTableProperty("orc.compress.size", "262145")
            .withTableProperty("orc.stripe.size", "268435457")
            .withTableProperty("orc.row.index.stride", "20000")
            .withTableProperty("orc.create.index", "false");
View Full Code Here

TOP

Related Classes of com.asakusafw.directio.hive.common.SimpleFieldInfo

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.