7373import com .google .api .gax .rpc .StubSettings ;
7474import com .google .api .gax .rpc .UnaryCallSettings ;
7575import com .google .auth .Credentials ;
76- import com .google .auth .oauth2 .GoogleCredentials ;
7776import com .google .auth .oauth2 .ServiceAccountJwtAccessCredentials ;
7877import com .google .cloud .bigtable .admin .v2 .BigtableInstanceAdminSettings ;
7978import com .google .cloud .bigtable .admin .v2 .BigtableTableAdminSettings ;
@@ -136,11 +135,11 @@ public class BigtableHBaseVeneerSettings extends BigtableHBaseSettings {
136135 Optional .of (Duration .ofMinutes (5 )),
137136 Optional .of (Duration .ofMinutes (10 )),
138137 Optional .absent ()),
139- /* bulkMutateTimeouts = */ new OperationTimeouts (
138+ /* bulkMutateTimeouts= */ new OperationTimeouts (
140139 Optional .absent (),
141140 Optional .of (Duration .ofMinutes (1 )),
142141 Optional .of (Duration .ofMinutes (10 ))),
143- /* sampleRowKeysTimeouts = */ new OperationTimeouts (
142+ /* sampleRowKeysTimeouts= */ new OperationTimeouts (
144143 Optional .absent (),
145144 Optional .of (Duration .ofMinutes (5 )),
146145 Optional .of (Duration .ofMinutes (10 ))));
@@ -572,7 +571,7 @@ private void configureCredentialProvider(StubSettings.Builder<?, ?> stubSettings
572571 String jsonValue = configuration .get (BIGTABLE_SERVICE_ACCOUNT_JSON_VALUE_KEY );
573572 stubSettings .setCredentialsProvider (
574573 FixedCredentialsProvider .create (
575- GoogleCredentials .fromStream (
574+ ServiceAccountJwtAccessCredentials .fromStream (
576575 new ByteArrayInputStream (jsonValue .getBytes (StandardCharsets .UTF_8 )))));
577576
578577 } else if (!Strings .isNullOrEmpty (
@@ -581,7 +580,7 @@ private void configureCredentialProvider(StubSettings.Builder<?, ?> stubSettings
581580 configuration .get (BIGTABLE_SERVICE_ACCOUNT_JSON_KEYFILE_LOCATION_KEY );
582581 stubSettings .setCredentialsProvider (
583582 FixedCredentialsProvider .create (
584- GoogleCredentials .fromStream (new FileInputStream (keyFileLocation ))));
583+ ServiceAccountJwtAccessCredentials .fromStream (new FileInputStream (keyFileLocation ))));
585584
586585 } else if (!Strings .isNullOrEmpty (configuration .get (BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY ))) {
587586 String serviceAccount = configuration .get (BIGTABLE_SERVICE_ACCOUNT_EMAIL_KEY );
0 commit comments