private void insertJobMetadata ( ) { final String baseURL = this . azkabanProps . get ( AZKABAN_WEBSERVER_URL ) ; if ( baseURL != null ) { final String flowName = this . node . getParentFlow ( ) . getFlowId ( ) ; final String projectName = this . node . getParentFlow ( ) . getProjectName ( ) ; this . props . put ( CommonJobProperties . AZKABAN_URL , baseURL ) ; this . props . put ( CommonJobProperties . EXECUTION_LINK , String . format ( "%s/executor?execid=%d" , baseURL , this . executionId ) ) ; this . props . put ( CommonJobProperties . JOBEXEC_LINK , String . format ( "%s/executor?execid=%d&job=%s" , baseURL , this . executionId , this . node . getNestedId ( ) ) ) ; this . props . put ( CommonJobProperties . ATTEMPT_LINK , String . format ( "%s/executor?execid=%d&job=%s&attempt=%d" , baseURL , this . executionId , this . node . getNestedId ( ) , this . node . getAttempt ( ) ) ) ; this . props . put ( CommonJobProperties . WORKFLOW_LINK , String . format ( "%s/manager?project=%s&flow=%s" , baseURL , projectName , flowName ) ) ; this . props . put ( CommonJobProperties . JOB_LINK , String . format ( "%s/manager?project=%s&flow=%s&job=%s" , baseURL , projectName , flowName , this . jobId ) ) ; } else { if ( this . logger != null ) { this . logger . info ( AZKABAN_WEBSERVER_URL + " property was not set" ) ; } } // out nodes this . props . put ( CommonJobProperties . OUT_NODES , StringUtils . join2 ( this . node . getOutNodes ( ) , "," ) ) ; // in nodes this . props . put ( CommonJobProperties . IN_NODES , StringUtils . join2 ( this . node . getInNodes ( ) , "," ) ) ; }
Add relevant links to the job properties so that downstream consumers may know what executions initiated their execution .