if ($config->{debug} || !$res->{id}) {
local $Data::Dumper::Terse = 1;
print "JSON response: ", Data::Dumper::Dumper $res;
}
$self->offset($saved_offset);
$self->l
( $debug || !@{ $res->{actions} || [] } ) {
local $Data::Dumper::Terse = 1;
warn "JSON response: ", Data::Dumper::Dumper $res;
}
# return some of the response
my $ret;
and_xml_conf;
my $uri = URI->new( $self->oozie_uri );
# Jobs is supposed to be a 2-level JSON hash
my $flat_jobs = flatten($jobs);
for my $k (keys %$flat_jobs) {
my $v = $flat
1, default => 0, env => 1 };
use JSON::XS;
use LWP::UserAgent;
use Moo::Role;
use Scalar::Util qw( blessed );
with 'Net::Hadoop::YARN::Roles::Common';
my $json = JSON::XS->new->pretty(1)->canonical(
;
return { response => $content } if index( lc $type, 'json' ) == -1;
my $res;
eval {
$res = $json->decode($content);
1;
} or do {
my $eval_error = $@ || 'Zombie error';
confess q{server response wasn't valid JSON: } . $eval_error;
};
return $res;
}
my $headers = $response->headers;
my
is a good indication of when
# the SLA event happened, but that's all we have in the JSON;
# let's try using that
if (!( $alert->{lastModifiedEpoch} >= $after