Class: HadoopMetrics2::NameNode

Inherits:
Object
  • Object
show all
Includes:
API
Defined in:
lib/hadoop_metrics2/name_node.rb

Constant Summary collapse

NODE_TYPE =
'nn'
JSON_FILED_VALUES =
%W(LiveNodes DeadNodes DecomNodes NameDirStatuses)

Constants included from API

API::GCNameMap, API::MegaByte

Instance Attribute Summary

Attributes included from API

#name

Instance Method Summary collapse

Methods included from API

#gc, #get_jmx, #initialize, #memory, #metrics, #query_jmx, #scheduler, #via_jmx

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class HadoopMetrics2::API

Instance Method Details

#dfsObject



14
15
16
# File 'lib/hadoop_metrics2/name_node.rb', line 14

def dfs
  query_jmx('Hadoop:service=NameNode,name=FSNamesystem').first
end

#infoObject



10
11
12
# File 'lib/hadoop_metrics2/name_node.rb', line 10

def info
  query_jmx('Hadoop:service=NameNode,name=NameNodeInfo', JSON_FILED_VALUES).first
end