Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge master into bigquery #488

Merged
merged 138 commits into from
Dec 18, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
f4c3a32
Add more detail to README's authentication section
Nov 6, 2015
fe57e98
Add project ID order and clean docs language
Nov 6, 2015
7a72399
Add iterateAll method to Page, update example and snippet
mziccard Nov 6, 2015
c084250
Add project ID section
Nov 6, 2015
67fdcc0
fix order of project ID lookup, cleanup
Nov 6, 2015
74a39cc
Merge pull request #332 from ajkannan/cred-docs
aozarov Nov 6, 2015
2ce257f
update auth dependency
Nov 7, 2015
e063bc5
Auth cleanup
Nov 7, 2015
9394d28
Remove DefaultAuthCredentials from serialization tests, since there a…
Nov 7, 2015
2de9135
Merge pull request #336 from ajkannan/update-oauth-libs
aozarov Nov 7, 2015
076127d
Add loop for empty pages in PageImpl.iterateAll
mziccard Nov 7, 2015
6074605
Modify project id lookup order and revert style changes
Nov 9, 2015
0a04229
Merge pull request #333 from mziccard/all-pages-iterator
aozarov Nov 9, 2015
b2e1131
scope appliation default credentials
aozarov Nov 10, 2015
49e3bd8
Merge pull request #343 from aozarov/temp
ajkannan Nov 10, 2015
d3db640
Revert 2de9135149e57cec18b070028452db1efef03125
ajkannan Nov 10, 2015
54b8472
Merge pull request #344 from GoogleCloudPlatform/revert-336-update-oa…
aozarov Nov 10, 2015
ad12f41
Allow services to avoid setting project ID
Nov 10, 2015
93c834e
Update version to 0.0.11 in preparation for 0.0.11 release
Nov 10, 2015
1f78e67
Merge pull request #347 from ajkannan/update-pom-v0.0.11
aozarov Nov 10, 2015
ffbfba4
Updating version in README files.
Nov 10, 2015
fc72ea0
Update version to 0.0.12-SNAPSHOT
Nov 10, 2015
98e9c03
Merge pull request #348 from ajkannan/change-version-to-0.0.12-SNAPSHOT
aozarov Nov 10, 2015
6c40825
Make projectIdRequired() method protected. Also supply nice error me…
Nov 10, 2015
ed1d437
Merge pull request #346 from ajkannan/project-id-optional
aozarov Nov 10, 2015
bfd54bd
replace rewrite with copy in the javadoc
aozarov Nov 11, 2015
c440ac5
Merge pull request #352 from aozarov/temp
mziccard Nov 11, 2015
dde30aa
Add javadoc to Acl
mziccard Nov 11, 2015
93dd0c2
Add javadoc to Blob
mziccard Nov 11, 2015
6de12f2
Add javadoc to BlobId
mziccard Nov 11, 2015
e2a4500
Add javadoc to Bucket
mziccard Nov 11, 2015
9608e61
Add javadoc to Cors
mziccard Nov 11, 2015
67bfcdd
Switch from enum to String for location and storageClass in BucketInf…
mziccard Nov 11, 2015
ecaf751
Add javadoc to BlobInfo
mziccard Nov 11, 2015
b9ef508
Add javadoc to Storage
mziccard Nov 11, 2015
3125167
Add getDefaultInstance method to StorageOptions and DatastoreOptions
mziccard Nov 11, 2015
d7845b8
Rename getDefaultInstance to defaultInstance and update READMEs
mziccard Nov 11, 2015
d026540
Make RetryParams conform with our code style
mziccard Nov 11, 2015
b28b307
Make ExceptionHandler conform with our code style
mziccard Nov 11, 2015
abc11ce
Use DatastoreOptions.defaultInstance in site example
mziccard Nov 11, 2015
e4471f9
Merge pull request #357 from mziccard/options-default-instance
aozarov Nov 11, 2015
7193d0d
More detailed javadoc for BlobInfo
mziccard Nov 12, 2015
5f9eaa4
Better javadoc for (Bucket/Blob)ListOptions.prefix
mziccard Nov 12, 2015
9979502
Merge pull request #356 from mziccard/storage-javadoc
aozarov Nov 12, 2015
b8defb8
Better javadoc for BucketInfo
mziccard Nov 12, 2015
da0ea58
Removed unused import from BucketInfo
mziccard Nov 12, 2015
ea56c11
Merge pull request #355 from mziccard/enums-to-string-bucket
aozarov Nov 12, 2015
2ffac2d
Move generation from BlobInfo to BlobId
mziccard Nov 12, 2015
6c961b6
Create version 0.0.12
Nov 12, 2015
29d9c23
Merge pull request #369 from ajkannan/update-version-0.0.12
aozarov Nov 12, 2015
2fd8066
Updating version in README files.
Nov 12, 2015
af10dbf
Update version to 0.0.13-SNAPSHOT
Nov 13, 2015
6890fa1
Merge pull request #370 from ajkannan/update-version-0.0.13-SNAPSHOT
aozarov Nov 13, 2015
f0ce897
Remove Blob(Source/Get)Option.setGeneration method, add Storage.optio…
mziccard Nov 13, 2015
3311969
Set blob generation before sending requests in DefaultStorageRpc
mziccard Nov 13, 2015
dc71a56
Simplify package-info examples
Nov 13, 2015
22f52ae
Document that we should wait until artifacts are pushed to finish rel…
Nov 13, 2015
f3c8274
Fix code to get app engine ID
Nov 13, 2015
b67dad7
Merge pull request #378 from ajkannan/reflection-fix
aozarov Nov 13, 2015
522ed56
Merge pull request #377 from ajkannan/releasing-docs
aozarov Nov 13, 2015
1bcdf4b
Make package info wording clearer
Nov 13, 2015
cf777fc
Fix setting ContentRange to inclusive positions
mziccard Nov 13, 2015
b7099e0
Merge pull request #376 from ajkannan/update-pkg-info-examples
mziccard Nov 13, 2015
d039537
Merge pull request #375 from mziccard/fix-content-range
aozarov Nov 13, 2015
77dab2c
Remove extra central repository deploy
Nov 14, 2015
3f6d791
Add additional deploy check comment
Nov 14, 2015
29d8ec3
Merge pull request #379 from ajkannan/push-to-maven-once
aozarov Nov 14, 2015
315a0eb
Merge pull request #366 from mziccard/add-generation-blob-id
aozarov Nov 14, 2015
76cb620
Better document delete methods
mziccard Nov 17, 2015
e22e8a3
Make batch delete return false if not found
mziccard Nov 17, 2015
c3b6616
Use GOOGLE_APPLICATION_CREDENTIALS and GCLOUD_PROJECT vars in RemoteG…
mziccard Nov 9, 2015
82ebc71
Add support for signUrl when default credentials are used
mziccard Nov 17, 2015
4ecd840
Merge pull request #339 from mziccard/integration-test-env-vars
aozarov Nov 17, 2015
93da8a9
fix readmes for storage
aozarov Nov 18, 2015
101048e
Merge pull request #389 from aozarov/temp
mziccard Nov 18, 2015
87e4bac
Fix BlobWriteChannel and BlobReadChannel javadoc
mziccard Nov 18, 2015
6537314
BlobReadChannel fails if blob is updated while being read
mziccard Nov 18, 2015
1e7fe54
Move all checks for HTTP_NOT_FOUND to DefaultStorageRpc
mziccard Nov 18, 2015
a4c4273
Merge pull request #380 from mziccard/fix-delete-batch
aozarov Nov 18, 2015
a560777
Use version auth library verison 0.3.1 to avoid NPE
Nov 18, 2015
f995b12
Merge to get AuthCredentials updates
Nov 18, 2015
02694ca
Update javadoc for FullEntity
aozarov Nov 19, 2015
bfe8924
Add message check to IT tests, better javadoc for storage.reader
mziccard Nov 19, 2015
39829a0
Merge pull request #390 from mziccard/rewriter-check-blob-update
aozarov Nov 19, 2015
bbf3cb6
Merge pull request #393 from aozarov/temp
ludoch Nov 20, 2015
a07fbda
Add step-by-step datastore guide
Nov 19, 2015
424f144
fix snippets to match full code
Nov 20, 2015
b48d163
Merge pull request #399 from ajkannan/fix-docs
aozarov Nov 20, 2015
791fba1
Add links to gcloud-common docs in READMEs
Nov 20, 2015
78f8f28
Limit batch deletes to 100, issue serveral batch if limit's exceeded
mziccard Nov 20, 2015
dba9efb
Merge pull request #401 from mziccard/limit-batch-deletes
aozarov Nov 20, 2015
84c91bc
fix link to auth readme
Nov 21, 2015
347d5be
use anchors in links
Nov 21, 2015
08c0f28
Add step-by-step guide for storage README
Nov 21, 2015
a6da17e
Merge pull request #404 from ajkannan/link-docs
aozarov Nov 21, 2015
3af2bba
fix storage readme sample
Nov 23, 2015
8ebfdf8
add link to bucket naming rules
Nov 23, 2015
a27282e
Merge pull request #405 from ajkannan/add-storage-examples
aozarov Nov 23, 2015
539ac61
Add back AppEngineCredentials
Nov 23, 2015
fc2ab10
Avoid throwing exception when checking isLocalHost in Datastore
Nov 24, 2015
8808c54
Add link about datastore indexing in docs
Nov 24, 2015
d8a6159
Merge pull request #411 from ajkannan/fix-socket-api-bug
aozarov Nov 24, 2015
a23d8f9
Merge pull request #412 from ajkannan/datastore-index-link
aozarov Nov 24, 2015
0a05851
Translate SocketTimeoutException to retryable service exception
mziccard Nov 24, 2015
a0f2d20
Set special reason for timeout exceptions
mziccard Nov 24, 2015
1a6dcde
Fix toBuilder so that info.equals(info.toBuilder().build()) is true
mziccard Nov 24, 2015
2ef47e8
Use NetHttpTransport when running on Compute
Nov 24, 2015
f87a394
Fix dependency on two different versions of the GoogleCredential class
Nov 25, 2015
2c90245
Merge pull request #337 from ajkannan/auth-cleanup
aozarov Nov 25, 2015
bbc968e
Merge pull request #414 from mziccard/retry-on-timeout
aozarov Nov 25, 2015
a25e504
Merge pull request #416 from mziccard/fix-storage-to-builder
aozarov Nov 25, 2015
1830275
Enable travis to branches other than master
mziccard Nov 30, 2015
80c7a96
Merge pull request #424 from mziccard/test-all-branches
aozarov Nov 30, 2015
57d6e3f
Remove dependency on http initializer in AuthCredentials and remove d…
Dec 1, 2015
b5c1cae
Use null instead of NO_CREDENTIALS
Dec 1, 2015
12078e0
Make AppEngineAuthCredentials Restorable
Dec 1, 2015
af94b53
cleanup + cast fix
Dec 1, 2015
18cbb77
style fix
Dec 1, 2015
942ceb4
more style fixes
Dec 2, 2015
ab8ca97
Merge pull request #430 from ajkannan/remove-initializer-dependency
ajkannan Dec 2, 2015
3980ba7
update version to 0.1.0
Dec 2, 2015
45c49b7
Merge pull request #432 from ajkannan/update-minor-version
aozarov Dec 2, 2015
a615317
Updating version in README files. [ci skip]
Dec 2, 2015
e1c770e
Update version to snapshot
Dec 2, 2015
761b9a6
Merge pull request #433 from ajkannan/update-to-snapshot
ajkannan Dec 2, 2015
6c472d5
Add release notes to RELEASING
Dec 2, 2015
231b84a
Update release notes procedure
Dec 2, 2015
abf6b06
add note about creating new draft
ajkannan Dec 2, 2015
217a356
Merge pull request #435 from ajkannan/update-releasing-docs
aozarov Dec 3, 2015
ba9059c
Fix gradle dependency in README.md
mziccard Dec 3, 2015
c920387
Merge pull request #437 from mziccard/fix-gradle-dependency
aozarov Dec 3, 2015
c36b857
fix checkstyle issues and warnings
Dec 10, 2015
d0eec71
Add generic type to ServiceOption definition + minor fixes
Dec 10, 2015
21d985c
Merge pull request #446 from ajkannan/fix-checkstyle-errors
aozarov Dec 10, 2015
f22e41f
Specify HTTP Transport in DefaultDatastoreRpc
Dec 11, 2015
e86259d
Merge pull request #448 from ajkannan/specify-transport
aozarov Dec 11, 2015
2271ab9
Merge branch 'master' into bigquery
mziccard Dec 18, 2015
a08e7bb
Change poms and code to match with master udpates
mziccard Dec 18, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ before_install:
install: mvn install -DskipTests=true -Dgpg.skip=true
script:
- utilities/verify.sh
branches:
only:
- master
after_success:
- utilities/after_success.sh
env:
Expand Down
74 changes: 63 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.gcloud</groupId>
<artifactId>gcloud-java</artifactId>
<version>0.0.10</version>
<version>0.1.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.gcloud:gcloud-java:jar:0.0.10'
compile 'com.google.gcloud:gcloud-java:0.1.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.gcloud" % "gcloud-java" % "0.0.10"
libraryDependencies += "com.google.gcloud" % "gcloud-java" % "0.1.0"
```

Example Applications
Expand All @@ -45,15 +45,63 @@ Example Applications
- [`StorageExample`](https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/gcloud-java-examples/src/main/java/com/google/gcloud/examples/StorageExample.java) - A simple command line interface providing some of Cloud Storage's functionality
- Read more about using this application on the [`gcloud-java-examples` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/StorageExample.html).

Specifying a Project ID
-----------------------

Most `gcloud-java` libraries require a project ID. There are multiple ways to specify this project ID.

1. When using `gcloud-java` libraries from within Compute/App Engine, there's no need to specify a project ID. It is automatically inferred from the production environment.
2. When using `gcloud-java` elsewhere, you can do one of the following:
* Supply the project ID when building the service options. For example, to use Datastore from a project with ID "PROJECT_ID", you can write:

```java
Datastore datastore = DatastoreOptions.builder().projectId("PROJECT_ID").build().service();
```
* Specify the environment variable `GCLOUD_PROJECT` to be your desired project ID.
* Set the project ID using the [Google Cloud SDK](https://cloud.google.com/sdk/?hl=en). To use the SDK, [download the SDK](https://cloud.google.com/sdk/?hl=en) if you haven't already, and set the project ID from the command line. For example:

```
gcloud config set project PROJECT_ID
```

`gcloud-java` determines the project ID from the following sources in the listed order, stopping once it finds a value:

1. Project ID supplied when building the service options
2. Project ID specified by the environment variable `GCLOUD_PROJECT`
3. App Engine project ID
4. Google Cloud SDK project ID
5. Compute Engine project ID

Authentication
--------------

There are multiple ways to authenticate to use Google Cloud services.
First, ensure that the necessary Google Cloud APIs are enabled for your project. To do this, follow the instructions on the [authentication document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/authentication/readme.md#authentication) shared by all the gcloud language libraries.

Next, choose a method for authenticating API requests from within your project:

1. When using `gcloud-java` libraries from within Compute/App Engine, no additional authentication steps are necessary.
2. When using `gcloud-java` libraries elsewhere, there are two options:
* [Generate a JSON service account key](https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts). Supply a path to the downloaded JSON credentials file when building the options supplied to datastore/storage constructor.
* If running locally for development/testing, you can use use [Google Cloud SDK](https://cloud.google.com/sdk/?hl=en). To use the SDK authentication, [download the SDK](https://cloud.google.com/sdk/?hl=en) if you haven't already. Then login using the SDK (`gcloud auth login` in command line), and set your current project using `gcloud config set project PROJECT_ID`.
* [Generate a JSON service account key](https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts). After downloading that key, you must do one of the following:
* Define the environment variable GOOGLE_APPLICATION_CREDENTIALS to be the location of the key. For example:
```bash
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/my/key.json
```
* Supply the JSON credentials file when building the service options. For example, this Storage object has the necessary permissions to interact with your Google Cloud Storage data:
```java
Storage storage = StorageOptions.builder()
.authCredentials(AuthCredentials.createForJson(new FileInputStream("/path/to/my/key.json"))
.build()
.service();
```
* If running locally for development/testing, you can use use Google Cloud SDK. Download the SDK if you haven't already, then login using the SDK (`gcloud auth login` in command line). Be sure to set your project ID as described above.

`gcloud-java` looks for credentials in the following order, stopping once it finds credentials:

1. Credentials supplied when building the service options
2. App Engine credentials
3. Key file pointed to by the GOOGLE_APPLICATION_CREDENTIALS environment variable
4. Google Cloud SDK credentials
5. Compute Engine credentials

Google Cloud Datastore
----------------------
Expand All @@ -75,7 +123,7 @@ import com.google.gcloud.datastore.Entity;
import com.google.gcloud.datastore.Key;
import com.google.gcloud.datastore.KeyFactory;

Datastore datastore = DatastoreOptions.getDefaultInstance().service();
Datastore datastore = DatastoreOptions.defaultInstance().service();
KeyFactory keyFactory = datastore.newKeyFactory().kind(KIND);
Key key = keyFactory.newKey(keyName);
Entity entity = datastore.get(key);
Expand Down Expand Up @@ -118,8 +166,7 @@ import com.google.gcloud.storage.StorageOptions;
import java.nio.ByteBuffer;
import java.nio.channels.WritableByteChannel;

StorageOptions options = StorageOptions.builder().projectId("project").build();
Storage storage = options.service();
Storage storage = StorageOptions.defaultInstance().service();
BlobId blobId = BlobId.of("bucket", "blob_name");
Blob blob = Blob.load(storage, blobId);
if (blob == null) {
Expand All @@ -135,6 +182,11 @@ if (blob == null) {
}
```

Troubleshooting
---------------

To get help, follow the `gcloud-java` links in the `gcloud-*` [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting).

Java Versions
-------------

Expand All @@ -161,7 +213,7 @@ Contributing

Contributions to this library are always welcome and highly encouraged.

See [CONTRIBUTING] for more information on how to get started.
See `gcloud-java`'s [CONTRIBUTING] documentation and the `gcloud-*` [shared documentation](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information.

Expand All @@ -172,7 +224,7 @@ Apache 2.0 - See [LICENSE] for more information.


[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md
[code-of-conduct]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CODE_OF_CONDUCT.md
[code-of-conduct]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE
[TESTING]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/TESTING.md
[cloud-platform]: https://cloud.google.com/
Expand Down
16 changes: 12 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,21 @@ This script takes an optional argument denoting the new version. By default, if
2. Create a PR to update the pom.xml version.
The PR should look something like [#225](https://github.com/GoogleCloudPlatform/gcloud-java/pull/225). After this PR is merged into GoogleCloudPlatform/gcloud-java, Travis CI will push a new website to GoogleCloudPlatform/gh-pages, push a new artifact to the Maven Central Repository, and update versions in the README files.

3. Create a release on Github manually.
Go to the [releases page](https://github.com/GoogleCloudPlatform/gcloud-java/releases) and click "Draft a new release." Use `vX.Y.Z` as the "Tag Version" and `X.Y.Z` as the "Release Title", where `X.Y.Z` is the release version as listed in the `pom.xml` files.
3. Before moving on, verify that the artifacts have successfully been pushed to the Maven Central Repository. Open Travis CI, click the ["Build History" tab](https://travis-ci.org/GoogleCloudPlatform/gcloud-java/builds), and open the second build's logs for Step 2's PR. Be sure that you are not opening the "Pull Request" build logs. When the build finishes, scroll to the end of the log and verify that the artifacts were successfully staged and deployed. You can also search for `gcloud-java` on the [Sonatype website](https://oss.sonatype.org/#nexus-search;quick~gcloud-java) and check the latest version number. If the deployment didn't succeed because of a flaky test, rerun the build.

4. Run `utilities/update_pom_version.sh` again (to include "-SNAPSHOT" in the project version).
4. Publish a release on Github manually.
Go to the [releases page](https://github.com/GoogleCloudPlatform/gcloud-java/releases) and open the appropriate release draft. Make sure the "Tag Version" is `vX.Y.Z` and the "Release Title" is `X.Y.Z`, where `X.Y.Z` is the release version as listed in the `pom.xml` files. The draft should already have all changes that impact users since the previous release. To double check this, you can use the `git log` command and look through the merged master branch pull requests. Here is an example of the log command to get non-merge commits between v0.0.12 and v0.1.0:

```
git --no-pager log v0.0.12..v0.1.0 --pretty=oneline --abbrev-commit --no-merges
```

Ensure that the format is consistent with previous releases (for an example, see the [0.1.0 release](https://github.com/GoogleCloudPlatform/gcloud-java/releases/tag/v0.1.0)). After adding any missing updates and reformatting as necessary, publish the draft. Finally, create a new draft for the next release.

5. Run `utilities/update_pom_version.sh` again (to include "-SNAPSHOT" in the project version).
As mentioned before, there is an optional version argument. By default, the script will update the version from "X.Y.Z" to "X.Y.Z+1-SNAPSHOT". Suppose a different version is desired, for example X+1.0.0-SNAPSHOT. Then the appropriate command to run would be `utilities/update_pom_version.sh X+1.0.0-SNAPSHOT`.

5. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).
6. Create and merge in another PR to reflect the updated project version. For an example of what this PR should look like, see [#227](https://github.com/GoogleCloudPlatform/gcloud-java/pull/227).

### To push a snapshot version

Expand Down
2 changes: 1 addition & 1 deletion gcloud-java-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.gcloud</groupId>
<artifactId>gcloud-java-pom</artifactId>
<version>0.0.11-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>gcloud-java-bigquery</site.installationModule>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,6 @@ public void setUp() {
EasyMock.replay(rpcFactoryMock);
options = BigQueryOptions.builder()
.projectId(PROJECT)
.authCredentials(AuthCredentials.noCredentials())
.serviceRpcFactory(rpcFactoryMock)
.build();
}
Expand Down Expand Up @@ -1011,7 +1010,7 @@ public void testRetryableException() {
.andThrow(new BigQueryException(500, "InternalError", true))
.andReturn(DATASET_INFO_WITH_PROJECT.toPb());
EasyMock.replay(bigqueryRpcMock);
bigquery = options.toBuilder().retryParams(RetryParams.getDefaultInstance()).build().service();
bigquery = options.toBuilder().retryParams(RetryParams.defaultInstance()).build().service();
DatasetInfo dataset = bigquery.getDataset(DATASET);
assertEquals(DATASET_INFO_WITH_PROJECT, dataset);
}
Expand All @@ -1022,7 +1021,7 @@ public void testNonRetryableException() {
EasyMock.expect(bigqueryRpcMock.getDataset(DATASET, EMPTY_RPC_OPTIONS))
.andThrow(new BigQueryException(501, exceptionMessage, false));
EasyMock.replay(bigqueryRpcMock);
bigquery = options.toBuilder().retryParams(RetryParams.getDefaultInstance()).build().service();
bigquery = options.toBuilder().retryParams(RetryParams.defaultInstance()).build().service();
thrown.expect(BigQueryException.class);
thrown.expectMessage(exceptionMessage);
bigquery.getDataset(DatasetId.of(DATASET));
Expand All @@ -1034,7 +1033,7 @@ public void testRuntimeException() {
EasyMock.expect(bigqueryRpcMock.getDataset(DATASET, EMPTY_RPC_OPTIONS))
.andThrow(new RuntimeException(exceptionMessage));
EasyMock.replay(bigqueryRpcMock);
bigquery = options.toBuilder().retryParams(RetryParams.getDefaultInstance()).build().service();
bigquery = options.toBuilder().retryParams(RetryParams.defaultInstance()).build().service();
thrown.expect(BigQueryException.class);
thrown.expectMessage(exceptionMessage);
bigquery.getDataset(DATASET);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,8 @@ public void testServiceOptions() throws Exception {

options = options.toBuilder()
.projectId("p2")
.retryParams(RetryParams.getDefaultInstance())
.authCredentials(AuthCredentials.noCredentials())
.retryParams(RetryParams.defaultInstance())
.authCredentials(null)
.build();
serializedCopy = serializeAndDeserialize(options);
assertEquals(options, serializedCopy);
Expand Down
16 changes: 12 additions & 4 deletions gcloud-java-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,23 @@ If you are using Maven, add this to your pom.xml file
<dependency>
<groupId>com.google.gcloud</groupId>
<artifactId>gcloud-java-core</artifactId>
<version>0.0.10</version>
<version>0.1.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.gcloud:gcloud-java-core:jar:0.0.10'
compile 'com.google.gcloud:gcloud-java-core:jar:0.1.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.gcloud" % "gcloud-java-core" % "0.0.10"
libraryDependencies += "com.google.gcloud" % "gcloud-java-core" % "0.1.0"
```

Troubleshooting
---------------

To get help, follow the `gcloud-java` links in the `gcloud-*` [shared Troubleshooting document](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/troubleshooting/readme.md#troubleshooting).

Java Versions
-------------

Expand All @@ -39,7 +44,9 @@ Contributing

Contributions to this library are always welcome and highly encouraged.

See [CONTRIBUTING] for more information on how to get started.
See `gcloud-java`'s [CONTRIBUTING] documentation and the `gcloud-*` [shared documentation](https://github.com/GoogleCloudPlatform/gcloud-common/blob/master/contributing/readme.md#how-to-contribute-to-gcloud) for more information on how to get started.

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more information.

Versioning
----------
Expand All @@ -57,5 +64,6 @@ Apache 2.0 - See [LICENSE] for more information.


[CONTRIBUTING]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CONTRIBUTING.md
[code-of-conduct]:https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct
[LICENSE]: https://github.com/GoogleCloudPlatform/gcloud-java/blob/master/LICENSE
[cloud-platform]: https://cloud.google.com/
12 changes: 9 additions & 3 deletions gcloud-java-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<parent>
<groupId>com.google.gcloud</groupId>
<artifactId>gcloud-java-pom</artifactId>
<version>0.0.11-SNAPSHOT</version>
<version>0.1.1-SNAPSHOT</version>
</parent>
<properties>
<site.installationModule>gcloud-java-core</site.installationModule>
Expand All @@ -20,12 +20,18 @@
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-credentials</artifactId>
<version>0.1.0</version>
<version>0.3.1</version>
</dependency>
<dependency>
<groupId>com.google.auth</groupId>
<artifactId>google-auth-library-oauth2-http</artifactId>
<version>0.1.0</version>
<version>0.3.1</version>
<exclusions>
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava-jdk5</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.google.http-client</groupId>
Expand Down
Loading