App-Oozie

 view release on metacpan or  search on metacpan

lib/App/Oozie/Run.pm  view on Meta::CPAN


sub check_coordinator_function_calls {
    my $self = shift;
    my $skip = shift;
    my $logger = $self->logger;
    # try to predict the value of such things?
    # examples:
    #    ${coord:formatTime(coord:nominalTime(), 'yyyy-MM-dd')}
    #    ${coord:formatTime(coord:nominalTime(), 'HH')}
    #
    my $looks_like_coord_conf = qr< [$][{]coord[:] >xms;
    my %missing;
    my $collector = sub {
        my($h, $key) = @_;
        return if $key ne 'property';
        my $slot = $h->{ $key };
        #
        # this is possibly broken for some cases
        # as it tries to locate stuff in the hairy xml
        # which can be defined in different ways.
        # need to be fixed / extended per wf
        #
        foreach my $name ( keys %{ $slot } ) {
            if ( ! is_hashref $slot->{ $name } ) {
                if (   exists $slot->{name}
                    && exists $slot->{value}
                    && $slot->{value} =~ $looks_like_coord_conf
                ) {
                    $missing{ $slot->{name} } = $slot->{value};
                }
                next;
            }

            next if exists $slot->{ $name }{ action };

            if ( my $val = $slot->{ $name }{ value } ) {
                next if $val !~ $looks_like_coord_conf;
                $missing{ $name } = $val;
                next;
            }
        }
    };

    my $loop_xml_conf_hash;
    $loop_xml_conf_hash = sub {
        my $hash = shift;
        my $cb   = shift;

lib/App/Oozie/Types/Workflow.pm  view on Meta::CPAN

            $input =~ s{ \A \s+}{}xms;
            $input =~ s{ \s+ \z }{}xms;
            my $len = length $input; # Do nothing as this is marked optional
            if ( $len < $min_length ) {
                warn sprintf "Justification defined with %s characters while at least %s characters are needed",
                                 $len,
                                 $min_length,
                ;
                return;
            }
            # looks alright
            return 1;
        },
        {
           '$min_length' => \$Justification_min_len,
        },
    ),
;

my $WorkflowMeta = declare WorkflowMeta => as Dict[
    lineage => Maybe[ Optional[

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

                                $!,
                );
            }
        }
        else {
            my $uh_oh = sprintf <<'FYI', Cwd::getcwd, $base_path;

No job.properties file neither on hdfs nor local file system.
There are no parameter overrides to collect.

This program looks at relative paths to search for local files.

Your current working directory is %s and search path is %s.

If this is not the directory for the local application files, please change
to the proper location and try again.

FYI
            $logger->warn( $uh_oh );
        }



( run in 0.271 second using v1.01-cache-2.11-cpan-64827b87656 )