RetryOptions (Cloud Bigtable HBase Client for Java 0.9.3-SNAPSHOT API)

com.google.cloud.bigtable.config

Class RetryOptions

  • All Implemented Interfaces:
    Serializable


    public class RetryOptions
    extends Object
    implements Serializable
    Options for retrying requests, including back off configuration.
    Version:
    $Id: $Id
    Author:
    sduskis
    See Also:
    Serialized Form
    • 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 ImmutableSet<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: 2).
        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

        public RetryOptions(boolean retriesEnabled,
                            boolean allowRetriesWithoutTimestamp,
                            int initialBackoffMillis,
                            double backoffMultiplier,
                            int maxElaspedBackoffMillis,
                            int streamingBufferSize,
                            int readPartialRowTimeoutMillis,
                            int maxScanTimeoutRetries,
                            ImmutableSet<io.grpc.Status.Code> statusToRetryOn)

        Constructor for RetryOptions.

        Parameters:
        retriesEnabled - a boolean.
        allowRetriesWithoutTimestamp - a boolean.
        initialBackoffMillis - a int.
        backoffMultiplier - a double.
        maxElaspedBackoffMillis - a int.
        streamingBufferSize - a int.
        streamingBatchSize - a int.
        readPartialRowTimeoutMillis - a int.
        maxScanTimeoutRetries - a int.
        statusToRetryOn - a ImmutableSet object.
    • Method Detail

      • getInitialBackoffMillis

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

        public int getMaxElaspedBackoffMillis()
        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.
      • createBackoff

        public com.google.api.client.util.BackOff createBackoff()

        createBackoff.

        Returns:
        a BackOff object.
      • createBackoffBuilder

        protected com.google.api.client.util.ExponentialBackOff.Builder createBackoffBuilder()

        createBackoffBuilder.

        Returns:
        a ExponentialBackOff.Builder object.


Send feedback about...

Cloud Bigtable Documentation