use of org.jclouds.googlecloud.GoogleCredentialsFromJson in project hive by apache.
the class CloudComputeService method getCredentialsFromJsonKeyFile.
public static Credentials getCredentialsFromJsonKeyFile(String filename) throws IOException {
String fileContents = Files.toString(new File(filename), UTF_8);
Supplier<Credentials> credentialSupplier = new GoogleCredentialsFromJson(fileContents);
return credentialSupplier.get();
}
Aggregations