@Override public void run() { // The first invocation of BigtableSessionSharedThreadPools.getInstance() is expensive. // Reference it so that it gets constructed asynchronously. BigtableSessionSharedThreadPools.getInstance(); } });
/** * <p>createBulkMutation.</p> * * @param tableName a {@link com.google.cloud.bigtable.grpc.BigtableTableName} object. * @return a {@link com.google.cloud.bigtable.grpc.async.BulkMutation} object. */ public BulkMutation createBulkMutation(BigtableTableName tableName) { return new BulkMutation( tableName, throttlingDataClient, BigtableSessionSharedThreadPools.getInstance().getRetryExecutor(), options.getBulkOptions()); }
/** * <p>createBulkRead.</p> * * @param tableName a {@link com.google.cloud.bigtable.grpc.BigtableTableName} object. * @return a {@link com.google.cloud.bigtable.grpc.async.BulkRead} object. */ public BulkRead createBulkRead(BigtableTableName tableName) { return new BulkRead(dataClient, tableName, options.getBulkOptions().getBulkMaxRowKeyCount(), BigtableSessionSharedThreadPools.getInstance().getBatchThreadPool() ); }
private WatchdogInterceptor setupWatchdog() { Preconditions.checkState(watchdog == null, "Watchdog already setup"); watchdog = new Watchdog(Clock.SYSTEM, options.getRetryOptions().getReadPartialRowTimeoutMillis()); watchdog.start(BigtableSessionSharedThreadPools.getInstance().getRetryExecutor()); return new WatchdogInterceptor( ImmutableSet.<MethodDescriptor<?, ?>>of(BigtableGrpc.getReadRowsMethod()), watchdog); }
/** * <p>Getter for the field <code>tableAdminClient</code>.</p> * * @return a {@link com.google.cloud.bigtable.grpc.BigtableTableAdminClient} object. * @throws java.io.IOException if any. */ public synchronized BigtableTableAdminClient getTableAdminClient() throws IOException { if (tableAdminClient == null) { ManagedChannel channel = createManagedPool(options.getAdminHost(), 1); tableAdminClient = new BigtableTableAdminGrpcClient(channel, BigtableSessionSharedThreadPools.getInstance().getRetryExecutor(), options); } return tableAdminClient; }
BigtableSessionSharedThreadPools.getInstance().getRetryExecutor().scheduleAtFixedRate(r, 20, 20, TimeUnit.SECONDS); isThrottling = true;
BigtableSessionSharedThreadPools sharedPools = BigtableSessionSharedThreadPools.getInstance();