public class JSONBean extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
JSONBean.Writer
Use dumping out mbeans as JSON.
|
| Constructor and Description |
|---|
JSONBean() |
| Modifier and Type | Method and Description |
|---|---|
static void |
dumpAllBeans()
Dump out all registered mbeans as json on System.out.
|
static String |
dumpRegionServerMetrics()
Dump out a subset of regionserver mbeans only, not all of them, as json on System.out.
|
static void |
main(String[] args) |
JSONBean.Writer |
open(PrintWriter writer)
Notice that, closing the return
JSONBean.Writer will not close the writer passed in, you
still need to close the writer by yourself. |
public JSONBean.Writer open(PrintWriter writer) throws IOException
JSONBean.Writer will not close the writer passed in, you
still need to close the writer by yourself.
This is because that, we can only finish the json after you call Closeable.close(). So if
we just close the writer, you can write nothing after finished the json.IOExceptionpublic static String dumpRegionServerMetrics() throws MalformedObjectNameException, IOException
public static void dumpAllBeans()
throws IOException,
MalformedObjectNameException
public static void main(String[] args) throws IOException, MalformedObjectNameException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.