Skip to content

Commit

Permalink
add dataproc job status when stopped or failed
Browse files Browse the repository at this point in the history
  • Loading branch information
itsankit-google committed Jul 10, 2024
1 parent fd30441 commit 3cff120
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,12 +121,13 @@ public final ClusterStatus deleteClusterWithStatus(ProvisionerContext context, C
}

if (jobDetail != null
&& jobDetail.getStatus() == RuntimeJobStatus.FAILED
&& jobDetail.getStatus() != RuntimeJobStatus.COMPLETED
&& (jobDetail instanceof DataprocRuntimeJobDetail)) {
// Status details is specific to dataproc jobs, so it was not added to RuntimeJobDetail spi.
String statusDetails = ((DataprocRuntimeJobDetail) jobDetail).getJobStatusDetails();
if (statusDetails != null) {
LOG.error("Dataproc job failed with the status details: {}", statusDetails);
LOG.error("Dataproc job {} with the status details: {}",
jobDetail.getStatus(), statusDetails);
}
}
} finally {
Expand Down

0 comments on commit 3cff120

Please sign in to comment.