Repository: incubator-beam
Updated Branches:
  refs/heads/master 8a1fb2164 -> 9d380de96


Improve BigQuery load error message


Project: http://git-wip-us.apache.org/repos/asf/incubator-beam/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-beam/commit/f3edaeb4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-beam/tree/f3edaeb4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-beam/diff/f3edaeb4

Branch: refs/heads/master
Commit: f3edaeb4f07c66d5ef48afdf16ebd2226f67cefa
Parents: 8a1fb21
Author: Sam McVeety <s...@google.com>
Authored: Sun Dec 4 14:28:39 2016 -0800
Committer: Davor Bonaci <da...@google.com>
Committed: Tue Dec 6 12:24:07 2016 -0800

----------------------------------------------------------------------
 .../java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-beam/blob/f3edaeb4/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
----------------------------------------------------------------------
diff --git 
a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
 
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
index 0e01246..c00c19d 100644
--- 
a/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
+++ 
b/sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/bigquery/BigQueryIO.java
@@ -2140,15 +2140,16 @@ public class BigQueryIO {
               .setProjectId(projectId)
               .setJobId(jobId);
           jobService.startLoadJob(jobRef, loadConfig);
-          Status jobStatus =
-              parseStatus(jobService.pollJob(jobRef, 
Bound.LOAD_JOB_POLL_MAX_RETRIES));
+          Job job = jobService.pollJob(jobRef, 
Bound.LOAD_JOB_POLL_MAX_RETRIES);
+          Status jobStatus = parseStatus(job);
           switch (jobStatus) {
             case SUCCEEDED:
               return;
             case UNKNOWN:
               throw new RuntimeException("Failed to poll the load job status 
of job " + jobId);
             case FAILED:
-              LOG.info("BigQuery load job failed: {}", jobId);
+              LOG.info("BigQuery load job failed. Status: {} Details: {}",
+                  jobId, job.getStatus());
               continue;
             default:
               throw new IllegalStateException(String.format("Unexpected job 
status: %s of job %s",

Reply via email to