App-Oozie

 view release on metacpan or  search on metacpan

lib/App/Oozie/Update/Coordinator.pm  view on Meta::CPAN

                    sprintf 'Coordinator %s update failed (%s): %s',
                                $self->coord,
                                $self->dryrun ? ' (dryrun)' : EMPTY_STRING,
                                $out // '[no output]',
                );
            }
            next TRY;
        }

        $logger->info(
            sprintf 'Coordinator %s updated%s',
                        $self->coord,
                        $self->dryrun ? ' (dryrun)' : EMPTY_STRING,
        );

        last TRY;
    }

    if ( ! $success ) {
        $logger->fatal(
            sprintf 'Coordinator %s was NOT updated%s.',
                        $self->coord,
                        $self->dryrun ? ' (dryrun)' : EMPTY_STRING,
        );
        if ( $last_out ) {
            $logger->fatal( $last_out );
            if ( $last_out =~ m{ \QFrequency can't be changed\E }xms ) {
                $logger->fatal('Your running coordinator and the local coordinator.xml seems to have out of sync frequency settings. Please update coordinator.xml before continuing to reflect the scheduled job settings.');
            }
        }
    }

lib/App/Oozie/Update/Coordinator.pm  view on Meta::CPAN


    eval {
        my $oozie           = $self->oozie;
        my $job             = $oozie->job( $coord )       || die sprintf 'No configuration for the job: %s', $coord;
        $oozie_build        = $oozie->new->build_version  || die 'Failed to get the Oozie server version!';
        my @vtuple          = split m{ \Q-cdh\E }xms, $oozie_build;
        $oozie_version      = shift @vtuple               || die sprintf 'Unable to determine the Oozie server version from %s', $oozie_build;
        $oozie_cdh_version  = shift @vtuple               || die sprintf 'Unable to determine the Oozie server CDH version from %s', $oozie_build;
        $current_coord_user = $job->{user}                || die sprintf 'Failed to locate the user running %s', $coord;
        $current_xml        = $job->{conf}                || die sprintf 'No configuration for the job: %s', $coord;
        # If you extend the coordinator, then this data gets updated but the
        # XML config will retain the old and meaningless record. While
        # it should be fine for the startTime, it will be bogus for the endTime
        # and our shifting logic/workaround will not do anything and in fact
        # the server will respond with an "Error: E0803" even when you want
        # to update everything but the scheduling. For some reason XML conf
        # does not get updated.
        #
        $meta_startTime     = $job->{startTime}           || die sprintf 'No startTime set for the job: %s', $coord;
        $meta_endTime       = $job->{endTime}             || die sprintf 'No endTime set for the job: %s', $coord;
        my $path            = $job->{coordJobPath}        || die sprintf 'No coordJobPath defined for the job: %s', $coord; # shouldn't happen
        my $hdfs_dest       = $self->default_hdfs_destination;
        ($base_path         = $path) =~ s{ \A $hdfs_dest [/]? }{}xms;
        my $jp_hdfs_path    = catfile $path,      'job.properties';
        my $jp_local_path   = catfile $base_path, 'job.properties';

        my $jp;



( run in 0.232 second using v1.01-cache-2.11-cpan-05444aca049 )