App-Oozie

 view release on metacpan or  search on metacpan

lib/App/Oozie/Deploy/Validate/Meta.pm  view on Meta::CPAN

        $reason = $type->validate_explain( $what );
        1;
    } or do {
        my $eval_error = $@ || 'Zombie error';
        $reason = ref $eval_error ? $eval_error : [ $eval_error ];
    };

    if ( $reason && $what && $self->verbose ) {
        require Data::Dumper;
        my $d = Data::Dumper->new([ $what], ['*META_YML'] );
        $self->logger->debug( sprintf'Raw decoded content without type checks: %s', $d->Dump );
    }

    return $reason;
}

sub maybe_decode {
    my $self      = shift;
    my $meta_file = shift || $self->file;
    my $logger    = $self->logger;
    my $rs;

lib/App/Oozie/Deploy/Validate/Spec/Workflow.pm  view on Meta::CPAN

your job will fail anyway if you push it as-is.
ETOOFAT
        $logger->warn( $msg );
        $validation_errors++;
        $total_errors++;
    }

    my $validation_queue_check = 0;

    # ====================================================================== #
    # TODO: we already have the decoded XML. Get rid of this file read
    #
    # check any action contains root.default or root.mapred queue conf (spark,hive or shell)
    open my $FH, '<', $file or die "Cannot open $file"; ## no critic (InputOutput::RequireBriefOpen)
    while(my $String = <$FH>) {
        if (
                $String =~ m{ (root.default) \z }xms
            ||  $String =~ m{ (root.mapred)  \z }xms
        ) {
            $logger->error(
                'FIXME !!! queue configuration parameter in workflow.xml is set to default or mapred; you are not allowed to deploy workflows in root.mapred or root.default queue.'

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

    my $type  = $self->enforce_type || return;

    my $failed   = $type->validate_explain( $input, 'USER_INPUT' ) || return;
    my $full_msg = join "\n\n", @{ $failed };
    require Data::Dumper;
    my $d        = Data::Dumper->new( [ $input ], [ '*INPUT' ] );

    die sprintf <<'DID_NOT_PASS', $full_msg, $d->Dump;
The data structure does not match the type definition: %s

Input was decoded as (compare to the errors above):

%s
DID_NOT_PASS
}

1;

__END__

=pod



( run in 0.428 second using v1.01-cache-2.11-cpan-26ccb49234f )