private boolean shouldPublishDataInTask ( ) { boolean publishDataAtJobLevel = this . taskState . getPropAsBoolean ( ConfigurationKeys . PUBLISH_DATA_AT_JOB_LEVEL , ConfigurationKeys . DEFAULT_PUBLISH_DATA_AT_JOB_LEVEL ) ; if ( publishDataAtJobLevel ) { LOG . info ( String . format ( "%s is true. Will publish data at the job level." , ConfigurationKeys . PUBLISH_DATA_AT_JOB_LEVEL ) ) ; return false ; } JobCommitPolicy jobCommitPolicy = JobCommitPolicy . getCommitPolicy ( this . taskState ) ; if ( jobCommitPolicy == JobCommitPolicy . COMMIT_SUCCESSFUL_TASKS ) { return this . taskState . getWorkingState ( ) == WorkUnitState . WorkingState . SUCCESSFUL ; } if ( jobCommitPolicy == JobCommitPolicy . COMMIT_ON_PARTIAL_SUCCESS ) { return true ; } LOG . info ( "Will publish data at the job level with job commit policy: " + jobCommitPolicy ) ; return false ; }
Whether the task should directly publish its output data to the final publisher output directory .