Skip to content

Commit 3b54d6e

Browse files
committed
Hadoop 2.x and Hadoop 3.x support
1 parent 889a9c9 commit 3b54d6e

File tree

6 files changed

+685
-235
lines changed

6 files changed

+685
-235
lines changed

instrumentation/jmx-metrics/library/hadoop.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Here is the list of metrics based on MBeans exposed by Hadoop.
44

5-
| Metric Name | Type | Attributes | Description |
6-
|-----------------------------|---------------|-----------------------------------------|--------------------------------------------------------|
7-
| hadoop.capacity | UpDownCounter | hadoop.node.name | Current raw capacity of data nodes. |
8-
| hadoop.capacity.used | UpDownCounter | hadoop.node.name | Current used capacity across all data nodes. |
9-
| hadoop.block.count | UpDownCounter | hadoop.node.name | Current number of allocated blocks in the system. |
10-
| hadoop.block.missing | UpDownCounter | hadoop.node.name | Current number of missing blocks. |
11-
| hadoop.block.corrupt | UpDownCounter | hadoop.node.name | Current number of blocks with corrupt replicas. |
12-
| hadoop.volume.failure.count | Counter | hadoop.node.name | Total number of volume failures across all data nodes. |
13-
| hadoop.file.count | UpDownCounter | hadoop.node.name | Current number of files and directories. |
14-
| hadoop.connection.count | UpDownCounter | hadoop.node.name | Current number of connection. |
15-
| hadoop.datanode.count | UpDownCounter | hadoop.node.name, hadoop.datanode.state | The number of data nodes. |
5+
| Metric Name | Type | Attributes | Description |
6+
|---------------------------------|---------------|-------------------------------------|--------------------------------------------------------|
7+
| hadoop.dfs.capacity | UpDownCounter | hadoop.node.name | Current raw capacity of data nodes. |
8+
| hadoop.dfs.capacity.used | UpDownCounter | hadoop.node.name | Current used capacity across all data nodes. |
9+
| hadoop.dfs.block.count | UpDownCounter | hadoop.node.name | Current number of allocated blocks in the system. |
10+
| hadoop.dfs.block.missing | UpDownCounter | hadoop.node.name | Current number of missing blocks. |
11+
| hadoop.dfs.block.corrupt | UpDownCounter | hadoop.node.name | Current number of blocks with corrupt replicas. |
12+
| hadoop.dfs.volume.failure.count | Counter | hadoop.node.name | Total number of volume failures across all data nodes. |
13+
| hadoop.dfs.file.count | UpDownCounter | hadoop.node.name | Current number of files and directories. |
14+
| hadoop.dfs.connection.count | UpDownCounter | hadoop.node.name | Current number of connection. |
15+
| hadoop.dfs.data_node.count | UpDownCounter | hadoop.node.name, hadoop.node.state | The number of data nodes. |
Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,73 +1,71 @@
11
---
22
rules:
33
- bean: Hadoop:service=NameNode,name=FSNamesystem
4-
prefix: hadoop.
4+
prefix: hadoop.dfs.
55
metricAttribute:
6-
hadoop.node.name: param(tag.Hostname)
6+
hadoop.node.name: beanattr(tag\.Hostname)
77
mapping:
8-
# hadoop.capacity
8+
# hadoop.dfs.capacity
99
CapacityTotal:
1010
metric: capacity
1111
type: updowncounter
1212
unit: By
13-
desc: Current raw capacity of data nodes.
14-
# hadoop.capacity.used
13+
desc: Current raw capacity of DataNodes.
14+
# hadoop.dfs.capacity.used
1515
CapacityUsed:
1616
metric: capacity.used
1717
type: updowncounter
1818
unit: By
19-
desc: Current used capacity across all data nodes.
20-
# hadoop.block.count
19+
desc: Current used capacity across all DataNodes.
20+
# hadoop.dfs.block.count
2121
BlocksTotal:
2222
metric: block.count
2323
type: updowncounter
2424
unit: "{block}"
2525
desc: Current number of allocated blocks in the system.
26-
# hadoop.block.missing
26+
# hadoop.dfs.block.missing
2727
MissingBlocks:
2828
metric: block.missing
2929
type: updowncounter
3030
unit: "{block}"
3131
desc: Current number of missing blocks.
32-
# hadoop.block.corrupt
32+
# hadoop.dfs.block.corrupt
3333
CorruptBlocks:
3434
metric: block.corrupt
3535
type: updowncounter
3636
unit: "{block}"
3737
desc: Current number of blocks with corrupt replicas.
38-
# hadoop.volume.failure.count
38+
# hadoop.dfs.volume.failure.count
3939
VolumeFailuresTotal:
4040
metric: volume.failure.count
4141
type: counter
4242
unit: "{failure}"
43-
desc: Total number of volume failures across all data nodes.
44-
metricAttribute:
45-
direction: const(sent)
46-
# hadoop.file.count
43+
desc: Total number of volume failures across all DataNodes.
44+
# hadoop.dfs.file.count
4745
FilesTotal:
4846
metric: file.count
4947
type: updowncounter
5048
unit: "{file}"
5149
desc: Current number of files and directories.
52-
# hadoop.connection.count
50+
# hadoop.dfs.connection.count
5351
TotalLoad:
5452
metric: connection.count
5553
type: updowncounter
5654
unit: "{connection}"
5755
desc: Current number of connections.
5856

59-
# hadoop.datanode.count
57+
# hadoop.dfs.data_node.count
6058
NumLiveDataNodes:
61-
metric: &metric datanode.count
59+
metric: &metric data_node.count
6260
type: &type updowncounter
6361
unit: &unit "{node}"
64-
desc: &desc The number of data nodes.
62+
desc: &desc The number of DataNodes.
6563
metricAttribute:
66-
hadoop.datanode.state: const(live)
64+
hadoop.node.state: const(live)
6765
NumDeadDataNodes:
6866
metric: *metric
6967
type: *type
7068
unit: *unit
7169
desc: *desc
7270
metricAttribute:
73-
hadoop.datanode.state: const(dead)
71+
hadoop.node.state: const(dead)

0 commit comments

Comments
 (0)