Skip to content

Commit fe0ea55

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 971 b: refs/heads/master c: b60f5bf h: refs/heads/master i: 969: 217f8b8 967: fdabd32 v: v3
1 parent f8d6ef3 commit fe0ea55

17 files changed

Lines changed: 32 additions & 123 deletions

File tree

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
---
2-
refs/heads/master: 8310e70a70cce8ea3d39135177d1934037c30f62
2+
refs/heads/master: b60f5bf8005ee802315d4ba39279c36897ad4c85
33
refs/heads/travis: 0fa997e2fc9c6b61b2d91e6d163655aae67d44b6
44
refs/heads/gh-pages: 5a10432ecc75f29812e33a8236c900379509fe99

trunk/gcloud-java-core/README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
Google Cloud Java Client -- Core Services
2-
=========================================
1+
Google Cloud Java Client
2+
==========================
33

4-
This module provides common functionality required by service-specific modules of this library.
4+
Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
55

66
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88

99
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
10-
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/package-summary.html)
10+
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs)
1111
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html)
1212

13+
This module provides common functionality and is required by the other service specific modules.
14+
1315
Quickstart
1416
----------
1517
Add this to your pom.xml file

trunk/gcloud-java-core/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.9</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>

trunk/gcloud-java-datastore/README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
1-
Google Cloud Java Client for Datastore
2-
======================================
1+
Google Cloud Java Client
2+
==========================
33

4-
Java idiomatic client for [Google Cloud Datastore] (https://cloud.google.com/datastore/).
4+
Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
55

66
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88

99
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
10-
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/datastore/package-summary.html)
10+
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs)
1111
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html)
1212

13+
This client supports [Google Cloud Datastore] (https://cloud.google.com/datastore/)
14+
15+
1316
> Note: This client is a work-in-progress, and may occasionally
1417
> make backwards-incompatible changes.
1518

trunk/gcloud-java-datastore/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.9</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>

trunk/gcloud-java-examples/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ Examples for gcloud-java (Java idiomatic client for [Google Cloud Platform][clou
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88

99
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
10+
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs)
1011
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html)
1112

13+
1214
Quickstart
1315
----------
1416
Add this to your pom.xml file
@@ -20,6 +22,7 @@ Add this to your pom.xml file
2022
</dependency>
2123
```
2224

25+
2326
Contributing
2427
------------
2528

trunk/gcloud-java-examples/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.9</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>
Lines changed: 6 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
Google Cloud Java Client for Storage
2-
====================================
1+
Google Cloud Java Client
2+
==========================
33

4-
Java idiomatic client for [Google Cloud Storage] (https://cloud.google.com/storage/).
4+
Java idiomatic client for [Google Cloud Platform][cloud-platform] services.
55

66
[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
77
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
88

99
- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
10-
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/storage/package-summary.html)
10+
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs)
1111
- [Examples] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/examples/package-summary.html)
1212

13+
This client supports the [Google Cloud Storage] (https://cloud.google.com/storage/)
14+
1315
> Note: This client is a work-in-progress, and may occasionally
1416
> make backwards-incompatible changes.
1517
@@ -24,46 +26,6 @@ Add this to your pom.xml file
2426
</dependency>
2527
```
2628

27-
Google Cloud Storage
28-
----------------------
29-
30-
[Google Cloud Storage][cloud-storage] is a durable and highly available
31-
object storage service. Google Cloud Storage is almost infinitely scalable
32-
and guarantees consistency: when a write succeeds, the latest copy of the
33-
object will be returned to any GET, globally.
34-
35-
See the [Google Cloud Storage docs][cloud-storage-activation] for more details on how to activate
36-
Cloud Storage for your project.
37-
38-
See the ``gcloud-java`` API [storage documentation][storage-api] to learn how to interact
39-
with the Cloud Storage using this Client Library.
40-
41-
```java
42-
import static java.nio.charset.StandardCharsets.UTF_8;
43-
44-
import com.google.gcloud.storage.Blob;
45-
import com.google.gcloud.storage.Storage;
46-
import com.google.gcloud.storage.StorageFactory;
47-
import com.google.gcloud.storage.StorageOptions;
48-
49-
import java.nio.ByteBuffer;
50-
import java.nio.channels.WritableByteChannel;
51-
52-
StorageOptions options = StorageOptions.builder().projectId(PROJECT_ID).build();
53-
Storage storage = StorageFactory.instance().get(options);
54-
Blob blob = new Blob(storage, "bucket", "blob_name");
55-
if (!blob.exists()) {
56-
storage2.create(blob.info(), "Hello, Cloud Storage!".getBytes(UTF_8));
57-
} else {
58-
System.out.println("Updating content for " + blob.info().name());
59-
byte[] prevContent = blob.content();
60-
System.out.println(new String(prevContent, UTF_8));
61-
WritableByteChannel channel = blob.writer();
62-
channel.write(ByteBuffer.wrap("Updated content".getBytes(UTF_8)));
63-
channel.close();
64-
}
65-
```
66-
6729
Testing
6830
-------
6931

@@ -106,4 +68,3 @@ Apache 2.0 - See [LICENSE] for more information.
10668
[cloud-storage]: https://cloud.google.com/storage/
10769
[cloud-storage-docs]: https://cloud.google.com/storage/docs/overview
10870
[cloud-storage-create-bucket]: https://cloud.google.com/storage/docs/cloud-console#_creatingbuckets
109-
[storage-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/storage/package-summary.html

trunk/gcloud-java-storage/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<parent>
1212
<groupId>com.google.gcloud</groupId>
1313
<artifactId>gcloud-java-pom</artifactId>
14-
<version>0.0.9</version>
14+
<version>0.0.10-SNAPSHOT</version>
1515
</parent>
1616
<dependencies>
1717
<dependency>

trunk/gcloud-java-storage/src/main/java/com/google/gcloud/storage/testing/RemoteGcsHelper.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public class RemoteGcsHelper {
5050
private static final String BUCKET_NAME_PREFIX = "gcloud-test-bucket-temp-";
5151
private static final String PROJECT_ID_ENV_VAR = "GCLOUD_TESTS_PROJECT_ID";
5252
private static final String PRIVATE_KEY_ENV_VAR = "GCLOUD_TESTS_KEY";
53+
5354
private final StorageOptions options;
5455

5556
private RemoteGcsHelper(StorageOptions options) {
@@ -126,13 +127,7 @@ public static RemoteGcsHelper create(String projectId, String keyPath, Option...
126127
StorageOptions storageOptions = StorageOptions.builder()
127128
.authCredentials(AuthCredentials.createForJson(keyFileStream))
128129
.projectId(projectId)
129-
.retryParams(RetryParams.builder()
130-
.retryMaxAttempts(10)
131-
.retryMinAttempts(6)
132-
.maxRetryDelayMillis(30000)
133-
.totalRetryPeriodMillis(120000)
134-
.initialRetryDelayMillis(250)
135-
.build())
130+
.retryParams(RetryParams.getDefaultInstance())
136131
.build();
137132
return new RemoteGcsHelper(storageOptions);
138133
} catch (FileNotFoundException ex) {

0 commit comments

Comments
 (0)