YARN/NodeManager.pm

filter: Statementstmt 46.1% 18 / 39 Branchbran 0.0% 0 / 10 Conditioncond 0.0% 0 / 9 MC/DCmcdc 0.0% 0 / 6 Subroutinesub 45.4% 5 / 11 Podpod 100% 5 / 5 totaltotal 35.0% 28 / 80 CC 9 SCAR 27.9
CC
9
Cov
31%
apps
42.0
containers
12.0
info
6.0
CRAP 16.3
« YARN/DataNode/JMX.pm ↑ Summary YARN/HistoryServer.pm »
1 package Net::Hadoop::YARN::NodeManager;
2 3 $Net::Hadoop::YARN::NodeManager::VERSION = '0.203';
3 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 3 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 3 with 'Net::Hadoop::YARN::Roles::Common';
10  
11 0 ▶has '+servers' => ( default => sub { ["localhost:50060"] }, );
Subroutine __ANON__: not called CC=1 SCAR=1.2
12  
13  
14 0 ▶sub info {
Subroutine info: not called CC=2 SCAR=17.9
Pod documented
15 0 my $self = shift;
16 0 my $res = $self->_get("node/info");
17 0 ▶ return $res->{nodeInfo} || $res;
Condition0%0/3
$res->{'nodeInfo'} || $res
l!l&&r!l&&!r
000
MC/DC0%0/2
$res->{'nodeInfo'} || $res
$res->{'nodeInfo'} $res
Truth table0%0/3
A || B
A= $res->{'nodeInfo'}B= $res
ABresult
1X1
011
000
18 }
19  
20  
21 0 ▶sub app {
Subroutine app: not called CC=1 SCAR=6.9
Pod documented
22 0 my $self = shift;
23 0 return $self->apps(@_);
24 }
25  
26 0 ▶sub apps {
Subroutine apps: not called CC=6 SCAR=37.4
Pod documented
27 0 my $self = shift;
28 0 my $app_id;
29 my $options;
30 0 ▶ if ( @_ == 1 ) {
Branch: 2 branches
BranchTrueFalseTotal
if (@_ == 1) { } 0 0 0
elsif (@_ > 1) { } 0 0 0
31 0 ▶ if ( !ref $_[0] ) {
Branch: 1 branch
BranchTrueFalseTotal
if (not ref $_[0]) { } 0 0 0
32 0 $app_id = shift;
33 }
34 else {
35 0 $options = shift;
36 }
37 }
38 elsif ( @_ > 1 ) {
39 0 $options = {@_};
40 }
41 0 ▶ my $res = $self->_get(
Branch: 1 branch
BranchTrueFalseTotal
$app_id ? : 0 0 0
42 $app_id ? "node/apps/$app_id" : ( "node/apps", { params => $options } )
43 );
44 0 ▶ return $res->{app} || $res;
Condition0%0/3
$res->{'app'} || $res
l!l&&r!l&&!r
000
MC/DC0%0/2
$res->{'app'} || $res
$res->{'app'} $res
Truth table0%0/3
A || B
A= $res->{'app'}B= $res
ABresult
1X1
011
000
45 }
46  
47  
48 0 ▶sub container {
Subroutine container: not called CC=1 SCAR=6.9
Pod documented
49 0 my $self = shift;
50 0 return $self->containers(@_);
51 }
52  
53 0 ▶sub containers {
Subroutine containers: not called CC=3 SCAR=24.8
Pod documented
54 0 my $self = shift;
55 0 my $container_id = shift;
56 0 ▶ my $res = $self->_get( "node/containers" . ($container_id ? "/$container_id" : "") );
Branch: 1 branch
BranchTrueFalseTotal
$container_id ? : 0 0 0
57 0 ▶ return $res->{container} || $res;
Condition0%0/3
$res->{'container'} || $res
l!l&&r!l&&!r
000
MC/DC0%0/2
$res->{'container'} || $res
$res->{'container'} $res
Truth table0%0/3
A || B
A= $res->{'container'}B= $res
ABresult
1X1
011
000
58 }
59  
60 3 1;
61  
62 __END__
« YARN/DataNode/JMX.pm ↑ Summary YARN/HistoryServer.pm »