App-Oozie
view release on metacpan or search on metacpan
lib/App/Oozie/Deploy/Template.pm view on Meta::CPAN
DIR => resolve_tmp_dir(),
);
my $file = File::Spec->catfile( $self->ttlib_base_dir, 'ttree.cfg' );
my $maybe_log_line = sub {
my $config_line = shift || return;
if ( $config_line =~ m{ \A copy }xms ) {
$logger->info(
sprintf 'Files matching this pattern will be copied as-is: /%s/',
trim +(split m{ [=] }xms, $config_line, 2)[LAST_ELEM]
);
}
return;
};
open my $FH, '<', $file or die "Failed to read $file: $!";
while ( <$FH> ) {
$maybe_log_line->( $_ );
print $fh_tmp_cfg $_;
}
lib/App/Oozie/Role/Git.pm view on Meta::CPAN
$eval_error,
);
}
$logger->logdie( 'Failed' ) if ! $gitforce;
};
return if not @dirty && !$gitforce;
# 'M file', '?? file'
@dirty = map {
(split m{ \s+ }xms, trim($_), 2)[1]
}
@dirty;
my $fail = 0;
foreach my $dirt ( @dirty ) {
my $test = $repo_dir . q{/} . $dirt;
if ( $test =~ m{ \A \Q$oozie_base_dir\E (.*) \z }xms) {
$test = $1;
$logger->warn(
sprintf 'The oozie workflow directory has untracked changes in %s',
lib/App/Oozie/Run.pm view on Meta::CPAN
if ( !($self->type eq 'bundle') ) {
%extra_def = (
$self->verify_sla,
);
}
if ( $self->type eq 'wf' ) {
%extra_def = (
%extra_def,
$self->check_coordinator_function_calls({
map { (split m{ [=] }xms, $_)[0] => 1 } @define
}),
);
}
if (@{ $self->errors } ) {
$logger->error(
'Overridable errors encountered',
( $self->force ? EMPTY_STRING : ' (relaunch using --force to proceed)' )
);
$logger->error( '- ' . $_ ) for @{ $self->errors };
lib/App/Oozie/Run.pm view on Meta::CPAN
my %def = (
appName => '[% app_name %]',
startTime => '[% start_time %]',
endTime => '[% end_time %]',
workflowPath => '[% workflow_path %]',
'oozie.[% type %].application.path' => '[% workflow_path %]',
path => '[% path %]',
nameNode => '[% name_node %]',
'oozie.use.system.libpath' => 'true',
( @define ? ( map { split m{ [=] }xms, $_, 2 } @define ) : () ),
);
my %prop = $self->probe_settings;
my %owner = $self->probe_meta;
$self->logger->info( 'Combining owner info into job.properties' );
my $override_file = File::Temp->new(
SUFFIX => '.properties',
DIR => resolve_tmp_dir(),
lib/App/Oozie/Run.pm view on Meta::CPAN
$logger->fatal( $err );
return 0;
}
if ( is_arrayref $stderr_buff && @{ $stderr_buff } ) {
$logger->warn( join "\n", @{ $stderr_buff } );
}
($outbuffer) = reverse
map {
split m{ \n }xms, $_
}
@{ $stdout_buff }
;
if (
# TODO: move to constant
$outbuffer =~ m{
([0-9-]+ oozie-oozi- [CWB])
}xms
) {
lib/App/Oozie/Update/Coordinator.pm view on Meta::CPAN
$base_path,
$meta_startTime,
$meta_endTime,
%job_properties
);
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
( run in 1.440 second using v1.01-cache-2.11-cpan-6aa56a78535 )