gcloud-java

Is com.google.cloud.datastore.Datastore thread safe?

感情迁移 提交于 2020-03-04 08:57:07
问题 Is com.google.cloud.datastore.Datastore thread safe? More specifically, can one instance of Datastore be shared by multiple threads and can they all concurrently read from/write to the Cloud Datastore? In other words, if I'm building a Web Application that accesses the Cloud Datastore, do I need a single instance of the Datastore object or a pool of Datastore objects (just like JDBC connections to an RDBMS)? The API in question is http://googlecloudplatform.github.io/google-cloud-java/0.3.0

How do I authenticate my Java application with Google Cloud Storage?

半腔热情 提交于 2019-12-25 07:09:08
问题 I am writing a Java application to interact with files in Google Cloud Storage. I found gcloud-java which I'm trying to get working. Looking at their examples it seems I should be able to simply run them after having logged-in with gcloud , but it doesn't seem to be working. I'm trying to run StorageExample, which says " logged-in project will be used if not supplied ", but despite logging in I cannot access my project whether I specify it or not. $ gcloud auth login Your browser has been

How do I authenticate my Java application with Google Cloud Storage?

江枫思渺然 提交于 2019-12-25 07:07:04
问题 I am writing a Java application to interact with files in Google Cloud Storage. I found gcloud-java which I'm trying to get working. Looking at their examples it seems I should be able to simply run them after having logged-in with gcloud , but it doesn't seem to be working. I'm trying to run StorageExample, which says " logged-in project will be used if not supplied ", but despite logging in I cannot access my project whether I specify it or not. $ gcloud auth login Your browser has been

Spring Boot with Google Cloud Datastore API fails to run

浪子不回头ぞ 提交于 2019-12-22 07:59:45
问题 I am trying to configure Google Cloud Datastore API with Spring Boot in order to deploy it on Compute Engine. When I try to run the Spring Boot project locally, I keep on getting the following error org.apache.catalina.core.ContainerBase : A child container failed during start Problem I built a demo project using Spring Initizr (http://start.spring.io/) and added the maven dependency for Google Cloud Datastore API as following <dependency> <groupId>com.google.cloud</groupId> <artifactId

Spring Boot with Google Cloud Datastore API fails to run

流过昼夜 提交于 2019-12-05 16:10:24
I am trying to configure Google Cloud Datastore API with Spring Boot in order to deploy it on Compute Engine. When I try to run the Spring Boot project locally, I keep on getting the following error org.apache.catalina.core.ContainerBase : A child container failed during start Problem I built a demo project using Spring Initizr ( http://start.spring.io/ ) and added the maven dependency for Google Cloud Datastore API as following <dependency> <groupId>com.google.cloud</groupId> <artifactId>gcloud-java-datastore</artifactId> <version>0.2.0</version> </dependency> I am able to build the project

How to fix error: A project ID is required for this service but could not be determined

青春壹個敷衍的年華 提交于 2019-12-04 23:32:11
问题 I'm trying to insert data to Google Datastore from AppEngine and I'm getting an error: java.lang.IllegalArgumentException: A project ID is required for this service but could not be determined from the builder or the environment. Please set a project ID using the builder. at com.google.common.base.Preconditions.checkArgument(Preconditions.java:92) at com.google.cloud.ServiceOptions.<init>(ServiceOptions.java:324) at com.google.cloud.datastore.DatastoreOptions.<init>(DatastoreOptions.java:85)