Package com.asakusafw.directio.hive.common

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


     * @throws Exception if failed
     */
    @Test
    public void exec_simple() throws Exception {
        File output = new File(folder.getRoot(), "output.txt");
        Info1.delegate = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("testing", TypeInfoFactory.intTypeInfo));
        int status = GenerateCreateTable.execute(new String[] {
                "--classpath", source(),
                "--output", output.getPath(),
                "--include", "testing",
View Full Code Here


                "--output", folder.newFile().getPath(),
                "--location", "/home/dwh",
                "--database", "testdb",
                "--pluginpath", plugin.getPath(),
        });
        String location = conf.locationProvider.toString(new SimpleTableInfo("testing")
                .withField(new SimpleFieldInfo("p", TypeInfoFactory.intTypeInfo)));
        assertThat(location, is("/home/dwh/testing"));
        assertThat(conf.databaseName, is("testdb"));
        assertThat(conf.classLoader, canLoad(plugin));
    }
View Full Code Here

                Pattern.compile("testing"),
                Stringnizer.NULL,
                null,
                new File(folder.getRoot(), "output.txt"));

        Info1.delegate = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("simple", TypeInfoFactory.intTypeInfo));
        List<String> stmts = run(conf);
        assertThat(stmts, hasSize(1));
        verify(stmts.get(0));
    }
View Full Code Here

                null,
                Stringnizer.NULL,
                null,
                new File(folder.getRoot(), "output.txt"));

        Info1.delegate = new SimpleTableInfo("t1")
            .withField(new SimpleFieldInfo("simple", TypeInfoFactory.intTypeInfo));
        Info2.delegate = new SimpleTableInfo("t2")
            .withField(new SimpleFieldInfo("simple", TypeInfoFactory.intTypeInfo));
        List<String> stmts = run(conf);
        assertThat(stmts, hasSize(greaterThanOrEqualTo(2)));
    }
View Full Code Here

                    }
                },
                null,
                new File(folder.getRoot(), "output.txt"));

        Info1.delegate = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("simple", TypeInfoFactory.intTypeInfo));
        List<String> stmts = run(conf);
        assertThat(stmts, hasSize(1));
        verify(stmts.get(0));
        assertThat(stmts.get(0), is(regex("LOCATION\\s+'here'")));
View Full Code Here

                Pattern.compile("testing"),
                null,
                "testdb",
                new File(folder.getRoot(), "output.txt"));

        Info1.delegate = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("simple", TypeInfoFactory.intTypeInfo));
        List<String> stmts = run(conf);
        assertThat(stmts, hasSize(1));
        verify(stmts.get(0));
        assertThat(stmts.get(0), is(regex("testdb\\s*\\.\\s*testing")));
 
View Full Code Here

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

     * w/ external.
     * @throws Exception if exists
     */
    @Test
    public void w_external() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo));
        emit(new SimpleCreateTable(table)
                .withExternal(true));
    }
View Full Code Here

     * w/ if not exists.
     * @throws Exception if exists
     */
    @Test
    public void w_if_not_exists() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo));
        emit(new SimpleCreateTable(table)
                .withSkipPresentTable(true));
    }
View Full Code Here

     * w/ dbname.
     * @throws Exception if exists
     */
    @Test
    public void w_dbname() throws Exception {
        SimpleTableInfo table = new SimpleTableInfo("testing")
            .withField(new SimpleFieldInfo("col1", TypeInfoFactory.intTypeInfo));
        emit(new SimpleCreateTable(table)
                .withDatabaseName("asakusa"));
    }
View Full Code Here

TOP

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

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.