| 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
MC/DC0%0/2
$res->{'nodeInfo'} || $res
$res->{'nodeInfo'}
$res
Truth table0%0/3
A || B
A= $res->{'nodeInfo'}B= $res
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 31 | 0 | ▶ | if ( !ref $_[0] ) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 42 | $app_id ? "node/apps/$app_id" : ( "node/apps", { params => $options } ) | ||||||||||||||||||||
| 43 | ); | ||||||||||||||||||||
| 44 | 0 | ▶ | return $res->{app} || $res; | ||||||||||||||||||
|
Condition0%0/3
$res->{'app'} || $res
MC/DC0%0/2
$res->{'app'} || $res
$res->{'app'}
$res
Truth table0%0/3
A || B
A= $res->{'app'}B= $res
| |||||||||||||||||||||
| 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
| |||||||||||||||||||||
| 57 | 0 | ▶ | return $res->{container} || $res; | ||||||||||||||||||
|
Condition0%0/3
$res->{'container'} || $res
MC/DC0%0/2
$res->{'container'} || $res
$res->{'container'}
$res
Truth table0%0/3
A || B
A= $res->{'container'}B= $res
| |||||||||||||||||||||
| 58 | } | ||||||||||||||||||||
| 59 | |||||||||||||||||||||
| 60 | 3 | 1; | |||||||||||||||||||
| 61 | |||||||||||||||||||||
| 62 | __END__ | ||||||||||||||||||||