Skip to content

Commit bd13489

Browse files
committed
Remove references to gcloud-java.
We were still using the old artifactId in some pom.xml files, so dpebot could not update these. Also, some READMEs needed updating from my grep search.
1 parent 2e3f285 commit bd13489

File tree

11 files changed

+97
-34
lines changed

11 files changed

+97
-34
lines changed

bigquery/cloud-client/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ These sample Java applications demonstrate how to access the BigQuery API using
66
the [Google Cloud Client Library for Java][google-cloud-java].
77

88
[BigQuery]: https://cloud.google.com/bigquery/
9-
[google-cloud-java]: https://github.com/GoogleCloudPlatform/gcloud-java
9+
[google-cloud-java]: https://github.com/GoogleCloudPlatform/google-cloud-java
1010

1111
## Quickstart
1212

bigquery/cloud-client/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@
3636
<dependencies>
3737
<dependency>
3838
<groupId>com.google.cloud</groupId>
39-
<artifactId>gcloud-java</artifactId>
40-
<version>0.2.8</version>
39+
<artifactId>google-cloud-bigquery</artifactId>
40+
<version>0.4.0</version>
4141
</dependency>
4242

4343
<!-- Test dependencies -->

datastore/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@
3434
<dependencies>
3535
<dependency>
3636
<groupId>com.google.cloud</groupId>
37-
<artifactId>gcloud-java-datastore</artifactId>
38-
<version>0.2.8</version>
37+
<artifactId>google-cloud-datastore</artifactId>
38+
<version>0.4.0</version>
3939
</dependency>
4040

4141
<!-- Test dependencies -->

datastore/src/test/java/com/google/datastore/snippets/ConceptsTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -813,7 +813,7 @@ public void testTransactionalRetry() {
813813
--retries;
814814
}
815815
}
816-
// Retry handling can also be configured and automatically applied using gcloud-java.
816+
// Retry handling can also be configured and automatically applied using google-cloud-java.
817817
// [END transactional_retry]
818818
assertSuccessfulTransfer(keys.get(0), keys.get(1));
819819
}

flexible/cloudstorage/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<!-- [START dependencies] -->
4747
<dependency>
4848
<groupId>com.google.cloud</groupId>
49-
<artifactId>gcloud-java-storage</artifactId>
50-
<version>0.2.8</version>
49+
<artifactId>google-cloud-storage</artifactId>
50+
<version>0.4.0</version>
5151
</dependency>
5252
<!-- [END dependencies] -->
5353
</dependencies>

flexible/datastore/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
<!-- [START dependencies] -->
4747
<dependency>
4848
<groupId>com.google.cloud</groupId>
49-
<artifactId>gcloud-java-datastore</artifactId>
50-
<version>0.2.8</version>
49+
<artifactId>google-cloud-datastore</artifactId>
50+
<version>0.4.0</version>
5151
</dependency>
5252
<!-- [END dependencies] -->
5353
</dependencies>

flexible/sparkjava/README.md

+79-17
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,110 @@
11
# SparkJava on App Engine Flexible Environment
22

3-
This app demonstrates how to use [`gcloud-java`'s Datastore client](https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-datastore#google-cloud-java-client-for-datastore) from within an [App Engine flexible environment](https://cloud.google.com/appengine/docs/flexible/java/hello-world) project using [SparkJava](http://sparkjava.com/). The app allows you to create and modify a database of "users", which contains their ID, name, and email information.
4-
5-
`gcloud-java` is an idiomatic Java client for [Google Cloud Platform](https://cloud.google.com/) services. Read more about the library [here](https://github.com/GoogleCloudPlatform/gcloud-java#google-cloud-java-client).
3+
This app demonstrates how to use [Datastore with the Google Cloud client
4+
library](https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore)
5+
from within an [App Engine flexible
6+
environment](https://cloud.google.com/appengine/docs/flexible/java/hello-world)
7+
project using [SparkJava](http://sparkjava.com/). The app allows you to create
8+
and modify a database of "users", which contains their ID, name, and email
9+
information.
10+
11+
The Google Cloud client library is an idiomatic Java client for [Google Cloud
12+
Platform](https://cloud.google.com/) services. Read more about the library
13+
[here](https://github.com/GoogleCloudPlatform/google-cloud-java).
614

715
Setup
816
-----
917

10-
1. Create a Google Developers Console project with the Datastore API enabled. [Follow these instructions](https://cloud.google.com/docs/authentication#preparation) to get your project set up. If you wish to deploy this application, you will also need to [enable billing](https://support.google.com/cloud/?rd=2#topic=6288636).
18+
1. Create a Google Cloud project with the Datastore API enabled.
19+
[Follow these
20+
instructions](https://cloud.google.com/docs/authentication#preparation) to
21+
get your project set up. If you wish to deploy this application, you will
22+
also need to [enable
23+
billing](https://support.google.com/cloud/?rd=2#topic=6288636).
1124

12-
2. Set up the local development environment by [installing the Google Cloud SDK](https://cloud.google.com/sdk/) and running the following commands in command line: `gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`.
25+
2. Set up the local development environment by [installing the Google Cloud
26+
SDK](https://cloud.google.com/sdk/) and running the following commands in
27+
command line: `gcloud auth login` and `gcloud config set project [YOUR
28+
PROJECT ID]`.
1329

14-
3. Ensure that you have Maven installed and configured to use Java 8. See installation instructions [here](https://maven.apache.org/install.html).
30+
3. Ensure that you have Maven installed and configured to use Java 8. See
31+
installation instructions [here](https://maven.apache.org/install.html).
1532

1633
Running locally
1734
---------------
1835

19-
Run the application on your local machine by typing the following into your command line from the `sparkjava` directory: `mvn clean package exec:java`. Navigate to `localhost:8080` to view and interact with the application.
36+
Run the application on your local machine by typing the following into your
37+
command line from the `sparkjava` directory: `mvn clean package exec:java`.
38+
Navigate to `localhost:8080` to view and interact with the application.
2039

2140
Deploying
2241
---------
2342

24-
If you've enabled billing (step 1 in [Setup](#Setup)), you can deploy the application to the web by running `mvn gcloud:deploy` from your command line (from the `sparkjava` directory).
43+
If you've enabled billing (step 1 in [Setup](#Setup)), you can deploy the
44+
application to the web by running `mvn gcloud:deploy` from your command line
45+
(from the `sparkjava` directory).
2546

2647
How does it work?
2748
-----------------
2849

29-
You'll notice that the source code is split into three folders: `appengine`, `java/com/google/appengine/sparkdemo`, and `resource/public`. The `appengine` folder contains a `Dockerfile` and an `app.yaml`, necessary files to [configure the VM environment](https://cloud.google.com/appengine/docs/managed-vms/config). The `java/com/google/appengine/sparkdemo` folder contains the controller code, which uses the `gcloud-java` library to modify the records in the Google Cloud Datastore. Finally, the `resource/public` folder contains the home webpage, which uses jQuery to send HTTP requests to create, remove, and update records.
30-
31-
Spark runs the [`main` method](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/java/com/google/appengine/sparkdemo/Main.java) upon server startup. The `main` method creates the controller, [`UserController`](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/java/com/google/appengine/sparkdemo/UserController.java). The URIs used to send HTTP requests in the [home page](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/resources/public/index.html) correspond to methods in the `UserController` class. For example, the `index.html` code for `create` makes a `POST` request to the path `/api/users` with a body containing the name and email of a user to add. `UserController` contains the following code to process that request:
50+
You'll notice that the source code is split into three folders: `appengine`,
51+
`java/com/google/appengine/sparkdemo`, and `resource/public`. The `appengine`
52+
folder contains a `Dockerfile` and an `app.yaml`, necessary files to [configure
53+
the VM
54+
environment](https://cloud.google.com/appengine/docs/managed-vms/config). The
55+
`java/com/google/appengine/sparkdemo` folder contains the controller code,
56+
which uses the Google Cloud client library to modify the records in the Google Cloud
57+
Datastore. Finally, the `resource/public` folder contains the home webpage,
58+
which uses jQuery to send HTTP requests to create, remove, and update records.
59+
60+
Spark runs the [`main`
61+
method](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/java/com/google/appengine/sparkdemo/Main.java)
62+
upon server startup. The `main` method creates the controller,
63+
[`UserController`](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/java/com/google/appengine/sparkdemo/UserController.java).
64+
The URIs used to send HTTP requests in the [home
65+
page](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/resources/public/index.html)
66+
correspond to methods in the `UserController` class. For example, the
67+
`index.html` code for `create` makes a `POST` request to the path `/api/users`
68+
with a body containing the name and email of a user to add. `UserController`
69+
contains the following code to process that request:
3270

3371
```java
3472
post("/api/users", (req, res) -> userService.createUser(
3573
req.queryParams("name"),
3674
req.queryParams("email),
3775
), json());
3876
```
39-
This code snippet gets the name and email of the user from the POST request and passes it to `createUser` (in [`UserService.java`](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/java/com/google/appengine/sparkdemo/UserService.java)) to create a database record using `gcloud-java`. If you want a more in-depth tutorial on using `gcloud-java` Datastore client, see the [Getting Started](https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-datastore#getting-started) section in the `gcloud-java-datastore` documentation.
40-
41-
Communication with the Google Cloud Datastore requires authentication and setting a project ID. When running locally, `gcloud-java` automatically detects your credentials and project ID because you logged into the Google Cloud SDK and set your project ID. There are also many other options for authenticating and setting a project ID. To read more, see the [Authentication](https://github.com/GoogleCloudPlatform/gcloud-java#authentication) and [Specifying a Project ID](https://github.com/GoogleCloudPlatform/gcloud-java#specifying-a-project-id) sections of the `gcloud-java` documentation.
42-
43-
You built and ran this application using Maven. To read more about using Maven with Managed VMs, see the [Using Apache Maven documentation](https://cloud.google.com/appengine/docs/java/managed-vms/maven). While this particular project uses Maven, `gcloud-java` can also be accessed using Gradle and SBT. See how to obtain the dependency in the [Quickstart section](https://github.com/GoogleCloudPlatform/gcloud-java#quickstart) of the `gcloud-java` documentation.
77+
This code snippet gets the name and email of the user from the POST request and
78+
passes it to `createUser` (in
79+
[`UserService.java`](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/managedvms/sparkjava-demo/src/main/java/com/google/appengine/sparkdemo/UserService.java))
80+
to create a database record using the Google Cloud client library. If you want
81+
a more in-depth tutorial on using Google Cloud client library Datastore client,
82+
see the [Getting
83+
Started](https://github.com/GoogleCloudPlatform/google-cloud-java/tree/master/google-cloud-datastore#getting-started)
84+
section of the client library documentation.
85+
86+
Communication with the Google Cloud Datastore requires authentication and
87+
setting a project ID. When running locally, the Google Cloud client library
88+
automatically detects your credentials and project ID because you logged into
89+
the Google Cloud SDK and set your project ID. There are also many other options
90+
for authenticating and setting a project ID. To read more, see the
91+
[Authentication](https://github.com/GoogleCloudPlatform/google-cloud-java#authentication)
92+
and [Specifying a Project
93+
ID](https://github.com/GoogleCloudPlatform/google-cloud-java#specifying-a-project-id)
94+
sections of the client library documentation.
95+
96+
You built and ran this application using Maven. To read more about using Maven
97+
with App Engine flexible environment, see the [Using Apache Maven
98+
documentation](https://cloud.google.com/appengine/docs/flexible/java/using-maven).
99+
While this particular project uses Maven, the Google Cloud client library
100+
packages can also be accessed using Gradle and SBT. See how to obtain the
101+
dependency in the [Quickstart
102+
section](https://github.com/GoogleCloudPlatform/google-cloud-java#quickstart)
103+
of the client library documentation.
44104
45105
License
46106
-------
47107
48-
Apache 2.0 - See [LICENSE](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/LICENSE) for more information.
108+
Apache 2.0 - See
109+
[LICENSE](https://github.com/GoogleCloudPlatform/java-docs-samples/blob/master/LICENSE)
110+
for more information.

flexible/sparkjava/pom.xml

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
</dependency>
3838
<dependency>
3939
<groupId>com.google.cloud</groupId>
40-
<artifactId>gcloud-java</artifactId>
41-
<version>0.2.7</version>
40+
<artifactId>google-cloud</artifactId>
41+
<version>0.4.0</version>
4242
</dependency>
4343
</dependencies>
4444
<build>

flexible/sparkjava/src/main/java/com/google/appengine/sparkdemo/UserController.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
public class UserController {
3232

3333
/**
34-
* Creates a controller that maps requests to gcloud-java functions.
34+
* Creates a controller that maps requests to actions.
3535
*/
3636
public UserController(final UserService userService) {
3737
Spark.staticFileLocation("/public");

flexible/sparkjava/src/main/java/com/google/appengine/sparkdemo/UserService.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class UserService {
3737
/**
3838
* Constructor for UserService.
3939
*
40-
* @param datastore gcloud-java Datastore service object to execute requests
40+
* @param datastore service object to execute requests
4141
* @param kind the kind for the Datastore entities in this demo
4242
*/
4343
public UserService(Datastore datastore, String kind) {

speech/grpc/src/main/java/com/examples/cloud/speech/StreamingRecognizeClient.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,10 @@ public StreamingRecognizeClient(ManagedChannel channel, String file, int samplin
8585

8686
speechClient = SpeechGrpc.newStub(channel);
8787

88-
//Send log4j logs to Console
89-
//If you are going to run this on GCE, you might wish to integrate with gcloud-java logging.
90-
//See https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/README.md#stackdriver-logging-alpha
88+
// Send log4j logs to Console
89+
// If you are going to run this on GCE, you might wish to integrate with
90+
// google-cloud-java logging. See:
91+
// https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/README.md#stackdriver-logging-alpha
9192

9293
ConsoleAppender appender = new ConsoleAppender(new SimpleLayout(), SYSTEM_OUT);
9394
logger.addAppender(appender);

0 commit comments

Comments
 (0)