- Fix spelling. The name "Bigquery" is some methods are now properly spelled "BigQuery".
Job.getQueryResultsnow waits for the query to complete.- You no longer have to call
Job.waitFor.
- You no longer have to call
BigQuery.getQueryResults(JobId)is replaced.- Instead of
bigquery.getQueryResults(id), usebigquery.getJob(id).getQueryResults().
- Instead of
BigQuery.queryandJob.getQueryResultsreturnsTableResult, notQueryResponse.- Instead of
queryResponse.getResult().iterateAll(), usetableResult.iterateAll(). - This change should make iterating large result sets significantly faster.
- Instead of
BigQuery.listTableDataandTable.listreturnsTableResultinstead ofPage<FieldValueList>.- This remains source-compatible, since
TableResultimplementsPage<FieldValueList>. TableResultallows insertingShemainto each iterated row.TableResult.getTotalRows()can be called to obtain the total number of rows across pages.
- This remains source-compatible, since
- Various
Jobstatistics are no longer available atQueryResponse.- Use
BigQuery.getJobthenJob.getStatisticsinstead.
- Use
TopicNameis renamed toProjectTopicName, and now inherits from a new base classTopicNameTopicNameOneOf,ProjectNameTypeare deletedTopicNameOneOf.parse(String): useTopicNames.parse(String)instead- To check the subtype of the new
TopicNamebase class, useinstanceof(...)
SubscriptionNameis renamed toProjectSubscriptionNameSnapshotNameis renamed toProjectSnapshotName- Resource name helper methods are removed from request classes:
setProjectWithProjectName(myProject): usesetProject(myProject.toString())insteadsetNameWithTopicName(myTopic): usesetName(myTopic.toString())insteadsetTopicWithTopicName(myTopic): usesetTopic(myTopic.toString())insteadsetNameWithSubscriptionName(mySubscription): usesetName(mySubscription.toString())insteadsetSubscriptionWithSubscriptionName(mySubscription): usesetSubscription(mySubscription.toString())insteadsetNameWithSnapshotName(mySnapshot): usesetName(mySnapshot.toString())insteadsetSnapshotWithSnapshotName(mySnapshot): usesetSnapshot(mySnapshot.toString())insteadtopic.getNameAsTopicName(): useProjectTopicName.parse(topic.getName())subscription.getTopicAsTopicNameOneof(): useTopicNames.parse(subscription.getTopic())subscription.getNameAsSubscriptionName(): useProjectSubscriptionName.parse(subscription.getName())snapshot.getNameAsSnapshotName(): useProjectSnapshotName.parse(snapshot.getName())
The default flow control settings for Subscriber is changed.
- Previously it keeps combined size of outstanding messages below 20% of available memory. Now it keeps the number of outstanding messages less than or equal to 1000.
- Previously it opens one stream per available CPU. Now it opens one regardless of number of CPUs.
Slow message consumers will likely see better load-balancing across machines. Because each machine pulls messages less eagerly, messages not yet pulled can be pulled by another machine.
Fast message consumers might see reduced performance.
If desired, these settings can be adjusted back by Subscriber.Builder#setFlowControlSettings and
Subscriber.Builder#setParallelPullCount.