public static <R> void doBatchWithCallback(List<? extends Row> actions, Object[] results, Callback<R> callback, ClusterConnection connection, ExecutorService pool, TableName tableName) throws InterruptedIOException, RetriesExhaustedWithDetailsException { int operationTimeout = connection.getConnectionConfiguration().getOperationTimeout(); int writeTimeout = connection.getConfiguration().getInt(HConstants.HBASE_RPC_WRITE_TIMEOUT_KEY, connection.getConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT)); AsyncProcessTask<R> task = AsyncProcessTask.newBuilder(callback) .setPool(pool) .setTableName(tableName) .setRowAccess(actions) .setResults(results) .setOperationTimeout(operationTimeout) .setRpcTimeout(writeTimeout) .setSubmittedRows(AsyncProcessTask.SubmittedRows.ALL) .build(); AsyncRequestFuture ars = connection.getAsyncProcess().submit(task); ars.waitUntilDone(); if (ars.hasError()) { throw ars.getErrors(); } }
AsyncProcess ap = ((ClusterConnection) HTU.getConnection()).getAsyncProcess();
multiAp = this.connection.getAsyncProcess(); this.locator = new HRegionLocator(tableName, connection);
@Override public AsyncProcess getAsyncProcess() { return wrappedConnection.getAsyncProcess(); }
public static <R> void doBatchWithCallback(List<? extends Row> actions, Object[] results, Callback<R> callback, ClusterConnection connection, ExecutorService pool, TableName tableName) throws InterruptedIOException, RetriesExhaustedWithDetailsException { int operationTimeout = connection.getConnectionConfiguration().getOperationTimeout(); int writeTimeout = connection.getConfiguration().getInt(HConstants.HBASE_RPC_WRITE_TIMEOUT_KEY, connection.getConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT)); AsyncProcessTask<R> task = AsyncProcessTask.newBuilder(callback) .setPool(pool) .setTableName(tableName) .setRowAccess(actions) .setResults(results) .setOperationTimeout(operationTimeout) .setRpcTimeout(writeTimeout) .setSubmittedRows(AsyncProcessTask.SubmittedRows.ALL) .build(); AsyncRequestFuture ars = connection.getAsyncProcess().submit(task); ars.waitUntilDone(); if (ars.hasError()) { throw ars.getErrors(); } }
multiAp = this.connection.getAsyncProcess(); this.locator = new HRegionLocator(tableName, connection);
/** * setup this HTable's parameter based on the passed configuration */ private void finishSetup() throws IOException { if (tableConfiguration == null) { tableConfiguration = new TableConfiguration(configuration); } this.operationTimeout = tableName.isSystemTable() ? tableConfiguration.getMetaOperationTimeout() : tableConfiguration.getOperationTimeout(); this.scannerCaching = tableConfiguration.getScannerCaching(); this.scannerMaxResultSize = tableConfiguration.getScannerMaxResultSize(); if (this.rpcCallerFactory == null) { this.rpcCallerFactory = connection.getNewRpcRetryingCallerFactory(configuration); } if (this.rpcControllerFactory == null) { this.rpcControllerFactory = RpcControllerFactory.instantiate(configuration); } // puts need to track errors globally due to how the APIs currently work. multiAp = this.connection.getAsyncProcess(); this.closed = false; this.locator = new HRegionLocator(tableName, connection); }
public static <R> void doBatchWithCallback(List<? extends Row> actions, Object[] results, Callback<R> callback, ClusterConnection connection, ExecutorService pool, TableName tableName) throws InterruptedIOException, RetriesExhaustedWithDetailsException { int operationTimeout = connection.getConnectionConfiguration().getOperationTimeout(); int writeTimeout = connection.getConfiguration().getInt(HConstants.HBASE_RPC_WRITE_TIMEOUT_KEY, connection.getConfiguration().getInt(HConstants.HBASE_RPC_TIMEOUT_KEY, HConstants.DEFAULT_HBASE_RPC_TIMEOUT)); AsyncProcessTask<R> task = AsyncProcessTask.newBuilder(callback) .setPool(pool) .setTableName(tableName) .setRowAccess(actions) .setResults(results) .setOperationTimeout(operationTimeout) .setRpcTimeout(writeTimeout) .setSubmittedRows(AsyncProcessTask.SubmittedRows.ALL) .build(); AsyncRequestFuture ars = connection.getAsyncProcess().submit(task); ars.waitUntilDone(); if (ars.hasError()) { throw ars.getErrors(); } }
multiAp = this.connection.getAsyncProcess(); this.locator = new HRegionLocator(tableName, connection);
AsyncProcess ap = ((ClusterConnection) HTU.getConnection()).getAsyncProcess();