App-Oozie
view release on metacpan or search on metacpan
lib/App/Oozie/Rerun.pm view on Meta::CPAN
package App::Oozie::Rerun;
use 5.014;
use strict;
use warnings;
our $VERSION = '0.020'; # VERSION
use namespace::autoclean -except => [qw/_options_data _options_config/];
use App::Oozie::Constants qw(
DEFAULT_OOZIE_MAX_JOBS
EMPTY_STRING
HOURS_IN_A_DAY
ONE_HOUR
RE_AT
);
use App::Oozie::Types::DateTime qw( IsDateStr );
use App::Oozie::Types::States qw( IsOozieStateRerunnable );
use Date::Parse ();
use IPC::Cmd ();
use Template;
use Types::Standard qw( ArrayRef Int Str );
use Moo;
use MooX::Options prefer_commandline => 0,
protect_argv => 0,
usage_string => <<'USAGE',
Usage: %c %o [options]
Reprocess or resume killed or suspended coordinator actions
This utility will check which actions match the given conditions, and display a
list of command lines to copy and paste in a terminal, either to rerun or
resume, depending on the task status
USAGE
;
with qw(
App::Oozie::Role::Log
App::Oozie::Role::Fields::Common
App::Oozie::Role::Info
);
option name => (
is => 'rw',
isa => Str,
format => 's',
doc => 'Only return actions which matches this regex. Default: everything.',
);
option hours => (
is => 'rw',
isa => Int,
format => 'i',
doc => 'Lower boundary for failure (number of hours back)',
);
option maxjobs => (
is => 'rw',
isa => Int,
default => sub { DEFAULT_OOZIE_MAX_JOBS },
format => 'i',
short => 'max',
doc => 'Maximum number of failed tasks to check in one run (defaults to 1000)',
);
option resurrect_coord => (
is => 'rw',
doc => 'Dead coordinators and actions for them will be skipped. Specify this to do otherwise.',
);
option since => (
is => 'rw',
isa => IsDateStr,
format => 's',
doc => 'Lower boundary for failure (date/time passed to str2time)',
);
( run in 1.510 second using v1.01-cache-2.11-cpan-97f6503c9c8 )