/** * <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()); }
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;
new CallOptionsFactory.ConfiguredCallOptionsFactory(options.getCallOptionsConfig()); dataClient = new BigtableDataGrpcClient(dataChannel, sharedPools.getRetryExecutor(), options); dataClient.setCallOptionsFactory(callOptionsFactory); ClientInterceptors.intercept(dataChannel, new ThrottlingClientInterceptor(resourceLimiter)); throttlingDataClient = new BigtableDataGrpcClient(asyncDataChannel, sharedPools.getRetryExecutor(), options);