@Test public void testTimeoutBeingPassed() throws IOException { int initialElapsedMs = 100; int rpcTimeoutMs = 500; int maxElapsedMs = 1000; int maxAttempt = 10; int readRowStreamTimeout = 30000; configuration.setBoolean(BIGTABLE_USE_TIMEOUTS_KEY, true); configuration.setInt(INITIAL_ELAPSED_BACKOFF_MILLIS_KEY, initialElapsedMs); configuration.setInt(BIGTABLE_RPC_TIMEOUT_MS_KEY, rpcTimeoutMs); configuration.setInt(MAX_ELAPSED_BACKOFF_MILLIS_KEY, maxElapsedMs); configuration.setInt(READ_PARTIAL_ROW_TIMEOUT_MS, rpcTimeoutMs); configuration.setLong(MAX_SCAN_TIMEOUT_RETRIES, maxAttempt); configuration.setInt(BIGTABLE_READ_RPC_TIMEOUT_MS_KEY, readRowStreamTimeout); BigtableDataSettings settings = ((BigtableHBaseVeneerSettings) BigtableHBaseVeneerSettings.create(configuration)) .getDataSettings(); RetrySettings readRowRetrySettings = settings.getStubSettings().readRowSettings().getRetrySettings(); assertEquals(initialElapsedMs, readRowRetrySettings.getInitialRetryDelay().toMillis()); assertEquals(rpcTimeoutMs, readRowRetrySettings.getInitialRpcTimeout().toMillis()); assertEquals(maxElapsedMs, readRowRetrySettings.getTotalTimeout().toMillis()); RetrySettings checkAndMutateRetrySettings = settings.getStubSettings().checkAndMutateRowSettings().getRetrySettings(); assertEquals(0, checkAndMutateRetrySettings.getInitialRetryDelay().toMillis()); assertEquals(rpcTimeoutMs, checkAndMutateRetrySettings.getTotalTimeout().toMillis()); RetrySettings readRowsRetrySettings = settings.getStubSettings().readRowsSettings().getRetrySettings(); assertEquals(initialElapsedMs, readRowsRetrySettings.getInitialRetryDelay().toMillis()); assertEquals(maxAttempt, readRowsRetrySettings.getMaxAttempts()); assertEquals(readRowStreamTimeout, readRowsRetrySettings.getTotalTimeout().toMillis()); }
public BigtableDataSettings getDataSettings() { return dataSettings; }
BigtableHBaseVeneerSettings extends BigtableHBaseSettings { public BigtableDataSettings getDataSettings() { return dataSettings; } }
BigtableHBaseVeneerSettings extends BigtableHBaseSettings { public BigtableDataSettings getDataSettings() { return dataSettings; } BigtableHBaseVeneerSettings(Configuration configuration); }
BigtableHBaseVeneerSettings extends BigtableHBaseSettings { public BigtableDataSettings getDataSettings() { return dataSettings; } BigtableHBaseVeneerSettings(Configuration configuration); @Override String getDataHost(); @Override String getAdminHost(); @Override int getPort(); @Override int getBulkMaxRowCount(); @Override long getBatchingMaxRequestSize(); @Override boolean isRetriesWithoutTimestampAllowed(); boolean isChannelPoolCachingEnabled(); BigtableDataSettings getDataSettings(); BigtableTableAdminSettings getTableAdminSettings(); @Nullable BigtableInstanceAdminSettings getInstanceAdminSettings(); }
BigtableHBaseVeneerSettings extends BigtableHBaseSettings { public BigtableDataSettings getDataSettings() { return dataSettings; } BigtableHBaseVeneerSettings(Configuration configuration); @Override String getDataHost(); @Override String getAdminHost(); @Override int getPort(); @Override int getBulkMaxRowCount(); @Override long getBatchingMaxRequestSize(); @Override boolean isRetriesWithoutTimestampAllowed(); boolean isChannelPoolCachingEnabled(); BigtableDataSettings getDataSettings(); BigtableTableAdminSettings getTableAdminSettings(); @Nullable BigtableInstanceAdminSettings getInstanceAdminSettings();  }