line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Jubatus; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
701
|
use v5.12.1; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
33
|
|
4
|
1
|
|
|
1
|
|
4
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
5
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
10
|
|
|
1
|
|
|
|
|
36
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = "0.0.1_03"; |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
|
422
|
use Jubatus::NearestNeighbor::Client; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Jubatus::Regression::Client; |
11
|
|
|
|
|
|
|
use Jubatus::Common::Client; |
12
|
|
|
|
|
|
|
use Jubatus::Recommender::Client; |
13
|
|
|
|
|
|
|
use Jubatus::Classifier::Client; |
14
|
|
|
|
|
|
|
use Jubatus::Stat::Client; |
15
|
|
|
|
|
|
|
use Jubatus::Clustering::Client; |
16
|
|
|
|
|
|
|
use Jubatus::Graph::Client; |
17
|
|
|
|
|
|
|
use Jubatus::Anomaly::Client; |
18
|
|
|
|
|
|
|
use Jubatus::Common::Datum; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub get_nearestneighbor_client { |
21
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
22
|
|
|
|
|
|
|
my $client = Jubatus::NearestNeighbor::Client->new($host, $port, $name, $timeout); |
23
|
|
|
|
|
|
|
return $client; |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
sub get_regression_client { |
27
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
28
|
|
|
|
|
|
|
my $client = Jubatus::Regression::Client->new($host, $port, $name, $timeout); |
29
|
|
|
|
|
|
|
return $client; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
sub get_common_client { |
33
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
34
|
|
|
|
|
|
|
my $client = Jubatus::Common::Client->new($host, $port, $name, $timeout); |
35
|
|
|
|
|
|
|
return $client; |
36
|
|
|
|
|
|
|
} |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
sub get_recommender_client { |
39
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
40
|
|
|
|
|
|
|
my $client = Jubatus::Recommender::Client->new($host, $port, $name, $timeout); |
41
|
|
|
|
|
|
|
return $client; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
sub get_classifier_client { |
45
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
46
|
|
|
|
|
|
|
my $client = Jubatus::Classifier::Client->new($host, $port, $name, $timeout); |
47
|
|
|
|
|
|
|
return $client; |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
sub get_stat_client { |
51
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
52
|
|
|
|
|
|
|
my $client = Jubatus::Stat::Client->new($host, $port, $name, $timeout); |
53
|
|
|
|
|
|
|
return $client; |
54
|
|
|
|
|
|
|
} |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
sub get_clustering_client { |
57
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
58
|
|
|
|
|
|
|
my $client = Jubatus::Clustering::Client->new($host, $port, $name, $timeout); |
59
|
|
|
|
|
|
|
return $client; |
60
|
|
|
|
|
|
|
} |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
sub get_graph_client { |
63
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
64
|
|
|
|
|
|
|
my $client = Jubatus::Graph::Client->new($host, $port, $name, $timeout); |
65
|
|
|
|
|
|
|
return $client; |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub get_anomaly_client { |
69
|
|
|
|
|
|
|
my ($self, $host, $port, $name, $timeout) = @_; |
70
|
|
|
|
|
|
|
my $client = Jubatus::Anomaly::Client->new($host, $port, $name, $timeout); |
71
|
|
|
|
|
|
|
return $client; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
sub get_client { |
76
|
|
|
|
|
|
|
my ($self, $param, $host, $port, $name, $timeout) = @_; |
77
|
|
|
|
|
|
|
my $client; |
78
|
|
|
|
|
|
|
given ($param) { |
79
|
|
|
|
|
|
|
when (/^NearestNeighbor|nearestneighbor$/) { |
80
|
|
|
|
|
|
|
$client = Jubatus->get_nearestneighbor_client($host, $port, $name, $timeout); |
81
|
|
|
|
|
|
|
} |
82
|
|
|
|
|
|
|
when (/^Regression|regression$/) { |
83
|
|
|
|
|
|
|
$client = Jubatus->get_regression_client($host, $port, $name, $timeout); |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
when (/^Common|common$/) { |
86
|
|
|
|
|
|
|
$client = Jubatus->get_common_client($host, $port, $name, $timeout); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
when (/^Recommender|recommender$/) { |
89
|
|
|
|
|
|
|
$client = Jubatus->get_recommender_client($host, $port, $name, $timeout); |
90
|
|
|
|
|
|
|
} |
91
|
|
|
|
|
|
|
when (/^Classifier|classifier$/) { |
92
|
|
|
|
|
|
|
$client = Jubatus->get_classifier_client($host, $port, $name, $timeout); |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
when (/^Stat|stat$/) { |
95
|
|
|
|
|
|
|
$client = Jubatus->get_stat_client($host, $port, $name, $timeout); |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
when (/^Clustering|clustering$/) { |
98
|
|
|
|
|
|
|
$client = Jubatus->get_clustering_client($host, $port, $name, $timeout); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
when (/^Graph|graph$/) { |
101
|
|
|
|
|
|
|
$client = Jubatus->get_graph_client($host, $port, $name, $timeout); |
102
|
|
|
|
|
|
|
} |
103
|
|
|
|
|
|
|
when (/^Anomaly|anomaly$/) { |
104
|
|
|
|
|
|
|
$client = Jubatus->get_anomaly_client($host, $port, $name, $timeout); |
105
|
|
|
|
|
|
|
} |
106
|
|
|
|
|
|
|
default { |
107
|
|
|
|
|
|
|
die "Jubatus::".$param."::Client.pm is not install.\n Please see Jubatus.pm !\n"; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
} |
110
|
|
|
|
|
|
|
return $client; |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
1; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
__END__ |