RetryOptions (Cloud Bigtable HBase Client for Java 1.12.0 API)

com.google.cloud.bigtable.config

Class RetryOptions

    • Field Detail

      • DEFAULT_STREAMING_BUFFER_SIZE

        public static int DEFAULT_STREAMING_BUFFER_SIZE
        Constant DEFAULT_STREAMING_BUFFER_SIZE=60
      • DEFAULT_ENABLE_GRPC_RETRIES

        public static final boolean DEFAULT_ENABLE_GRPC_RETRIES
        Flag indicating whether or not grpc retries should be enabled. The default is to enable retries on failed idempotent operations.
        See Also:
        Constant Field Values
      • DEFAULT_ENABLE_GRPC_RETRIES_SET

        public static final Set<io.grpc.Status.Code> DEFAULT_ENABLE_GRPC_RETRIES_SET
        Constant DEFAULT_ENABLE_GRPC_RETRIES_SET
      • DEFAULT_READ_PARTIAL_ROW_TIMEOUT_MS

        public static final int DEFAULT_READ_PARTIAL_ROW_TIMEOUT_MS
        We can timeout when reading large cells with a low value here. With a 10MB cell limit, 60 seconds allows our connection to drop to ~170kbyte/s. A 10 second timeout requires 1Mbyte/s
      • DEFAULT_INITIAL_BACKOFF_MILLIS

        public static final int DEFAULT_INITIAL_BACKOFF_MILLIS
        Initial amount of time to wait before retrying failed operations (default value: 5ms).
        See Also:
        Constant Field Values
      • DEFAULT_BACKOFF_MULTIPLIER

        public static final double DEFAULT_BACKOFF_MULTIPLIER
        Multiplier to apply to wait times after failed retries (default value: 1.5).
        See Also:
        Constant Field Values
      • DEFAULT_MAX_ELAPSED_BACKOFF_MILLIS

        public static final int DEFAULT_MAX_ELAPSED_BACKOFF_MILLIS
        Maximum amount of time to retry before failing the operation (default value: 60 seconds).
      • DEFAULT_MAX_SCAN_TIMEOUT_RETRIES

        public static final int DEFAULT_MAX_SCAN_TIMEOUT_RETRIES
        Maximum number of times to retry after a scan timeout
        See Also:
        Constant Field Values
    • Constructor Detail

      • RetryOptions

        @Deprecated
        public RetryOptions(boolean retriesEnabled,
                                        boolean allowRetriesWithoutTimestamp,
                                        int initialBackoffMillis,
                                        double backoffMultiplier,
                                        int maxElapsedBackoffMillis,
                                        int streamingBufferSize,
                                        int readPartialRowTimeoutMillis,
                                        int maxScanTimeoutRetries,
                                        Set<io.grpc.Status.Code> statusToRetryOn)
        Deprecated. 
        Constructor for RetryOptions.
        Parameters:
        retriesEnabled - a boolean.
        allowRetriesWithoutTimestamp - a boolean.
        initialBackoffMillis - a int.
        backoffMultiplier - a double.
        maxElapsedBackoffMillis - a int.
        streamingBufferSize - a int.
        readPartialRowTimeoutMillis - a int.
        maxScanTimeoutRetries - a int.
        statusToRetryOn - a Set.
    • Method Detail

      • getDefaultOptions

        public static RetryOptions getDefaultOptions()
      • getInitialBackoffMillis

        public int getInitialBackoffMillis()
        The amount of time in milliseconds we will wait for our first error retry.
        Returns:
        a int.
      • getMaxElapsedBackoffMillis

        public int getMaxElapsedBackoffMillis()
        Maximum amount of time we will retry an operation that is failing.
        Returns:
        a int.
      • getBackoffMultiplier

        public double getBackoffMultiplier()
        Multiplier we will apply to backoff times between retries.
        Returns:
        a double.
      • enableRetries

        public boolean enableRetries()
        Enable or disable retries.
        Returns:
        a boolean.
      • allowRetriesWithoutTimestamp

        public boolean allowRetriesWithoutTimestamp()
        Should retries be allowed even if a timestamp isn't set?
        Returns:
        a boolean.
      • retryOnDeadlineExceeded

        public boolean retryOnDeadlineExceeded()
        Whether to retry on deadline exceeded.
        Returns:
        a boolean.
      • getStreamingBufferSize

        public int getStreamingBufferSize()
        The maximum number of messages to buffer when scanning.
        Returns:
        a int.
      • getReadPartialRowTimeoutMillis

        public int getReadPartialRowTimeoutMillis()
        A timeout for reading individual ReadRowsResponse messages from a stream.
        Returns:
        a int.
      • getMaxScanTimeoutRetries

        public int getMaxScanTimeoutRetries()
        The maximum number of times to retry after a scan timeout.
        Returns:
        a int.
      • isRetryable

        public boolean isRetryable(io.grpc.Status.Code code)
        Determines if the RPC should be retried based on the input Status.Code.
        Parameters:
        code - a Status.Code object.
        Returns:
        a boolean.
      • getRetryableStatusCodes

        public Set<io.grpc.Status.Code> getRetryableStatusCodes()
        Returns Set of Status.Code that allow RPC retries.
        Returns:
        a Set.