hadoop-metrics2 is a wrapper for Hadoop Metrics2 API.
gem install hadoop-metrics2
require 'hadoop_metrics2/resource_manager'
rm = HadoopMetrics2::ResourceManager.new('localhost', 8088, true)
puts JSON.pretty_generate(rm.application)
require 'hadoop_metrics2/node_manager'
nm = HadoopMetrics::NodeManager.new('localhost', 8042, false)
puts JSON.pretty_generate(nm.application)
require 'hadoop_metrics2/name_node'
nn = HadoopMetrics2::NameNode.new('localhost', 50070, true)
puts JSON.pretty_generate(nn.dfs)
require 'hadoop_metrics2/data_node'
dn = HadoopMetrics2::DataNode.new('localhost', 50075, false)
puts JSON.pretty_generate(dn.info)
Author | Ryu Kobayashi |
Original Author | Masahiro Nakagawa |
Original Repository | https://github.com/repeatedly/hadoop-metrics |
Copyright | Copyright (c) 2014- Ryu Kobayashi |
License | Apache2 License |