Skip to content

Commit c964be8

Browse files
committed
Merge remote-tracking branch 'upstream/master' into test-fix
2 parents 8c5a6ec + be2c36f commit c964be8

438 files changed

Lines changed: 2665 additions & 11572 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,16 @@ If you are using Maven, add this to your pom.xml file
4444
<dependency>
4545
<groupId>com.google.cloud</groupId>
4646
<artifactId>google-cloud</artifactId>
47-
<version>0.9.2-alpha</version>
47+
<version>0.9.4-alpha</version>
4848
</dependency>
4949
```
5050
If you are using Gradle, add this to your dependencies
5151
```Groovy
52-
compile 'com.google.cloud:google-cloud:0.9.2-alpha'
52+
compile 'com.google.cloud:google-cloud:0.9.4-alpha'
5353
```
5454
If you are using SBT, add this to your dependencies
5555
```Scala
56-
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.9.2-alpha"
56+
libraryDependencies += "com.google.cloud" % "google-cloud" % "0.9.4-alpha"
5757
```
5858

5959
Example Applications
@@ -109,12 +109,12 @@ Most `google-cloud` libraries require a project ID. There are multiple ways to
109109

110110
`google-cloud` determines the project ID from the following sources in the listed order, stopping once it finds a value:
111111

112-
1. Project ID supplied when building the service options
112+
1. The project ID supplied when building the service options
113113
2. Project ID specified by the environment variable `GOOGLE_CLOUD_PROJECT`
114-
3. App Engine project ID
115-
4. Project ID specified in the JSON credentials file pointed by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
116-
5. Google Cloud SDK project ID
117-
6. Compute Engine project ID
114+
3. The App Engine project ID
115+
4. The project ID specified in the JSON credentials file pointed by the `GOOGLE_APPLICATION_CREDENTIALS` environment variable
116+
5. The Google Cloud SDK project ID
117+
6. The Compute Engine project ID
118118

119119
Authentication
120120
--------------

SUPPORTING_NEW_SERVICES.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ The library should contain:
2525
* Classes representing model objects and request-related options. Model objects that correspond to service resources should have a subclass that provides functions related to that resource. For example, see [`BlobInfo`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-storage/src/main/java/com/google/cloud/storage/BlobInfo.java) (the metadata class) and [`Blob`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-storage/src/main/java/com/google/cloud/storage/Blob.java) (the functional class). The builders for both objects should implement a common interface or abstract class, and the functional subclass builder should delegate to the metadata class builder.
2626
* Request-related options classes. Operations should accept these options as varargs when appropriate. Supplying options as varargs allows for supporting more advanced use cases without affecting the method signature. The options classes should provide static methods to create instances with specific options settings. A common option is to request that only specific fields of a model object should be included in a response. Typically such an option is created via a `fields(...)` method which accepts a vararg of type `<ResourceName>Field` enum. The enum should implement the [FieldSelector](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/FieldSelector.java) interface.
2727

28-
In general, make classes immutable whenever possible, providing builders as necessary. Make model object classes `java.util.Serializable`. Prefer making classes final, with the following exceptions: (1) functional objects and (2) classes in which the user cannot set all attributes. If a class cannot be made final, then `hashCode` or `equals` overrides should be made final if possible.
28+
In general, make classes immutable whenever possible, providing builders as necessary. Make model object classes `java.io.Serializable`. Prefer making classes final, with the following exceptions: (1) functional objects and (2) classes in which the user cannot set all attributes. If a class cannot be made final, then `hashCode` or `equals` overrides should be made final if possible.
2929

3030
`google-cloud-core` provides functionality for code patterns used across `google-cloud` libraries. The following are some important core concepts:
3131
* Paging: Google Cloud services often expose page-based listing using page tokens. The [`Page`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/Page.java) interface should be used for page-based listing. A `Page` contains an iterator over results in that page, as well as methods to get the next page and all results in future pages. `Page` requires a `NextPageFetcher` implementation (see the `NextPageFetcher` interface in [`PageImpl`](https://github.com/GoogleCloudPlatform/google-cloud-java/blob/master/google-cloud-core/src/main/java/com/google/cloud/PageImpl.java)). This implementation should delegate constructing request options to the `nextRequestOptions` method in `PageImpl`.

google-cloud-bigquery/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,16 @@ If you are using Maven, add this to your pom.xml file
2222
<dependency>
2323
<groupId>com.google.cloud</groupId>
2424
<artifactId>google-cloud-bigquery</artifactId>
25-
<version>0.9.2-beta</version>
25+
<version>0.9.4-beta</version>
2626
</dependency>
2727
```
2828
If you are using Gradle, add this to your dependencies
2929
```Groovy
30-
compile 'com.google.cloud:google-cloud-bigquery:0.9.2-beta'
30+
compile 'com.google.cloud:google-cloud-bigquery:0.9.4-beta'
3131
```
3232
If you are using SBT, add this to your dependencies
3333
```Scala
34-
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.9.2-beta"
34+
libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "0.9.4-beta"
3535
```
3636

3737
Example Application

google-cloud-bigquery/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<parent>
1313
<groupId>com.google.cloud</groupId>
1414
<artifactId>google-cloud-pom</artifactId>
15-
<version>0.9.3-alpha-SNAPSHOT</version>
15+
<version>0.9.5-alpha-SNAPSHOT</version>
1616
</parent>
1717
<properties>
1818
<site.installationModule>google-cloud-bigquery</site.installationModule>

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/Acl.java

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,6 @@ public enum Type {
8080
this.type = type;
8181
}
8282

83-
@Deprecated
84-
public Type type() {
85-
return getType();
86-
}
8783

8884
public Type getType() {
8985
return type;
@@ -131,13 +127,6 @@ public Domain(String domain) {
131127
this.domain = domain;
132128
}
133129

134-
/**
135-
* Returns the domain name.
136-
*/
137-
@Deprecated
138-
public String domain() {
139-
return getDomain();
140-
}
141130

142131
/**
143132
* Returns the domain name.
@@ -201,15 +190,6 @@ public Group(String identifier) {
201190
this.identifier = identifier;
202191
}
203192

204-
/**
205-
* Returns group's identifier, can be either a
206-
* <a href="https://cloud.google.com/bigquery/docs/reference/v2/datasets#access.specialGroup">
207-
* special group identifier</a> or a group email.
208-
*/
209-
@Deprecated
210-
public String identifier() {
211-
return getIdentifier();
212-
}
213193

214194
/**
215195
* Returns group's identifier, can be either a
@@ -306,13 +286,6 @@ public User(String email) {
306286
this.email = email;
307287
}
308288

309-
/**
310-
* Returns user's email.
311-
*/
312-
@Deprecated
313-
public String email() {
314-
return getEmail();
315-
}
316289

317290
/**
318291
* Returns user's email.
@@ -369,13 +342,6 @@ public View(TableId id) {
369342
this.id = id;
370343
}
371344

372-
/**
373-
* Returns table's identity.
374-
*/
375-
@Deprecated
376-
public TableId id() {
377-
return getId();
378-
}
379345

380346
/**
381347
* Returns table's identity.
@@ -417,13 +383,6 @@ private Acl(Entity entity, Role role) {
417383
this.role = role;
418384
}
419385

420-
/**
421-
* Returns the entity for this ACL.
422-
*/
423-
@Deprecated
424-
public Entity entity() {
425-
return getEntity();
426-
}
427386

428387
/**
429388
* Returns the entity for this ACL.
@@ -432,13 +391,6 @@ public Entity getEntity() {
432391
return entity;
433392
}
434393

435-
/**
436-
* Returns the role specified by this ACL.
437-
*/
438-
@Deprecated
439-
public Role role() {
440-
return getRole();
441-
}
442394

443395
/**
444396
* Returns the role specified by this ACL.

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQuery.java

Lines changed: 17 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,6 @@ enum DatasetField implements FieldSelector {
6464
this.selector = selector;
6565
}
6666

67-
@Override
68-
@Deprecated
69-
public String selector() {
70-
return getSelector();
71-
}
7267

7368
@Override
7469
public String getSelector() {
@@ -111,11 +106,6 @@ enum TableField implements FieldSelector {
111106
this.selector = selector;
112107
}
113108

114-
@Override
115-
@Deprecated
116-
public String selector() {
117-
return getSelector();
118-
}
119109

120110
@Override
121111
public String getSelector() {
@@ -148,11 +138,6 @@ enum JobField implements FieldSelector {
148138
this.selector = selector;
149139
}
150140

151-
@Override
152-
@Deprecated
153-
public String selector() {
154-
return getSelector();
155-
}
156141

157142
@Override
158143
public String getSelector() {
@@ -207,7 +192,7 @@ private DatasetOption(BigQueryRpc.Option option, Object value) {
207192
/**
208193
* Returns an option to specify the dataset's fields to be returned by the RPC call. If this
209194
* option is not provided all dataset's fields are returned. {@code DatasetOption.fields} can
210-
* be used to specify only the fields of interest. {@link Dataset#datasetId()} is always
195+
* be used to specify only the fields of interest. {@link Dataset#getDatasetId()} is always
211196
* returned, even if not specified.
212197
*/
213198
public static DatasetOption fields(DatasetField... fields) {
@@ -277,8 +262,8 @@ private TableOption(BigQueryRpc.Option option, Object value) {
277262
/**
278263
* Returns an option to specify the table's fields to be returned by the RPC call. If this
279264
* option is not provided all table's fields are returned. {@code TableOption.fields} can be
280-
* used to specify only the fields of interest. {@link Table#tableId()} and type (which is part
281-
* of {@link Table#definition()}) are always returned, even if not specified.
265+
* used to specify only the fields of interest. {@link Table#getTableId()} and type (which is part
266+
* of {@link Table#getDefinition()}) are always returned, even if not specified.
282267
*/
283268
public static TableOption fields(TableField... fields) {
284269
return new TableOption(BigQueryRpc.Option.FIELDS,
@@ -372,9 +357,9 @@ public static JobListOption pageToken(String pageToken) {
372357
/**
373358
* Returns an option to specify the job's fields to be returned by the RPC call. If this option
374359
* is not provided all job's fields are returned. {@code JobOption.fields()} can be used to
375-
* specify only the fields of interest. {@link Job#jobId()}, {@link JobStatus#state()},
376-
* {@link JobStatus#error()} as well as type-specific configuration (e.g.
377-
* {@link QueryJobConfiguration#query()} for Query Jobs) are always returned, even if not
360+
* specify only the fields of interest. {@link Job#getJobId()}, {@link JobStatus#getState()},
361+
* {@link JobStatus#getError()} as well as type-specific configuration (e.g.
362+
* {@link QueryJobConfiguration#getQuery()} for Query Jobs) are always returned, even if not
378363
* specified. {@link JobField#SELF_LINK} and {@link JobField#ETAG} can not be selected when
379364
* listing jobs.
380365
*/
@@ -398,8 +383,8 @@ private JobOption(BigQueryRpc.Option option, Object value) {
398383
/**
399384
* Returns an option to specify the job's fields to be returned by the RPC call. If this option
400385
* is not provided all job's fields are returned. {@code JobOption.fields()} can be used to
401-
* specify only the fields of interest. {@link Job#jobId()} as well as type-specific
402-
* configuration (e.g. {@link QueryJobConfiguration#query()} for Query Jobs) are always
386+
* specify only the fields of interest. {@link Job#getJobId()} as well as type-specific
387+
* configuration (e.g. {@link QueryJobConfiguration#getQuery()} for Query Jobs) are always
403388
* returned, even if not specified.
404389
*/
405390
public static JobOption fields(JobField... fields) {
@@ -468,7 +453,7 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
468453
* } catch (BigQueryException e) {
469454
* // the dataset was not created
470455
* }
471-
* }</pre>
456+
* } </pre>
472457
*
473458
* @throws BigQueryException upon failure
474459
*/
@@ -546,8 +531,8 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
546531

547532
/**
548533
* Lists the project's datasets. This method returns partial information on each dataset:
549-
* ({@link Dataset#datasetId()}, {@link Dataset#friendlyName()} and
550-
* {@link Dataset#generatedId()}). To get complete information use either
534+
* ({@link Dataset#getDatasetId()}, {@link Dataset#getFriendlyName()} and
535+
* {@link Dataset#getGeneratedId()}). To get complete information use either
551536
* {@link #getDataset(String, DatasetOption...)} or
552537
* {@link #getDataset(DatasetId, DatasetOption...)}.
553538
*
@@ -567,8 +552,8 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
567552

568553
/**
569554
* Lists the datasets in the provided project. This method returns partial information on each
570-
* dataset: ({@link Dataset#datasetId()}, {@link Dataset#friendlyName()} and
571-
* {@link Dataset#generatedId()}). To get complete information use either
555+
* dataset: ({@link Dataset#getDatasetId()}, {@link Dataset#getFriendlyName()} and
556+
* {@link Dataset#getGeneratedId()}). To get complete information use either
572557
* {@link #getDataset(String, DatasetOption...)} or
573558
* {@link #getDataset(DatasetId, DatasetOption...)}.
574559
*
@@ -734,8 +719,8 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
734719

735720
/**
736721
* Lists the tables in the dataset. This method returns partial information on each table:
737-
* ({@link Table#tableId()}, {@link Table#friendlyName()}, {@link Table#generatedId()} and type,
738-
* which is part of {@link Table#definition()}). To get complete information use either
722+
* ({@link Table#getTableId()}, {@link Table#getFriendlyName()}, {@link Table#getGeneratedId()} and type,
723+
* which is part of {@link Table#getDefinition()}). To get complete information use either
739724
* {@link #getTable(TableId, TableOption...)} or
740725
* {@link #getTable(String, String, TableOption...)}.
741726
*
@@ -756,8 +741,8 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
756741

757742
/**
758743
* Lists the tables in the dataset. This method returns partial information on each table:
759-
* ({@link Table#tableId()}, {@link Table#friendlyName()}, {@link Table#generatedId()} and type,
760-
* which is part of {@link Table#definition()}). To get complete information use either
744+
* ({@link Table#getTableId()}, {@link Table#getFriendlyName()}, {@link Table#getGeneratedId()}
745+
* and type, which is part of {@link Table#getDefinition()}). To get complete information use either
761746
* {@link #getTable(TableId, TableOption...)} or
762747
* {@link #getTable(String, String, TableOption...)}.
763748
*

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryError.java

Lines changed: 6 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
/**
2727
* Google Cloud BigQuery Error. Objects of this class represent errors encountered by the BigQuery
2828
* service while executing a request. A BigQuery Job that terminated with an error has a non-null
29-
* {@link JobStatus#error()}. A job can also encounter errors during its execution that do not cause
30-
* the whole job to fail (see {@link JobStatus#executionErrors()}). Similarly, queries and insert
31-
* all requests can cause BigQuery errors that do not mean the whole operation failed (see
32-
* {@link QueryResponse#executionErrors()} and {@link InsertAllResponse#insertErrors()}). When a
33-
* {@link BigQueryException} is thrown the BigQuery Error that caused it, if any, can be accessed
34-
* with {@link BigQueryException#error()}.
29+
* {@link JobStatus#getError()}. A job can also encounter errors during its execution that do not
30+
* cause the whole job to fail (see {@link JobStatus#getExecutionErrors()}). Similarly, queries and
31+
* insert all requests can cause BigQuery errors that do not mean the whole operation failed (see
32+
* {@link QueryResponse#getExecutionErrors()} and {@link InsertAllResponse#getInsertErrors()}).
33+
* When a {@link BigQueryException} is thrown the BigQuery Error that caused it, if any, can be
34+
* accessed with {@link BigQueryException#getError()}.
3535
*/
3636
public final class BigQueryError implements Serializable {
3737

@@ -70,16 +70,6 @@ public BigQueryError(String reason, String location, String message) {
7070
this.debugInfo = null;
7171
}
7272

73-
/**
74-
* Returns short error code that summarizes the error.
75-
*
76-
* @see <a href="https://cloud.google.com/bigquery/troubleshooting-errors">Troubleshooting
77-
* Errors</a>
78-
*/
79-
@Deprecated
80-
public String reason() {
81-
return getReason();
82-
}
8373

8474
/**
8575
* Returns short error code that summarizes the error.
@@ -91,13 +81,6 @@ public String getReason() {
9181
return reason;
9282
}
9383

94-
/**
95-
* Returns where the error occurred, if present.
96-
*/
97-
@Deprecated
98-
public String location() {
99-
return getLocation();
100-
}
10184

10285
/**
10386
* Returns where the error occurred, if present.
@@ -110,13 +93,6 @@ String getDebugInfo() {
11093
return debugInfo;
11194
}
11295

113-
/**
114-
* Returns a human-readable description of the error.
115-
*/
116-
@Deprecated
117-
public String message() {
118-
return getMessage();
119-
}
12096

12197
/**
12298
* Returns a human-readable description of the error.

google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryException.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ public BigQueryException(IOException exception) {
6666
this.error = error;
6767
}
6868

69-
/**
70-
* Returns the {@link BigQueryError} that caused this exception. Returns {@code null} if none
71-
* exists.
72-
*/
73-
@Deprecated
74-
public BigQueryError error() {
75-
return getError();
76-
}
7769

7870
/**
7971
* Returns the {@link BigQueryError} that caused this exception. Returns {@code null} if none

0 commit comments

Comments
 (0)