File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
google-cloud-spanner-executor/src/main/java/com/google/cloud/executor/spanner Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 2727import com .google .api .gax .rpc .UnavailableException ;
2828import com .google .auth .Credentials ;
2929import com .google .auth .oauth2 .GoogleCredentials ;
30+ import com .google .auth .oauth2 .ServiceAccountCredentials ;
3031import com .google .cloud .ByteArray ;
3132import com .google .cloud .Date ;
3233import com .google .cloud .NoCredentials ;
@@ -888,7 +889,7 @@ private synchronized TraceServiceClient getTraceServiceClient() throws IOExcepti
888889 credentials = NoCredentials .getInstance ();
889890 } else {
890891 credentials =
891- GoogleCredentials .fromStream (
892+ ServiceAccountCredentials .fromStream (
892893 new ByteArrayInputStream (
893894 FileUtils .readFileToByteArray (new File (WorkerProxy .serviceKeyFile ))),
894895 HTTP_TRANSPORT_FACTORY );
Original file line number Diff line number Diff line change 1919import com .google .api .client .http .javanet .NetHttpTransport ;
2020import com .google .auth .Credentials ;
2121import com .google .auth .http .HttpTransportFactory ;
22- import com .google .auth .oauth2 .GoogleCredentials ;
22+ import com .google .auth .oauth2 .ServiceAccountCredentials ;
2323import com .google .cloud .opentelemetry .trace .TraceConfiguration ;
2424import com .google .cloud .opentelemetry .trace .TraceExporter ;
2525import com .google .cloud .spanner .ErrorCode ;
@@ -87,7 +87,7 @@ public static OpenTelemetrySdk setupOpenTelemetrySdk() throws Exception {
8787 // Read credentials from the serviceKeyFile.
8888 HttpTransportFactory HTTP_TRANSPORT_FACTORY = NetHttpTransport ::new ;
8989 Credentials credentials =
90- GoogleCredentials .fromStream (
90+ ServiceAccountCredentials .fromStream (
9191 new ByteArrayInputStream (FileUtils .readFileToByteArray (new File (serviceKeyFile ))),
9292 HTTP_TRANSPORT_FACTORY );
9393
You can’t perform that action at this time.
0 commit comments