Source:
<code>public BigtableSession(BigtableOptions opts) throws IOException { this.options = resolveLegacyOptions(opts); Preconditions.checkArgument( !Strings.isNullOrEmpty(options.getProjectId()), PROJECT_ID_EMPTY_OR_NULL); Preconditions.checkArgument( !Strings.isNullOrEmpty(options.getInstanceId()), INSTANCE_ID_EMPTY_OR_NULL); Preconditions.checkArgument( !Strings.isNullOrEmpty(options.getUserAgent()), USER_AGENT_EMPTY_OR_NULL); LOG.info( "Opening connection for projectId %s, instanceId %s, " + "on data host %s, table admin host %s.", options.getProjectId(), options.getInstanceId(), options.getDataHost(), options.getTableAdminHost()); LOG.info("Bigtable options: %s.", options); List<ClientInterceptor> clientInterceptorsList = new ArrayList<>(); clientInterceptorsList.add( new GoogleCloudResourcePrefixInterceptor(options.getInstanceName().toString())); CredentialInterceptorCache credentialsCache = CredentialInterceptorCache.getInstance(); RetryOptions retryOptions = options.getRetryOptions(); CredentialOptions credentialOptions = options.getCredentialOptions(); try { ClientInterceptor credentialsInterceptor = credentialsCache.getCredentialsInterceptor(credentialOptions, retryOptions); if (credentialsInterceptor != null) { clientInterceptorsList.add(credentialsInterceptor); } } catch (GeneralSecurityException e) { throw new IOException("Could not initialize credentials.", e); } <START> clientInterceptorsList.add(throttlingClientInterceptor); <END> clientInterceptors = clientInterceptorsList.toArray(new ClientInterceptor[clientInterceptorsList.size()]); ChannelPool dataChannel = getDataChannelPool(); BigtableSessionSharedThreadPools sharedPools = BigtableSessionSharedThreadPools.getInstance(); this.dataClient = new BigtableDataGrpcClient(dataChannel, sharedPools.getRetryExecutor(), options); dataClient.setCallOptionsFactory( new CallOptionsFactory.ConfiguredCallOptionsFactory(options.getCallOptionsConfig())); BigtableClientMetrics.counter(MetricLevel.Info, "sessions.active").inc(); initializeResourceLimiter(options); }</code><technical_language>I throttle fetching oauth token. If token is expire throttle request unblock request, token expired</technical_language>

Target:
public BigtableSession(BigtableOptions opts) throws IOException { this.options = resolveLegacyOptions(opts); Preconditions.checkArgument( !Strings.isNullOrEmpty(options.getProjectId()), PROJECT_ID_EMPTY_OR_NULL); Preconditions.checkArgument( !Strings.isNullOrEmpty(options.getInstanceId()), INSTANCE_ID_EMPTY_OR_NULL); Preconditions.checkArgument( !Strings.isNullOrEmpty(options.getUserAgent()), USER_AGENT_EMPTY_OR_NULL); LOG.info( "Opening connection for projectId %s, instanceId %s, " + "on data host %s, table admin host %s.", options.getProjectId(), options.getInstanceId(), options.getDataHost(), options.getTableAdminHost()); LOG.info("Bigtable options: %s.", options); List<ClientInterceptor> clientInterceptorsList = new ArrayList<>(); clientInterceptorsList.add(throttlingClientInterceptor); clientInterceptorsList .add(new GoogleCloudResourcePrefixInterceptor(options.getInstanceName().toString())); CredentialInterceptorCache credentialsCache = CredentialInterceptorCache.getInstance(); RetryOptions retryOptions = options.getRetryOptions(); CredentialOptions credentialOptions = options.getCredentialOptions(); try { ClientInterceptor credentialsInterceptor = credentialsCache.getCredentialsInterceptor(credentialOptions, retryOptions); if (credentialsInterceptor != null) { clientInterceptorsList.add(credentialsInterceptor); } } catch (GeneralSecurityException e) { throw new IOException("Could not initialize credentials.", e); } clientInterceptors = clientInterceptorsList.toArray(new ClientInterceptor[clientInterceptorsList.size()]); ChannelPool dataChannel = getDataChannelPool(); BigtableSessionSharedThreadPools sharedPools = BigtableSessionSharedThreadPools.getInstance(); this.dataClient = new BigtableDataGrpcClient(dataChannel, sharedPools.getRetryExecutor(), options); dataClient.setCallOptionsFactory( new CallOptionsFactory.ConfiguredCallOptionsFactory(options.getCallOptionsConfig())); BigtableClientMetrics.counter(MetricLevel.Info, "sessions.active").inc(); initializeResourceLimiter(options); }