CREATE QUERY EXECUTOR POOL pool_name ['(' executorArg [, ...] ')'] [IF bool_expr]
executorArg:
MAX_EXECUTOR_POOL_SIZE ':' int_expr
| MIN_THREAD_COUNT ':' int_expr
| MAX_THREAD_COUNT ':' int_expr
| KEEP_ALIVE_SECS ':' long_expr
| THREADS_READ_RESULTS ':' bool_expr
| COMPLETION_QUEUE_SIZE ':' int_expr
Creates a named QueryExecutor 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);
// Then assign the connection a query executor pool name to use for queries
conn.setQueryExecutorPoolName("execPool");
// Now use connection in a query.