private DistributeJobResult waitForJobCompletion(String workFlowName, String jobName) throws InterruptedException { boolean timeoutEnabled = Boolean.parseBoolean(this.jobPlanningProps.getProperty( GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_ENABLED_KEY, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_ENABLED)); long timeoutInSeconds = Long.parseLong(this.jobPlanningProps.getProperty( GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_SECONDS)); try { HelixUtils.waitJobCompletion( GobblinHelixDistributeJobExecutionLauncher.this.planningJobHelixManager, workFlowName, jobName, timeoutEnabled ? Optional.of(timeoutInSeconds) : Optional.empty()); return getResultFromUserContent(); } catch (TimeoutException te) { HelixUtils.handleJobTimeout(workFlowName, jobName, planningJobHelixManager, this, null); return new DistributeJobResult(false); } }
private void waitForJobCompletion() throws InterruptedException { boolean timeoutEnabled = Boolean.parseBoolean(this.jobProps.getProperty( GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_ENABLED_KEY, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_ENABLED)); long timeoutInSeconds = Long.parseLong(this.jobProps.getProperty( GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_SECONDS)); try { HelixUtils.waitJobCompletion( this.helixManager, this.helixWorkFlowName, this.jobContext.getJobId(), timeoutEnabled? Optional.of(timeoutInSeconds) : Optional.empty()); } catch (TimeoutException te) { HelixUtils.handleJobTimeout(helixWorkFlowName, jobContext.getJobId(), helixManager, this, this.jobListener); } }
private void waitForJobCompletion() throws InterruptedException { boolean timeoutEnabled = Boolean.parseBoolean(this.jobProps.getProperty( GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_ENABLED_KEY, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_ENABLED)); long timeoutInSeconds = Long.parseLong(this.jobProps.getProperty( GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_SECONDS)); try { HelixUtils.waitJobCompletion( this.helixManager, this.helixWorkFlowName, this.jobContext.getJobId(), timeoutEnabled? Optional.of(timeoutInSeconds) : Optional.empty()); } catch (TimeoutException te) { HelixUtils.handleJobTimeout(helixWorkFlowName, jobContext.getJobId(), helixManager, this, this.jobListener); } }
private DistributeJobResult waitForJobCompletion(String workFlowName, String jobName) throws InterruptedException { boolean timeoutEnabled = Boolean.parseBoolean(this.jobPlanningProps.getProperty(GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_ENABLED_KEY, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_ENABLED)); long timeoutInSeconds = Long.parseLong(this.jobPlanningProps.getProperty(GobblinClusterConfigurationKeys.HELIX_JOB_TIMEOUT_SECONDS, GobblinClusterConfigurationKeys.DEFAULT_HELIX_JOB_TIMEOUT_SECONDS)); try { HelixUtils.waitJobCompletion( GobblinHelixDistributeJobExecutionLauncher.this.helixManager, workFlowName, jobName, timeoutEnabled ? Optional.of(timeoutInSeconds) : Optional.empty()); return getResultFromUserContent(); } catch (TimeoutException te) { HelixUtils.handleJobTimeout(workFlowName, jobName, helixManager, this, null); return new DistributeJobResult(Optional.empty(), Optional.of(te)); } }