diff --git a/.github/readme/synth.metadata/synth.metadata b/.github/readme/synth.metadata/synth.metadata
index c316b69a1c..9c541bc1db 100644
--- a/.github/readme/synth.metadata/synth.metadata
+++ b/.github/readme/synth.metadata/synth.metadata
@@ -4,14 +4,14 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-bigquery.git",
- "sha": "44c1a5d0083521b260bfa490c91b72051885eb4d"
+ "sha": "ac8e8989fce16ab32bfefda489651a521c699570"
}
},
{
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
- "sha": "8da7927493739fa36130360019ca21258242f73a"
+ "sha": "2430f8d90ed8a508e8422a3a7191e656d5a6bf53"
}
}
]
diff --git a/CHANGELOG.md b/CHANGELOG.md
index f04d03d844..dc606a11d2 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,17 @@
# Changelog
+### [1.133.1](https://www.github.com/googleapis/java-bigquery/compare/v1.133.0...v1.133.1) (2021-06-16)
+
+
+### Bug Fixes
+
+* handle specific exceptions ([#1370](https://www.github.com/googleapis/java-bigquery/issues/1370)) ([68808e9](https://www.github.com/googleapis/java-bigquery/commit/68808e9f47c07af598324f3f07dd996bc1e5297b))
+
+
+### Dependencies
+
+* update dependency com.google.cloud:google-cloud-storage to v1.116.0 ([#1375](https://www.github.com/googleapis/java-bigquery/issues/1375)) ([d064b7b](https://www.github.com/googleapis/java-bigquery/commit/d064b7b363508d1a958b92563c5df1d1c429c69d))
+
## [1.133.0](https://www.github.com/googleapis/java-bigquery/compare/v1.132.1...v1.133.0) (2021-06-08)
diff --git a/README.md b/README.md
index a15eb421a7..0bc040c91d 100644
--- a/README.md
+++ b/README.md
@@ -40,7 +40,7 @@ If you are using Maven without BOM, add this to your dependencies:
com.google.cloud
google-cloud-bigquery
- 1.132.1
+ 1.133.0
```
@@ -53,12 +53,12 @@ compile 'com.google.cloud:google-cloud-bigquery'
```
If you are using Gradle without BOM, add this to your dependencies
```Groovy
-compile 'com.google.cloud:google-cloud-bigquery:1.132.1'
+compile 'com.google.cloud:google-cloud-bigquery:1.133.0'
```
If you are using SBT, add this to your dependencies
```Scala
-libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.132.1"
+libraryDependencies += "com.google.cloud" % "google-cloud-bigquery" % "1.133.0"
```
## Authentication
diff --git a/benchmark/pom.xml b/benchmark/pom.xml
index 67260984db..70e1004af5 100644
--- a/benchmark/pom.xml
+++ b/benchmark/pom.xml
@@ -6,7 +6,7 @@
google-cloud-bigquery-parent
com.google.cloud
- 1.133.0
+ 1.133.1
diff --git a/google-cloud-bigquery/pom.xml b/google-cloud-bigquery/pom.xml
index d7e5074bc4..8f5940353c 100644
--- a/google-cloud-bigquery/pom.xml
+++ b/google-cloud-bigquery/pom.xml
@@ -3,7 +3,7 @@
4.0.0
com.google.cloud
google-cloud-bigquery
- 1.133.0
+ 1.133.1
jar
BigQuery
https://github.com/googleapis/java-bigquery
@@ -11,7 +11,7 @@
com.google.cloud
google-cloud-bigquery-parent
- 1.133.0
+ 1.133.1
google-cloud-bigquery
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryBaseService.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryBaseService.java
new file mode 100644
index 0000000000..aefb4329b6
--- /dev/null
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryBaseService.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2021 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package com.google.cloud.bigquery;
+
+import com.google.cloud.BaseService;
+import com.google.cloud.ExceptionHandler;
+import com.google.cloud.ServiceOptions;
+
+abstract class BigQueryBaseService>
+ extends BaseService {
+
+ protected BigQueryBaseService(ServiceOptions options) {
+ super(options);
+ }
+
+ public static final ExceptionHandler BIGQUERY_EXCEPTION_HANDLER =
+ ExceptionHandler.newBuilder()
+ .abortOn(RuntimeException.class)
+ .retryOn(java.net.ConnectException.class) // retry on Connection Exception
+ .retryOn(java.net.UnknownHostException.class) // retry on UnknownHostException
+ .addInterceptors(EXCEPTION_HANDLER_INTERCEPTOR)
+ .build();
+}
diff --git a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
index d402ce549a..12eb09c5a6 100644
--- a/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
+++ b/google-cloud-bigquery/src/main/java/com/google/cloud/bigquery/BigQueryImpl.java
@@ -13,7 +13,6 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
package com.google.cloud.bigquery;
import static com.google.cloud.RetryHelper.runWithRetries;
@@ -458,7 +457,7 @@ private static Page listDatasets(
}
},
serviceOptions.getRetrySettings(),
- EXCEPTION_HANDLER,
+ BigQueryBaseService.BIGQUERY_EXCEPTION_HANDLER,
serviceOptions.getClock());
String cursor = result.x();
return new PageImpl<>(
@@ -1256,7 +1255,7 @@ public com.google.api.services.bigquery.model.QueryResponse call() {
}
},
getOptions().getRetrySettings(),
- EXCEPTION_HANDLER,
+ BigQueryBaseService.BIGQUERY_EXCEPTION_HANDLER,
getOptions().getClock());
} catch (RetryHelperException e) {
throw BigQueryException.translateAndThrow(e);
diff --git a/pom.xml b/pom.xml
index 6422aadc60..3c7079eecf 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
com.google.cloud
google-cloud-bigquery-parent
pom
- 1.133.0
+ 1.133.1
BigQuery Parent
https://github.com/googleapis/java-bigquery
@@ -87,7 +87,7 @@
com.google.cloud
google-cloud-bigquery
- 1.133.0
+ 1.133.1
@@ -118,7 +118,7 @@
com.google.cloud
google-cloud-storage
- 1.115.0
+ 1.116.0
test
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 6608f9aa5b..3e46031f78 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -45,7 +45,7 @@
com.google.cloud
google-cloud-bigquery
- 1.132.1
+ 1.133.0
@@ -69,7 +69,7 @@
com.google.cloud
google-cloud-bigqueryconnection
- 1.1.2
+ 1.1.3
test
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index e4b9f94c39..30110b3c41 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -44,7 +44,7 @@
com.google.cloud
google-cloud-bigquery
- 1.133.0
+ 1.133.1
@@ -67,7 +67,7 @@
com.google.cloud
google-cloud-bigqueryconnection
- 1.1.2
+ 1.1.3
test
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 6682efa6c1..9d0ad9dc6a 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -85,7 +85,7 @@
com.google.cloud
google-cloud-bigqueryconnection
- 1.1.2
+ 1.1.3
test
diff --git a/versions.txt b/versions.txt
index 4834b9a2a5..cbb4bf1b05 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,4 +1,4 @@
# Format:
# module:released-version:current-version
-google-cloud-bigquery:1.133.0:1.133.0
\ No newline at end of file
+google-cloud-bigquery:1.133.1:1.133.1
\ No newline at end of file