Skip to content

Commit

Permalink
[AIRFLOW-2991] Log path to driver output after Dataproc job (#3827)
Browse files Browse the repository at this point in the history
  • Loading branch information
miloszszymczak authored and Fokko committed Sep 5, 2018
1 parent 5be025d commit b13e248
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions airflow/contrib/hooks/gcp_dataproc_hook.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,21 @@ def wait_for_done(self):
self.log.error('DataProc job %s has errors', self.job_id)
self.log.error(self.job['status']['details'])
self.log.debug(str(self.job))
self.log.info('Driver output location: %s',
self.job['driverOutputResourceUri'])
return False
if 'CANCELLED' == self.job['status']['state']:
print(str(self.job))
self.log.warning('DataProc job %s is cancelled', self.job_id)
if 'details' in self.job['status']:
self.log.warning(self.job['status']['details'])
self.log.debug(str(self.job))
self.log.info('Driver output location: %s',
self.job['driverOutputResourceUri'])
return False
if 'DONE' == self.job['status']['state']:
self.log.info('Driver output location: %s',
self.job['driverOutputResourceUri'])
return True
self.log.debug(
'DataProc job %s is %s',
Expand Down

0 comments on commit b13e248

Please sign in to comment.