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

Update pubsub-alpha branch with the changes from master #913

Merged
merged 114 commits into from
Apr 13, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
a77fd34
Update values and keys to v1beta3
Sep 14, 2015
9f40a5f
Default projectId and namespace are empty strings, NullValue and Date…
Sep 14, 2015
660d67b
Merge pull request #161 from ajkannan/update-datastore
ajkannan Sep 19, 2015
e078469
Updates to write-related code for datastore v1beta3 update
Sep 23, 2015
959d67d
cleanup v1beta3 changes and fix LocalGcdHelper bugs
Sep 25, 2015
9463c55
Fix handling of host in DatastoreOptions.java
Oct 1, 2015
4d2fe25
Remove scheme from localhost and check if user-provided host is null/…
Oct 5, 2015
e0aaaba
Fix version in LocalGcdHelper and check for null values when removing…
Oct 5, 2015
843718a
Merge pull request #173 from ajkannan/v1beta3-write-update
ajkannan Oct 5, 2015
c029c37
Update query-related datastore code to v1beta3
Oct 5, 2015
16afb0d
fix distinct and cursor code
Oct 13, 2015
acf2c42
Include cursor workaround, fix distinct in StructuredQuery, and remov…
Oct 15, 2015
0c2f9e9
standardize distinctOn naming
Oct 15, 2015
35ea69a
Add missing case for start_cursor
Oct 16, 2015
af6ab8f
Merge pull request #212 from ajkannan/v1beta3-query-update
aozarov Oct 16, 2015
02a56a8
Don't allow user to set project id or namespace to null
Oct 16, 2015
a98d096
remove extra firstNonNull in KeyFactory
Oct 16, 2015
8245607
Merge pull request #269 from ajkannan/nonnull-projID-namespace
aozarov Oct 16, 2015
f6eeddd
Support GeoPoint value in Datastore v1beta3
Oct 19, 2015
3ccc7ed
Add getters, remove filtering
Oct 20, 2015
d75b0da
rename accessors in geopoint
Oct 20, 2015
241960f
rename geopoint to latlng
Oct 20, 2015
9e4692d
Merge pull request #270 from ajkannan/geopoint-value
aozarov Oct 20, 2015
50a5a66
Query continuation implemented for GqlQuery + tests
Oct 19, 2015
b270c64
Set namespace in Gql's nextQuery and add another batch to tests
Oct 21, 2015
6ffe927
remove changes to structured query's builder and instead use fromPb i…
Oct 21, 2015
b54c501
Merge pull request #273 from ajkannan/gql-pagination
aozarov Oct 22, 2015
bba6925
pull updates from upstream/master into update-datastore branch
Oct 22, 2015
482954f
Merge pull request #277 from ajkannan/pull-updates
aozarov Oct 22, 2015
3d7ea2c
update afterCursor javadoc
Jan 15, 2016
0864393
Merge pull request #555 from ajkannan/add-cursor-after-docs
ajkannan Jan 16, 2016
ec57eb2
Merge changes from upstream/master
Jan 29, 2016
71d91aa
Fixed missed merge conflict
Jan 29, 2016
fbe5a1d
Merge remote-tracking branch 'upstream/master' into update-datastore
Feb 2, 2016
d27d567
Fix ServiceOptions merge bug, remove unnecessary protected modifier f…
Feb 2, 2016
667e606
Merge pull request #598 from ajkannan/update-datastore
aozarov Feb 2, 2016
7e498c1
Remove userinfo scope from DatastoreOptions
Mar 1, 2016
b4bd1b9
Merge pull request #690 from ajkannan/remove-user-info-scope
aozarov Mar 1, 2016
c95e5e7
Allow eventual consistency for Datastore reads
Feb 18, 2016
76e3b3e
Clean up test code and javadoc formatting
Mar 1, 2016
0d794ea
Improve eventual consistency javadoc
Mar 1, 2016
47aae51
Merge pull request #691 from ajkannan/v1beta3-read-consistency
ajkannan Mar 1, 2016
f2f93bc
Release v0.1.6
Mar 29, 2016
3df14dd
Merge pull request #799 from ajkannan/release-0.1.6
ajkannan Mar 29, 2016
7004918
Updating version in README files. [ci skip]
Mar 29, 2016
d2dc5e7
Update version to 0.1.7-SNAPSHOT
Mar 29, 2016
f97385f
Merge pull request #801 from ajkannan/pom-version-0.1.7-SNAPSHOT
ajkannan Mar 29, 2016
4ee0e32
update pom.xml to include DNS in javadoc groups
aozarov Mar 29, 2016
249cac6
Merge pull request #802 from aozarov/master
ajkannan Mar 29, 2016
7849e6e
Add pkg info for dns
Mar 29, 2016
2819942
Merge pull request #805 from ajkannan/dns-testing-pkg-info
ajkannan Mar 29, 2016
712b255
Add common interface for field selectors
mziccard Mar 29, 2016
69476eb
Add comment about releasing new modules
Mar 29, 2016
6747274
Merge pull request #806 from ajkannan/releasing-new-module
ajkannan Mar 29, 2016
2b52294
Merge conflict resolution.
Mar 29, 2016
1ca9616
Merge pull request #817 from ajkannan/bring-v1beta3-up-to-speed
ajkannan Mar 30, 2016
4d7cb29
Check if record added
Mar 30, 2016
1710a4c
Refactor field selection and helpers
mziccard Mar 30, 2016
80268f7
allow cleanup if record not added
Mar 30, 2016
acacd1d
Update codacy configuration
mziccard Mar 30, 2016
45c4665
Merge pull request #822 from ajkannan/improve-dns-it
aozarov Mar 30, 2016
637860c
Update dependencies
Mar 30, 2016
98c6974
Merge pull request #825 from ajkannan/update-deps
aozarov Mar 31, 2016
a248465
Merge pull request #823 from mziccard/codacy-conf
aozarov Mar 31, 2016
8db4b9b
Minor refactoring for SelectorHelper
mziccard Mar 30, 2016
4b1a4fd
Merge pull request #807 from mziccard/field-selector
mziccard Mar 31, 2016
379a0a8
Get projectId from gcloud active config
mziccard Mar 31, 2016
6cbddff
Merge pull request #831 from mziccard/active-gcloud-project
aozarov Apr 1, 2016
3324808
Rename id to generatedId for BigQuery resources
mziccard Apr 1, 2016
d4faad3
Rename id to generatedId for Storage resources
mziccard Apr 1, 2016
8df138b
Rename id to generatedId for Dns resources
mziccard Apr 1, 2016
5fea95f
Merge pull request #832 from mziccard/rename-id
ajkannan Apr 1, 2016
bf918e5
Merge remote-tracking branch 'upstream/update-datastore' into merge-v…
Apr 1, 2016
c70d9d7
Merge pull request #833 from ajkannan/merge-v1beta3
aozarov Apr 1, 2016
883c60e
rename QueryStage id to generatedId
Apr 1, 2016
43b2ef9
Release 0.1.7
Apr 1, 2016
0849646
Merge pull request #834 from ajkannan/rename-query-stage-id
aozarov Apr 1, 2016
9a8d156
Remove flaky tests
Apr 1, 2016
e1a17f0
Merge pull request #837 from ajkannan/comment-out-bigquery-its
aozarov Apr 1, 2016
df86a44
Fix endpoint
Apr 1, 2016
ba07c3f
Merge pull request #838 from ajkannan/fix-endpoint
aozarov Apr 1, 2016
106fae9
Merge pull request #835 from ajkannan/release-0.1.7
ajkannan Apr 1, 2016
6f54be2
Updating version in README files. [ci skip]
Apr 1, 2016
85d0188
Update to version 0.1.8-SNAPSHOT
Apr 2, 2016
545f099
Merge pull request #842 from ajkannan/version-0.1.8-snapshot
ajkannan Apr 2, 2016
59cdf37
Update ruby logo
mziccard Apr 4, 2016
d17e325
Extract projectId from GOOGLE_APPLICATION_CREDENTIALS if set
mziccard Apr 4, 2016
560d0b6
Modified methods in ChangeRequest.
mderka Apr 4, 2016
25ccf08
Fix Storage API activation instructions
ajkannan Apr 5, 2016
3e7069a
Addressed codacy issues in DNS.
mderka Apr 5, 2016
33a81a0
Job.isDone() returns true if the job does not exist
mziccard Apr 5, 2016
b29df66
Merge pull request #853 from mziccard/fix-job-isdone
mziccard Apr 5, 2016
804d447
Add ServiceAccountSigner interface, enable signing for AE credentials
mziccard Apr 6, 2016
29b1ea5
Merge pull request #854 from mziccard/signing-auth-interface
mziccard Apr 6, 2016
254fcc3
Add getting-started-java repo to releasing docs
ajkannan Apr 7, 2016
fae2908
Add examples
ajkannan Apr 7, 2016
5b4ea32
Remove check for empty list and add deprecated to javadoc for meaning…
ajkannan Apr 7, 2016
a8ec412
Fix checkstyle issues in gcloud-java-core (#871)
mziccard Apr 7, 2016
bdc472a
Add default retry params that align with SLA (#860)
ajkannan Apr 7, 2016
6987b00
Remove unnecessary project ID normalization (#875)
ajkannan Apr 7, 2016
53a60d1
Clean up LocalGcdHelper and docs (#821)
ajkannan Apr 8, 2016
1eb3522
Add javadoc for meaning deprecation (#878)
ajkannan Apr 8, 2016
af18b50
Suppress unchecked warning for defaultServiceFactory, defaultRpcFacto…
mziccard Apr 8, 2016
5dadf6a
Move test helpers' tests to testing package (#891)
mziccard Apr 11, 2016
099ada0
Add expiration date to App Engine credentials (#894)
ajkannan Apr 11, 2016
de23a12
Add release profile and use it to deploy artifacts (#889)
mziccard Apr 12, 2016
67609ee
Cleanup build scripts (#858)
ajkannan Apr 12, 2016
2fc3c21
Rename com.google.gcloud to com.google.cloud (#899)
ajkannan Apr 12, 2016
d947afb
Release 0.2.0 with repackaging note (#904)
ajkannan Apr 12, 2016
f652533
Updating version in README files. [ci skip]
Apr 12, 2016
74d6fd9
update version to 0.2.1-SNAPSHOT (#905)
ajkannan Apr 12, 2016
37a16ae
Remove unused apt files and fix homepage URLs (#906)
mziccard Apr 12, 2016
e8854d8
Merge branch 'pubsub-alpha' of https://github.com/GoogleCloudPlatform…
aozarov Apr 13, 2016
613f19d
update pubsub pom
aozarov Apr 13, 2016
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
157 changes: 83 additions & 74 deletions README.md

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Most of the release process is handled by the `after_success.sh` script, trigger
1. Run `utilities/update_pom_version.sh` from the repository's base directory.
This script takes an optional argument denoting the new version. By default, if the current version is X.Y.Z-SNAPSHOT, the script will update the version in all the pom.xml files to X.Y.Z. If desired, another version can be supplied via command line argument instead.

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.
2. Create a PR to update the pom.xml version. If releasing a new client library, this PR should also update javadoc grouping in the base directory's [pom.xml](./pom.xml).
PRs that don't release new modules should look something like [#225](https://github.com/GoogleCloudPlatform/gcloud-java/pull/225). PRs that do release a new module should also add the appropriate packages to the javadoc groups "SPI" and "Test helpers", as shown in [#802](https://github.com/GoogleCloudPlatform/gcloud-java/pull/802) for `gcloud-java-dns`. 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. Do not merge in any non-release-related pull requests between the start of step 2 and the end of step 6. Between these steps, the project version is a non-snapshot version, so any commits to the master branch will cause Travis to spend extra resources attempting to redeploy artifacts.

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.
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. Search for `gcloud-java` on the [Sonatype website](https://oss.sonatype.org/#nexus-search;quick~gcloud-java) and check the latest version number. In rare cases (when the Maven plugin that determines the version of the repository fails), the artifacts may not be deployed even if the version in the pom.xml files doesn't contain `SNAPSHOT`. If the artifacts weren't deployed due to invalid version parsing or a flaky test, rerun the build.

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:
Expand All @@ -26,7 +26,7 @@ As mentioned before, there is an optional version argument. By default, the scr

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).

7. Be sure to update App Engine documentation and [java-docs-samples](https://github.com/GoogleCloudPlatform/java-docs-samples) code as necessary. See directions [here](https://docs.google.com/a/google.com/document/d/1SS3xNn2v0qW7EadGUPBUAPIQAH5VY6WSFmT17ZjjUVE/edit?usp=sharing).
7. Be sure to update Google Cloud Platform docs, [java-docs-samples](https://github.com/GoogleCloudPlatform/java-docs-samples) code/docs, and [getting-started-java](https://github.com/GoogleCloudPlatform/getting-started-java) code/docs. See directions [here](https://docs.google.com/a/google.com/document/d/1SS3xNn2v0qW7EadGUPBUAPIQAH5VY6WSFmT17ZjjUVE/).

### To push a snapshot version

Expand Down
61 changes: 34 additions & 27 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,55 +11,64 @@ This library provides tools to help write tests for code that uses the following

#### On your machine

You can test against a temporary local datastore by following these steps:
You can test against a temporary local Datastore by following these steps:

1. Start the local datastore emulator using `LocalGcdHelper`. This can be done in two ways:
- Run `LocalGcdHelper.java`'s `main` method with arguments `START` and (optionally) `--port=<port number>`. This will create a temporary folder on your computer and bind `localhost:<port number>` for communication with the local datastore. The port number is an optional argument. If no port number is specified, port 8080 will be used.
- Call `LocalGcdHelper.start(<project ID>, <port number>)` before running your tests. Save the `LocalGcdHelper` object returned so that you can stop the emulator later.
1. Start the local Datastore emulator before running your tests using `LocalDatastoreHelper`'s `create` and `start` methods. This will create a temporary folder on your computer and bind a port for communication with the local Datastore. There is an optional argument for `create`: consistency. The consistency setting controls the fraction of Datastore writes that are immediately visible in global queries.
```java
// Use the default consistency setting of 0.9
LocalDatastoreHelper helper = LocalDatastoreHelper.create();
// or explicitly set the consistency
helper = LocalDatastoreHelper.create(0.6);

helper.start(); // Starts the local Datastore emulator in a separate process
```

2. In your program, create and use a datastore whose host is set host to `localhost:<port number>`. For example,
2. Create and use a `Datastore` object with the options given by the `LocalDatastoreHelper` instance. For example:
```java
DatastoreOptions options = DatastoreOptions.builder()
.projectId(PROJECT_ID)
.host("http://localhost:8080")
.build();
Datastore localDatastore = options.service();
Datastore localDatastore = helper.options().service();
```

3. Run your tests.

4. Stop the local datastore emulator.
- If you ran `LocalGcdHelper.java`'s `main` function to start the emulator, run `LocalGcdHelper.java`'s `main` method with arguments `STOP` and (optionally) `--port=<port number>`. If the port is not supplied, the program will attempt to close the last port started.
- If you ran `LocalGcdHelper.start()` to start the emulator, call the `stop()` method on the `LocalGcdHelper` object returned by `LocalGcdHelper.start()`.
4. Stop the local datastore emulator by calling the `stop()` method, like so:
```java
helper.stop();
```

#### On a remote machine

You can test against a remote datastore emulator as well. To do this, set the `DatastoreOptions` project endpoint to the hostname of the remote machine, like the example below.
You can test against a remote Datastore emulator as well. To do this, set the `DatastoreOptions` project endpoint to the hostname of the remote machine, like the example below.

```java
DatastoreOptions options = DatastoreOptions.builder()
.projectId(PROJECT_ID)
.projectId("my-project-id") // must match project ID specified on remote machine
.host("http://<hostname of machine>:<port>")
.authCredentials(AuthCredentials.noAuth())
.build();
Datastore localDatastore = options.service();
```

Note that the remote datastore must be running before your tests are run.
We recommend that you start the emulator on the remote machine using the [Google Cloud SDK](https://cloud.google.com/sdk/gcloud/reference/beta/emulators/datastore/) from command line, as shown below:

```
gcloud beta emulators datastore start --host-port <hostname of machine>:<port>
```

### Testing code that uses Storage

Currently, there isn't an emulator for Google Cloud Storage, so an alternative is to create a test project. `RemoteGcsHelper` contains convenience methods to make setting up and cleaning up the test project easier. To use this class, follow the steps below:
Currently, there isn't an emulator for Google Cloud Storage, so an alternative is to create a test project. `RemoteStorageHelper` contains convenience methods to make setting up and cleaning up the test project easier. To use this class, follow the steps below:

1. Create a test Google Cloud project.

2. Download a JSON service account credentials file from the Google Developer's Console. See more about this on the [Google Cloud Platform Storage Authentication page][cloud-platform-storage-authentication].

3. Create a `RemoteGcsHelper` object using your project ID and JSON key.
Here is an example that uses the `RemoteGcsHelper` to create a bucket.
3. Create a `RemoteStorageHelper` object using your project ID and JSON key.
Here is an example that uses the `RemoteStorageHelper` to create a bucket.
```java
RemoteGcsHelper gcsHelper =
RemoteGcsHelper.create(PROJECT_ID, new FileInputStream("/path/to/my/JSON/key.json"));
Storage storage = gcsHelper.options().service();
String bucket = RemoteGcsHelper.generateBucketName();
RemoteStorageHelper helper =
RemoteStorageHelper.create(PROJECT_ID, new FileInputStream("/path/to/my/JSON/key.json"));
Storage storage = helper.options().service();
String bucket = RemoteStorageHelper.generateBucketName();
storage.create(BucketInfo.of(bucket));
```

Expand All @@ -68,7 +77,7 @@ Here is an example that uses the `RemoteGcsHelper` to create a bucket.
5. Clean up the test project by using `forceDelete` to clear any buckets used.
Here is an example that clears the bucket created in Step 3 with a timeout of 5 seconds.
```java
RemoteGcsHelper.forceDelete(storage, bucket, 5, TimeUnit.SECONDS);
RemoteStorageHelper.forceDelete(storage, bucket, 5, TimeUnit.SECONDS);
```

### Testing code that uses Resource Manager
Expand All @@ -80,8 +89,6 @@ You can test against a temporary local Resource Manager by following these steps
1. Before running your testing code, start the Resource Manager emulator `LocalResourceManagerHelper`. This can be done as follows:

```java
import com.google.gcloud.resourcemanager.testing.LocalResourceManagerHelper;

LocalResourceManagerHelper helper = LocalResourceManagerHelper.create();
helper.start();
```
Expand Down Expand Up @@ -134,4 +141,4 @@ Here is an example that clears the dataset created in Step 3.
```

[cloud-platform-storage-authentication]:https://cloud.google.com/storage/docs/authentication?hl=en#service_accounts
[create-service-account]:https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
[create-service-account]:https://developers.google.com/identity/protocols/OAuth2ServiceAccount#creatinganaccount
2 changes: 1 addition & 1 deletion codacy-conf.json

Large diffs are not rendered by default.

48 changes: 24 additions & 24 deletions gcloud-java-bigquery/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ Java idiomatic client for [Google Cloud BigQuery] (https://cloud.google.com/bigq

[![Build Status](https://travis-ci.org/GoogleCloudPlatform/gcloud-java.svg?branch=master)](https://travis-ci.org/GoogleCloudPlatform/gcloud-java)
[![Coverage Status](https://coveralls.io/repos/GoogleCloudPlatform/gcloud-java/badge.svg?branch=master)](https://coveralls.io/r/GoogleCloudPlatform/gcloud-java?branch=master)
[![Maven](https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-bigquery.svg)]( https://img.shields.io/maven-central/v/com.google.gcloud/gcloud-java-bigquery.svg)
[![Maven](https://img.shields.io/maven-central/v/com.google.cloud/gcloud-java-bigquery.svg)]( https://img.shields.io/maven-central/v/com.google.cloud/gcloud-java-bigquery.svg)
[![Codacy Badge](https://api.codacy.com/project/badge/grade/9da006ad7c3a4fe1abd142e77c003917)](https://www.codacy.com/app/mziccard/gcloud-java)
[![Dependency Status](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969/badge.svg?style=flat)](https://www.versioneye.com/user/projects/56bd8ee72a29ed002d2b0969)

- [Homepage] (https://googlecloudplatform.github.io/gcloud-java/)
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/bigquery/package-summary.html)
- [API Documentation] (http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/cloud/bigquery/package-summary.html)

> Note: This client is a work-in-progress, and may occasionally
> make backwards-incompatible changes.
Expand All @@ -20,24 +20,24 @@ Quickstart
If you are using Maven, add this to your pom.xml file
```xml
<dependency>
<groupId>com.google.gcloud</groupId>
<groupId>com.google.cloud</groupId>
<artifactId>gcloud-java-bigquery</artifactId>
<version>0.1.5</version>
<version>0.2.0</version>
</dependency>
```
If you are using Gradle, add this to your dependencies
```Groovy
compile 'com.google.gcloud:gcloud-java-bigquery:0.1.5'
compile 'com.google.cloud:gcloud-java-bigquery:0.2.0'
```
If you are using SBT, add this to your dependencies
```Scala
libraryDependencies += "com.google.gcloud" % "gcloud-java-bigquery" % "0.1.5"
libraryDependencies += "com.google.cloud" % "gcloud-java-bigquery" % "0.2.0"
```

Example Application
-------------------
- [`BigQueryExample`](../gcloud-java-examples/src/main/java/com/google/gcloud/examples/bigquery/BigQueryExample.java) - A simple command line interface providing some of Cloud BigQuery's functionality.
Read more about using this application on the [`BigQueryExample` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/gcloud/examples/bigquery/BigQueryExample.html).
- [`BigQueryExample`](../gcloud-java-examples/src/main/java/com/google/cloud/examples/bigquery/BigQueryExample.java) - A simple command line interface providing some of Cloud BigQuery's functionality.
Read more about using this application on the [`BigQueryExample` docs page](http://googlecloudplatform.github.io/gcloud-java/apidocs/?com/google/cloud/examples/bigquery/BigQueryExample.html).

Authentication
--------------
Expand Down Expand Up @@ -82,8 +82,8 @@ These credentials are automatically inferred from your environment, so you only
code to create your service object:

```java
import com.google.gcloud.bigquery.BigQuery;
import com.google.gcloud.bigquery.BigQueryOptions;
import com.google.cloud.bigquery.BigQuery;
import com.google.cloud.bigquery.BigQueryOptions;

BigQuery bigquery = BigQueryOptions.defaultInstance().service();
```
Expand All @@ -96,7 +96,7 @@ With BigQuery you can create datasets. A dataset is a grouping mechanism that ho
tables. Add the following import at the top of your file:

```java
import com.google.gcloud.bigquery.DatasetInfo;
import com.google.cloud.bigquery.DatasetInfo;
```
Then, to create the dataset, use the following code:

Expand All @@ -113,12 +113,12 @@ are created from a BigQuery SQL query. In this code snippet we show how to creat
with only one string field. Add the following imports at the top of your file:

```java
import com.google.gcloud.bigquery.Field;
import com.google.gcloud.bigquery.Schema;
import com.google.gcloud.bigquery.StandardTableDefinition;
import com.google.gcloud.bigquery.Table;
import com.google.gcloud.bigquery.TableId;
import com.google.gcloud.bigquery.TableInfo;
import com.google.cloud.bigquery.Field;
import com.google.cloud.bigquery.Schema;
import com.google.cloud.bigquery.StandardTableDefinition;
import com.google.cloud.bigquery.Table;
import com.google.cloud.bigquery.TableId;
import com.google.cloud.bigquery.TableInfo;
```
Then add the following code to create the table:

Expand All @@ -139,8 +139,8 @@ Google Cloud Storage file. In this code snippet we show how to stream rows into
Add the following imports at the top of your file:

```java
import com.google.gcloud.bigquery.InsertAllRequest;
import com.google.gcloud.bigquery.InsertAllResponse;
import com.google.cloud.bigquery.InsertAllRequest;
import com.google.cloud.bigquery.InsertAllResponse;

import java.util.HashMap;
import java.util.Map;
Expand Down Expand Up @@ -171,9 +171,9 @@ directly or through a Query Job. In this code snippet we show how to run a query
for the result. Add the following imports at the top of your file:

```java
import com.google.gcloud.bigquery.FieldValue;
import com.google.gcloud.bigquery.QueryRequest;
import com.google.gcloud.bigquery.QueryResponse;
import com.google.cloud.bigquery.FieldValue;
import com.google.cloud.bigquery.QueryRequest;
import com.google.cloud.bigquery.QueryResponse;

import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -203,7 +203,7 @@ while (rowIterator.hasNext()) {
#### Complete source code

In
[InsertDataAndQueryTable.java](../gcloud-java-examples/src/main/java/com/google/gcloud/examples/bigquery/snippets/InsertDataAndQueryTable.java)
[InsertDataAndQueryTable.java](../gcloud-java-examples/src/main/java/com/google/cloud/examples/bigquery/snippets/InsertDataAndQueryTable.java)
we put together all the code shown above into one program. The program assumes that you are
running on Compute Engine or from your own desktop. To run the example on App Engine, simply move
the code from the main method to your application's servlet class and change the print statements to
Expand Down Expand Up @@ -255,4 +255,4 @@ Apache 2.0 - See [LICENSE] for more information.

[cloud-bigquery]: https://cloud.google.com/bigquery/
[cloud-storage]: https://cloud.google.com/storage/
[bigquery-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/gcloud/bigquery/package-summary.html
[bigquery-api]: http://googlecloudplatform.github.io/gcloud-java/apidocs/index.html?com/google/cloud/bigquery/package-summary.html
5 changes: 3 additions & 2 deletions gcloud-java-bigquery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@
<artifactId>gcloud-java-bigquery</artifactId>
<packaging>jar</packaging>
<name>GCloud Java bigquery</name>
<url>https://github.com/GoogleCloudPlatform/gcloud-java/tree/master/gcloud-java-bigquery</url>
<description>
Java idiomatic client for Google Cloud BigQuery.
</description>
<parent>
<groupId>com.google.gcloud</groupId>
<groupId>com.google.cloud</groupId>
<artifactId>gcloud-java-pom</artifactId>
<version>0.1.6-SNAPSHOT</version>
<version>0.2.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 @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.google.gcloud.bigquery;
package com.google.cloud.bigquery;

import static com.google.common.base.Preconditions.checkNotNull;

Expand Down
Loading