YARN/YarnClient.pm

filter: Statementstmt 46.6% 7 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 40.0% 2 / 5 Podpod 0.0% 0 / 3 totaltotal 39.1% 9 / 23 CC 1 SCAR 4.7
CC
1
Cov
47%
createYarnClient
2.0
connect
2.0
api_path
2.0
CRAP 1.6
« yarn.pl ↑ Summary
1 package YARN::YarnClient;
2  
3 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 ## Create a new instance of YarnClient
7 0 ▶sub createYarnClient {
Subroutine createYarnClient: not called CC=1 SCAR=6.9
Pod undocumented
8 0 my ($self, $conf) = @_;
9
10 0 return $self;
11 }
12  
13 ## This method is a proxy for REST::Client
14 0 ▶sub connect {
Subroutine connect: not called CC=1 SCAR=6.9
Pod undocumented
15 0 my $self = shift;
16
17 0 $self = REST::Client->new();
18
19 0 return $self;
20 }
21  
22 ## Returns the URL of the API (example: yarn.example.com:8088/ws/v1/cluster/info)
23 0 ▶sub api_path {
Subroutine api_path: not called CC=1 SCAR=6.9
Pod undocumented
24 0 my ($self, $conf, $api) = @_;
25
26 0 my $url = $conf->{host} . ":" . $conf->{port} . $conf->{endpoint} . "/" . $api;
27
28 0 return $url;
29 }
30  
31 1 1;
« yarn.pl ↑ Summary