YARN/HistoryServer.pm

filter: Statementstmt 64.2% 18 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 44.4% 4 / 9 Podpod 100% 4 / 4 totaltotal 63.4% 26 / 41 CC 1 SCAR 4.4
CC
1
Cov
64%
__ANON__
2.0
info
2.0
jobs
2.0
CRAP 1.6
« YARN/NodeManager.pm ↑ Summary YARN.pm »
1 package Net::Hadoop::YARN::HistoryServer;
2 5 $Net::Hadoop::YARN::HistoryServer::VERSION = '0.203';
3 5 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 5 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 5 ▶use 5.10.0;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 5 ▶use Moo;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 5 with 'Net::Hadoop::YARN::Roles::AppMasterHistoryServer';
9 5 with 'Net::Hadoop::YARN::Roles::Common';
10  
11 #<<<
12 5 my $methods_urls = {
13 _get_jobs => ['/ws/v1/history/mapreduce/jobs', 'job' ],
14 job => ['/ws/v1/history/mapreduce/jobs/{jobid}', '' ],
15 jobconf => ['/ws/v1/history/mapreduce/jobs/{jobid}/conf', '' ],
16 jobcounters => ['/ws/v1/history/mapreduce/jobs/{jobid}/counters', 'counterGroup' ],
17 jobattempts => ['/ws/v1/history/mapreduce/jobs/{jobid}/jobattempts', 'jobAttempt' ],
18 _get_tasks => ['/ws/v1/history/mapreduce/jobs/{jobid}/tasks', 'task' ],
19 task => ['/ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}', '' ],
20 taskcounters => ['/ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}/counters', 'taskCounterGroup' ],
21 taskattempts => ['/ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts', 'taskAttempt' ],
22 _get_taskattempt => ['/ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}', '' ],
23 taskattemptcounters => ['/ws/v1/history/mapreduce/jobs/{jobid}/tasks/{taskid}/attempts/{attemptid}/counters', 'taskAttemptCounterGroup' ],
24 };
25 #>>>
26  
27 # For each of the keys:
28 # - make a method, adding the path
29 # - pass the path and variables to a validation and substitution engine
30 # - execute the request
31 # - return the proper fragment of the JSON tree
32  
33 5 _mk_subs($methods_urls);
34  
35 has '+servers' => (
36 0 ▶ default => sub { ["localhost:19888"] }, # same as resource manager by default
Subroutine __ANON__: not called CC=1 SCAR=6.9
37 5 );
38  
39 0 ▶sub info {
Subroutine info: not called CC=1 SCAR=6.9
Pod documented
40 0 my $self = shift;
41 0 my $res = $self->_get("info");
42 0 return $res->{info};
43 }
44  
45 0 ▶sub jobs {
Subroutine jobs: not called CC=1 SCAR=6.9
Pod documented
46 0 my $self = shift;
47 0 $self->_get_jobs(@_);
48 }
49  
50 0 ▶sub tasks {
Subroutine tasks: not called CC=1 SCAR=6.9
Pod documented
51 0 my $self = shift;
52 0 $self->_get_tasks(@_);
53 }
54  
55 0 ▶sub taskattempt {
Subroutine taskattempt: not called CC=1 SCAR=6.9
Pod documented
56 0 my $self = shift;
57 0 my $attempt = $self->_get_taskattempt(@_);
58 }
59  
60 5 1;
61  
62 __END__
« YARN/NodeManager.pm ↑ Summary YARN.pm »