Class JMXGet

java.lang.Object
org.apache.hadoop.hdfs.tools.JMXGet

@Private public class JMXGet extends Object
tool to get data from NameNode or DataNode using MBeans currently the following MBeans are available (under hadoop domain): hadoop:service=NameNode,name=FSNamesystemState (static) hadoop:service=NameNode,name=NameNodeActivity (dynamic) hadoop:service=NameNode,name=RpcActivityForPort9000 (dynamic) hadoop:service=DataNode,name=RpcActivityForPort9867 (dynamic) hadoop:name=service=DataNode,FSDatasetState-UndefinedStorageId663800459 (static) hadoop:service=DataNode,name=DataNodeActivity-UndefinedStorageId-520845215 (dynamic) implementation note: all logging is sent to System.err (since it is a command line tool)
  • Constructor Details

    • JMXGet

      public JMXGet()
  • Method Details

    • setService

      public void setService(String service)
    • setPort

      public void setPort(String port)
    • setServer

      public void setServer(String server)
    • setLocalVMUrl

      public void setLocalVMUrl(String url)
    • printAllValues

      public void printAllValues() throws Exception
      print all attributes' values
      Throws:
      Exception
    • printAllMatchedAttributes

      public void printAllMatchedAttributes(String attrRegExp) throws Exception
      Throws:
      Exception
    • getValue

      public String getValue(String key) throws Exception
      get single value by key
      Throws:
      Exception
    • init

      public void init() throws Exception
      Throws:
      Exception - initializes MBeanServer
    • main

      public static void main(String[] args)