Package org.apache.hadoop.hbase.hbql.client

Examples of org.apache.hadoop.hbase.hbql.client.HConnection.execute()


                     + "  val1 STRING ALIAS val1, "
                     + "  val2 STRING ALIAS val2, "
                     + "  val3 STRING ALIAS val3, "
                     + "  val4 STRING ALIAS val4 "
                     + "))");
        conn.execute("INSERT INTO fooMapping (keyval, val1, val2) "
                     + "SELECT keyval, val3, val4 FROM foo2");

        // END SNIPPET: insert3

    }
View Full Code Here


    public void insert4() throws HBqlException {

        HConnection conn = HConnectionManager.newConnection();

        // START SNIPPET: insert4
        conn.execute("CREATE MAPPING fooMapping FOR TABLE foo_table "
                     + "("
                     + "keyval KEY, "
                     + "family1 ("
                     + "  val1 STRING, "
                     + "  val2 STRING, "
View Full Code Here

                     + "  val1 STRING, "
                     + "  val2 STRING, "
                     + "  val3 STRING ALIAS val3, "
                     + "  val4 STRING ALIAS val4 "
                     + "))");
        conn.execute("INSERT INTO fooMapping (keyval, family1(val1, val2)) "
                     + "SELECT keyval, val3, val4 FROM foo2");

        // END SNIPPET: insert4

    }
View Full Code Here

        // START SNIPPET: create-mapping1

        HConnection conn = HConnectionManager.newConnection();

        // Mapping named foo that corresponds to table foo.
        conn.execute("CREATE TEMP MAPPING foo (keyval key, family1 (val1 STRING))");
        // END SNIPPET: create-mapping1

        // START SNIPPET: create-mapping2

        // Mapping named mapping1 that corresponds to table foo.
View Full Code Here

        // END SNIPPET: create-mapping1

        // START SNIPPET: create-mapping2

        // Mapping named mapping1 that corresponds to table foo.
        conn.execute("CREATE MAPPING mapping1 FOR TABLE foo (keyval key, family1 (val1 STRING ALIAS val2))");
        // END SNIPPET: create-mapping2

        // START SNIPPET: create-mapping3

        // A column with a default value.
View Full Code Here

        // END SNIPPET: create-mapping2

        // START SNIPPET: create-mapping3

        // A column with a default value.
        conn.execute("CREATE MAPPING mapping1 FOR TABLE foo "
                     + "("
                     + "keyval key, "
                     + "family1 (val1 STRING ALIAS val1 DEFAULT 'this is a default value')"
                     + ")");
        // END SNIPPET: create-mapping3
View Full Code Here

        // END SNIPPET: create-mapping3

        // START SNIPPET: create-mapping4

        // A Mapping with a with an INCLUDE UNMAPPED clause.
        conn.execute("CREATE TEMP MAPPING mapping1 FOR TABLE foo "
                     + "("
                     + "keyval key, "
                     + "family1 INCLUDE UNMAPPED ("
                     + "  val1 STRING ALIAS val1, "
                     + "  val2 STRING ALIAS val3 "
View Full Code Here

        // START SNIPPET: create-query-executor-pool

        HConnection conn = HConnectionManager.newConnection();

        // Create Query Executor Pool named execPool if it doesn't already exist.
        conn.execute("CREATE QUERY EXECUTOR POOL execPool (MAX_EXECUTOR_POOL_SIZE: 5, MAX_THREAD_COUNT: 10) IF NOT queryExecutorPoolExists('execPool')");

        // Or, using the API
        if (!QueryExecutorPoolManager.queryExecutorPoolExists("execPool"))
            QueryExecutorPoolManager.newQueryExecutorPool("execPool", 5, 5, 10, Long.MAX_VALUE, true, 100);
View Full Code Here

        // START SNIPPET: create-async-executor

        HConnection conn = HConnectionManager.newConnection();

        // Create AsyncExecutor named asyncExec if it doesn't already exist.
        conn.execute("CREATE ASYNC EXECUTOR asyncExec (MAX_THREAD_COUNT: 10) IF NOT asyncExecutorExists('asyncExec')");

        // Or, using the API
        if (!AsyncExecutorManager.asyncExecutorExists("asyncExec"))
            AsyncExecutorManager.newAsyncExecutor("asyncExec", 5, 10, Long.MAX_VALUE);
View Full Code Here

        // START SNIPPET: drop-query-executor-pool

        HConnection conn = HConnectionManager.newConnection();

        conn.execute("DROP QUERY EXECUTOR POOL execPool IF queryExecutorPoolExists('execPool')");

        // Or, using the API
        if (QueryExecutorPoolManager.queryExecutorPoolExists("execPool"))
            QueryExecutorPoolManager.dropQueryExecutorPool("execPool");
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.