private static void setClientCallOptions(Configuration configuration, BigtableOptions.Builder bigtableOptionsBuilder) { CallOptionsConfig.Builder clientCallOptionsBuilder = CallOptionsConfig.builder(); clientCallOptionsBuilder .setUseTimeout(configuration.getBoolean(BIGTABLE_USE_TIMEOUTS_KEY, USE_TIMEOUT_DEFAULT)); clientCallOptionsBuilder.setShortRpcTimeoutMs( configuration.getInt(BIGTABLE_RPC_TIMEOUT_MS_KEY, SHORT_TIMEOUT_MS_DEFAULT)); clientCallOptionsBuilder.setLongRpcTimeoutMs( configuration.getInt(BIGTABLE_LONG_RPC_TIMEOUT_MS_KEY, LONG_TIMEOUT_MS_DEFAULT)); bigtableOptionsBuilder.setCallOptionsConfig(clientCallOptionsBuilder.build()); }
@Deprecated public Builder() { options = new BigtableOptions(); options.appProfileId = BIGTABLE_APP_PROFILE_DEFAULT; // Optional configuration for hosts - useful for the Bigtable team, more than anything else. options.dataHost = BIGTABLE_DATA_HOST_DEFAULT; options.adminHost = BIGTABLE_ADMIN_HOST_DEFAULT; options.port = BIGTABLE_PORT_DEFAULT; options.dataChannelCount = BIGTABLE_DATA_CHANNEL_COUNT_DEFAULT; options.usePlaintextNegotiation = false; options.useCachedDataPool = false; options.retryOptions = new RetryOptions.Builder().build(); options.callOptionsConfig = new CallOptionsConfig.Builder().build(); // CredentialOptions.defaultCredentials() gets credentials from well known locations, such as // the Google Compute Engine metadata service or gcloud configuration in other environments. A // user can also override the default behavior with P12 or JSON configuration. options.credentialOptions = CredentialOptions.defaultCredentials(); options.useBatch = false; }
public static Builder builder() { return new Builder(); }
/** * <p>toBuilder.</p> * * @return a {@link com.google.cloud.bigtable.config.CallOptionsConfig.Builder} object. */ public Builder toBuilder() { return new Builder(this); }
/** * The amount of milliseconds to wait before issuing a client side timeout for short RPCs. * @param timeoutMs * @return this for chaining */ @Deprecated public Builder setTimeoutMs(int timeoutMs) { return setShortRpcTimeoutMs(timeoutMs); }
private static void setClientCallOptions(Configuration configuration, BigtableOptions.Builder bigtableOptionsBuilder) { CallOptionsConfig.Builder clientCallOptionsBuilder = CallOptionsConfig.builder(); clientCallOptionsBuilder .setUseTimeout(configuration.getBoolean(BIGTABLE_USE_TIMEOUTS_KEY, USE_TIMEOUT_DEFAULT)); clientCallOptionsBuilder.setShortRpcTimeoutMs( configuration.getInt(BIGTABLE_RPC_TIMEOUT_MS_KEY, SHORT_TIMEOUT_MS_DEFAULT)); clientCallOptionsBuilder.setLongRpcTimeoutMs( configuration.getInt(BIGTABLE_LONG_RPC_TIMEOUT_MS_KEY, LONG_TIMEOUT_MS_DEFAULT)); bigtableOptionsBuilder.setCallOptionsConfig(clientCallOptionsBuilder.build()); }