hadoop-metrics 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +10 -1
- data/lib/hadoop_metrics/api.rb +2 -0
- data/lib/hadoop_metrics/version.rb +1 -1
- metadata +4 -4
data/README.md
CHANGED
@@ -41,9 +41,18 @@ tt = HadoopMetrics::TaskTracker.new('localhost', 50060)
|
|
41
41
|
puts JSON.pretty_generate(tt.shuffle_output)
|
42
42
|
```
|
43
43
|
|
44
|
+
### TaskTracker
|
45
|
+
|
46
|
+
```
|
47
|
+
require 'hadoop_metrics/name_node'
|
48
|
+
|
49
|
+
nn = HadoopMetrics::NameNode.new('localhost', 50070)
|
50
|
+
puts JSON.pretty_generate(nn.dfs)
|
51
|
+
```
|
52
|
+
|
44
53
|
### NOTE
|
45
54
|
|
46
|
-
|
55
|
+
DataNode is not supported yet.
|
47
56
|
|
48
57
|
## Copyright
|
49
58
|
|
data/lib/hadoop_metrics/api.rb
CHANGED
@@ -25,6 +25,8 @@ module HadoopMetrics
|
|
25
25
|
def gc
|
26
26
|
disable_snake_case {
|
27
27
|
result = via_jmx('java.lang:type=GarbageCollector,name=*').map { |jmx_gc_info|
|
28
|
+
return nil if jmx_gc_info['LastGcInfo'].nil?
|
29
|
+
|
28
30
|
gc_info = {'type' => (/PS Scavenge/.match(jmx_gc_info['name']) ? 'minor' : 'major')}
|
29
31
|
gc_info['estimated_time'] = jmx_gc_info['CollectionTime']
|
30
32
|
gc_info['count'] = jmx_gc_info['CollectionCount']
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hadoop-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-05-
|
12
|
+
date: 2013-05-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -59,7 +59,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
59
59
|
version: '0'
|
60
60
|
segments:
|
61
61
|
- 0
|
62
|
-
hash:
|
62
|
+
hash: 1459145932997394850
|
63
63
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
64
64
|
none: false
|
65
65
|
requirements:
|
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
68
|
version: '0'
|
69
69
|
segments:
|
70
70
|
- 0
|
71
|
-
hash:
|
71
|
+
hash: 1459145932997394850
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
74
|
rubygems_version: 1.8.23
|