You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by jo...@apache.org on 2023/05/17 14:08:37 UTC
[beam] branch master updated: Log the exception's cause when failed to parse TableRow (#26714)
This is an automated email from the ASF dual-hosted git repository.
johncasey pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git
The following commit(s) were added to refs/heads/master by this push:
new cf8003e97da Log the exception's cause when failed to parse TableRow (#26714)
cf8003e97da is described below
commit cf8003e97da9029695f5f872f1f4bfde14e9943b
Author: Bruno Volpato <bv...@google.com>
AuthorDate: Wed May 17 10:08:26 2023 -0400
Log the exception's cause when failed to parse TableRow (#26714)
---
.../sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
index 3c082752449..80f78206744 100644
--- a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
+++ b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/StorageApiWriteUnshardedRecords.java
@@ -493,9 +493,9 @@ public class StorageApiWriteUnshardedRecords<DestinationT, ElementT>
// the ProtoRows iterable at 2MB and the max request size is 10MB, this scenario seems
// nearly impossible.
LOG.error(
- "A request containing more than one row is over the request size limit of "
- + maxRequestSize
- + ". This is unexpected. All rows in the request will be sent to the failed-rows PCollection.");
+ "A request containing more than one row is over the request size limit of {}. "
+ + "This is unexpected. All rows in the request will be sent to the failed-rows PCollection.",
+ maxRequestSize);
}
for (int i = 0; i < inserts.getSerializedRowsCount(); ++i) {
ByteString rowBytes = inserts.getSerializedRows(i);
@@ -571,7 +571,7 @@ public class StorageApiWriteUnshardedRecords<DestinationT, ElementT>
failedRow, error.getRowIndexToErrorMessage().get(failedIndex)),
timestamp);
} catch (InvalidProtocolBufferException e) {
- LOG.error("Failed to insert row and could not parse the result!");
+ LOG.error("Failed to insert row and could not parse the result!", e);
}
}
rowsSentToFailedRowsCollection.inc(failedRowIndices.size());
@@ -659,7 +659,7 @@ public class StorageApiWriteUnshardedRecords<DestinationT, ElementT>
org.joda.time.Instant timestamp = c.timestamps.get(i);
successfulRowsReceiver.outputWithTimestamp(row, timestamp);
} catch (InvalidProtocolBufferException e) {
- LOG.warn("Failure parsing TableRow: " + e);
+ LOG.warn("Failure parsing TableRow", e);
}
}
}