Skip to content

Commit 2490ce2

Browse files
author
Ajay Kannan
committed
---
yaml --- r: 2667 b: refs/heads/update-datastore c: ea21d23 h: refs/heads/master i: 2665: 0357599 2663: 5253e21
1 parent b4afbd3 commit 2490ce2

41 files changed

Lines changed: 137 additions & 873 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.

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/gh-pages: 4e0561bb4504bf647db669a14417b2b2c87ba45d
55
refs/heads/bigquery: 762fa5830e6c398c0396177e3e7fd243bd62cfc3
66
refs/heads/pubsub-alpha: 1a0e970f265af871e02274085b9662b3fe29058b
77
refs/heads/resource-manager: ebf4adc5ee835cd2086c4ac5b4e78d01a5a005a7
8-
refs/heads/update-datastore: b1ff62bf6b117ded6090e7447e0c55e940e8ffcf
8+
refs/heads/update-datastore: ea21d237dc8cc052802c0a5cf907abcdc2801e66
99
refs/tags/0.0.9: 22f1839238f66c39e67ed4dfdcd273b1ae2e8444
1010
refs/tags/v0.0.10: 207ebd2a3472fddee69fe1298eb90429e3306efd
1111
refs/tags/v0.0.11: ffbfba48a6426ff63c08ff2117e58681f251fbf2

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BaseTableInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ public enum Type {
9797
/**
9898
* Base builder for tables.
9999
*
100-
* @param <T> the table type.
101-
* @param <B> the table builder.
100+
* @param <T> the table type
101+
* @param <B> the table builder
102102
*/
103103
public abstract static class Builder<T extends BaseTableInfo, B extends Builder<T, B>> {
104104

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/BigQuery.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -500,31 +500,31 @@ public static QueryResultsOption maxWaitTime(long maxWaitTime) {
500500
/**
501501
* Deletes the requested dataset.
502502
*
503-
* @return {@code true} if dataset was deleted, {@code false} if it was not found.
503+
* @return {@code true} if dataset was deleted, {@code false} if it was not found
504504
* @throws BigQueryException upon failure
505505
*/
506506
boolean delete(String datasetId, DatasetDeleteOption... options) throws BigQueryException;
507507

508508
/**
509509
* Deletes the requested dataset.
510510
*
511-
* @return {@code true} if dataset was deleted, {@code false} if it was not found.
511+
* @return {@code true} if dataset was deleted, {@code false} if it was not found
512512
* @throws BigQueryException upon failure
513513
*/
514514
boolean delete(DatasetId datasetId, DatasetDeleteOption... options) throws BigQueryException;
515515

516516
/**
517517
* Deletes the requested table.
518518
*
519-
* @return {@code true} if table was deleted, {@code false} if it was not found.
519+
* @return {@code true} if table was deleted, {@code false} if it was not found
520520
* @throws BigQueryException upon failure
521521
*/
522522
boolean delete(String datasetId, String tableId) throws BigQueryException;
523523

524524
/**
525525
* Deletes the requested table.
526526
*
527-
* @return {@code true} if table was deleted, {@code false} if it was not found.
527+
* @return {@code true} if table was deleted, {@code false} if it was not found
528528
* @throws BigQueryException upon failure
529529
*/
530530
boolean delete(TableId tableId) throws BigQueryException;

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/Dataset.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ public Dataset update(DatasetInfo datasetInfo, BigQuery.DatasetOption... options
184184
/**
185185
* Deletes this dataset.
186186
*
187-
* @return {@code true} if dataset was deleted, {@code false} if it was not found.
187+
* @return {@code true} if dataset was deleted, {@code false} if it was not found
188188
* @throws BigQueryException upon failure
189189
*/
190190
public boolean delete() {

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/ExtractJobInfo.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -263,23 +263,6 @@ public static ExtractJobInfo of(TableId sourceTable, List<String> destinationUri
263263
return builder(sourceTable, destinationUris).build();
264264
}
265265

266-
/**
267-
* Returns a BigQuery Extract Job for the given source table, format and destination URI. Job's id
268-
* is chosen by the service.
269-
*/
270-
public static ExtractJobInfo of(TableId sourceTable, String format, String destinationUri) {
271-
return builder(sourceTable, destinationUri).format(format).build();
272-
}
273-
274-
/**
275-
* Returns a BigQuery Extract Job for the given source table, format and destination URIs. Job's
276-
* id is chosen by the service.
277-
*/
278-
public static ExtractJobInfo of(TableId sourceTable, String format,
279-
List<String> destinationUris) {
280-
return builder(sourceTable, destinationUris).format(format).build();
281-
}
282-
283266
/**
284267
* Returns a BigQuery Extract Job for the given source table and destination URI. Job's id is set
285268
* to the provided value.
@@ -296,24 +279,6 @@ public static ExtractJobInfo of(JobId jobId, TableId sourceTable, List<String> d
296279
return builder(sourceTable, destinationUris).jobId(jobId).build();
297280
}
298281

299-
/**
300-
* Returns a BigQuery Extract Job for the given source table, format and destination URI. Job's id
301-
* is set to the provided value.
302-
*/
303-
public static ExtractJobInfo of(JobId jobId, TableId sourceTable, String format,
304-
String destinationUri) {
305-
return builder(sourceTable, destinationUri).format(format).jobId(jobId).build();
306-
}
307-
308-
/**
309-
* Returns a BigQuery Extract Job for the given source table, format and destination URIs. Job's
310-
* id is set to the provided value.
311-
*/
312-
public static ExtractJobInfo of(JobId jobId, TableId sourceTable, String format,
313-
List<String> destinationUris) {
314-
return builder(sourceTable, destinationUris).format(format).jobId(jobId).build();
315-
}
316-
317282
@SuppressWarnings("unchecked")
318283
static ExtractJobInfo fromPb(Job jobPb) {
319284
return new Builder(jobPb).build();

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobInfo.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
*
3434
* @see <a href="https://cloud.google.com/bigquery/docs/reference/v2/jobs">Jobs</a>
3535
*
36-
* @param <S> the statistics type.
36+
* @param <S> the statistics type
3737
*/
3838
public abstract class JobInfo<S extends JobStatistics> implements Serializable {
3939

@@ -92,9 +92,9 @@ public enum WriteDisposition {
9292
/**
9393
* Base builder for jobs.
9494
*
95-
* @param <T> the job type.
96-
* @param <S> the job statistics type.
97-
* @param <B> the job builder.
95+
* @param <T> the job type
96+
* @param <S> the job statistics type
97+
* @param <B> the job builder
9898
*/
9999
public abstract static class Builder<T extends JobInfo, S extends JobStatistics,
100100
B extends Builder<T, S, B>> {

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/JobStatistics.java

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.google.api.services.bigquery.model.JobStatistics4;
66
import com.google.common.base.MoreObjects;
77
import com.google.common.base.MoreObjects.ToStringHelper;
8-
import com.google.common.collect.Lists;
98

109
import java.io.Serializable;
1110
import java.util.List;
@@ -243,15 +242,13 @@ public static class QueryStatistics extends JobStatistics {
243242
private final Boolean cacheHit;
244243
private final Long totalBytesBilled;
245244
private final Long totalBytesProcessed;
246-
private final List<QueryStage> queryPlan;
247245

248246
static final class Builder extends JobStatistics.Builder<QueryStatistics, Builder> {
249247

250248
private Integer billingTier;
251249
private Boolean cacheHit;
252250
private Long totalBytesBilled;
253251
private Long totalBytesProcessed;
254-
private List<QueryStage> queryPlan;
255252

256253
private Builder() {}
257254

@@ -261,10 +258,6 @@ private Builder(com.google.api.services.bigquery.model.JobStatistics statisticsP
261258
this.cacheHit = statisticsPb.getQuery().getCacheHit();
262259
this.totalBytesBilled = statisticsPb.getQuery().getTotalBytesBilled();
263260
this.totalBytesProcessed = statisticsPb.getQuery().getTotalBytesProcessed();
264-
if (statisticsPb.getQuery().getQueryPlan() != null) {
265-
this.queryPlan =
266-
Lists.transform(statisticsPb.getQuery().getQueryPlan(), QueryStage.FROM_PB_FUNCTION);
267-
}
268261
}
269262

270263
Builder billingTier(Integer billingTier) {
@@ -287,11 +280,6 @@ Builder totalBytesProcessed(Long totalBytesProcessed) {
287280
return self();
288281
}
289282

290-
Builder queryPlan(List<QueryStage> queryPlan) {
291-
this.queryPlan = queryPlan;
292-
return self();
293-
}
294-
295283
@Override
296284
QueryStatistics build() {
297285
return new QueryStatistics(this);
@@ -304,7 +292,6 @@ private QueryStatistics(Builder builder) {
304292
this.cacheHit = builder.cacheHit;
305293
this.totalBytesBilled = builder.totalBytesBilled;
306294
this.totalBytesProcessed = builder.totalBytesProcessed;
307-
this.queryPlan = builder.queryPlan;
308295
}
309296

310297
/**
@@ -338,26 +325,13 @@ public Long totalBytesProcessed() {
338325
return totalBytesProcessed;
339326
}
340327

341-
/**
342-
* Returns the query plan as a list of stages or {@code null} if a query plan is not available.
343-
* Each stage involves a number of steps that read from data sources, perform a series of
344-
* transformations on the input, and emit an output to a future stage (or the final result). The
345-
* query plan is available for a completed query job and is retained for 7 days.
346-
*
347-
* @see <a href="https://cloud.google.com/bigquery/query-plan-explanation">Query Plan</a>
348-
*/
349-
public List<QueryStage> queryPlan() {
350-
return queryPlan;
351-
}
352-
353328
@Override
354329
ToStringHelper toStringHelper() {
355330
return super.toStringHelper()
356331
.add("billingTier", billingTier)
357332
.add("cacheHit", cacheHit)
358333
.add("totalBytesBilled", totalBytesBilled)
359-
.add("totalBytesProcessed", totalBytesProcessed)
360-
.add("queryPlan", queryPlan);
334+
.add("totalBytesProcessed", totalBytesProcessed);
361335
}
362336

363337
@Override
@@ -369,7 +343,7 @@ public boolean equals(Object obj) {
369343
@Override
370344
public int hashCode() {
371345
return Objects.hash(super.hashCode(), billingTier, cacheHit, totalBytesBilled,
372-
totalBytesProcessed, queryPlan);
346+
totalBytesProcessed);
373347
}
374348

375349
@Override
@@ -379,9 +353,6 @@ com.google.api.services.bigquery.model.JobStatistics toPb() {
379353
queryStatisticsPb.setCacheHit(cacheHit);
380354
queryStatisticsPb.setTotalBytesBilled(totalBytesBilled);
381355
queryStatisticsPb.setTotalBytesProcessed(totalBytesProcessed);
382-
if (queryPlan != null) {
383-
queryStatisticsPb.setQueryPlan(Lists.transform(queryPlan, QueryStage.TO_PB_FUNCTION));
384-
}
385356
return super.toPb().setQuery(queryStatisticsPb);
386357
}
387358

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/LoadJobInfo.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -407,23 +407,6 @@ public static LoadJobInfo of(TableId destinationTable, List<String> sourceUris)
407407
return builder(destinationTable, sourceUris).build();
408408
}
409409

410-
/**
411-
* Returns a BigQuery Load Job for the given destination table, format and source URI. Job's id is
412-
* chosen by the service.
413-
*/
414-
public static LoadJobInfo of(TableId destinationTable, FormatOptions format, String sourceUri) {
415-
return builder(destinationTable, sourceUri).formatOptions(format).build();
416-
}
417-
418-
/**
419-
* Returns a BigQuery Load Job for the given destination table, format and source URIs. Job's id
420-
* is chosen by the service.
421-
*/
422-
public static LoadJobInfo of(TableId destinationTable, FormatOptions format,
423-
List<String> sourceUris) {
424-
return builder(destinationTable, sourceUris).formatOptions(format).build();
425-
}
426-
427410
/**
428411
* Returns a BigQuery Load Job for the given destination table and source URI. Job's id is set to
429412
* the provided value.
@@ -440,24 +423,6 @@ public static LoadJobInfo of(JobId jobId, TableId destinationTable, List<String>
440423
return builder(destinationTable, sourceUris).jobId(jobId).build();
441424
}
442425

443-
/**
444-
* Returns a BigQuery Load Job for the given destination table, format, and source URI. Job's id
445-
* is set to the provided value.
446-
*/
447-
public static LoadJobInfo of(JobId jobId, TableId destinationTable, FormatOptions format,
448-
String sourceUri) {
449-
return builder(destinationTable, sourceUri).formatOptions(format).jobId(jobId).build();
450-
}
451-
452-
/**
453-
* Returns a BigQuery Load Job for the given destination table, format and source URIs. Job's id
454-
* is set to the provided value.
455-
*/
456-
public static LoadJobInfo of(JobId jobId, TableId destinationTable, FormatOptions format,
457-
List<String> sourceUris) {
458-
return builder(destinationTable, sourceUris).formatOptions(format).jobId(jobId).build();
459-
}
460-
461426
@SuppressWarnings("unchecked")
462427
static LoadJobInfo fromPb(Job jobPb) {
463428
return new Builder(jobPb).build();

branches/update-datastore/gcloud-java-bigquery/src/main/java/com/google/gcloud/bigquery/QueryJobInfo.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ public enum Priority {
5353

5454
/**
5555
* Query is queued and started as soon as idle resources are available, usually within a few
56-
* minutes. If the query hasn't started within 3 hours, its priority is changed to
57-
* {@link Priority#INTERACTIVE}.
56+
* minutes. If a {@link Priority#BATCH} query hasn't started within 3 hours, its priority is
57+
* changed to {@link Priority#INTERACTIVE}.
5858
*/
5959
BATCH
6060
}

0 commit comments

Comments
 (0)