Skip to content

Commit

Permalink
This closes #1506
Browse files Browse the repository at this point in the history
  • Loading branch information
davorbonaci committed Dec 6, 2016
2 parents 8a1fb21 + f3edaeb commit 9d380de
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2140,15 +2140,16 @@ private void load(
.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",
Expand Down

0 comments on commit 9d380de

Please sign in to comment.