JMXGet (Apache Hadoop HDFS 3.5.0 API)
Description: declaration: package: org.apache.hadoop.hdfs.tools, class: JMXGet

Package org.apache.hadoop.hdfs.tools

# 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 Summary

  Constructors
  Constructor
  Description
  `JMXGet()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getValue(String key)`
  get single value by key
  `void`
  `init()`
  `static void`
  `main(String[] args)`
  `void`
  `printAllMatchedAttributes(String attrRegExp)`
  `void`
  `printAllValues()`
  print all attributes' values
  `void`
  `setLocalVMUrl(String url)`
  `void`
  `setPort(String port)`
  `void`
  `setServer(String server)`
  `void`
  `setService(String service)`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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)