Github user haoch commented on a diff in the pull request: https://github.com/apache/incubator-eagle/pull/407#discussion_r76841756 --- Diff: eagle-external/hadoop_jmx_collector/hadoop_jmx_kafka.py --- @@ -64,6 +64,23 @@ def on_bean(self, bean): capacityusage = round(float(bean['CapacityUsed']) / float(bean['CapacityTotal']) * 100, 2) self.collector.on_bean_kv(self.PREFIX, "capacityusage", capacityusage) +class NNNodeUsageMetric(JmxMetricListener): + PREFIX = "hadoop.namenode.nodeusage" + + def on_bean(self, bean): + if bean["name"] == "Hadoop:service=NameNode,name=NameNodeInfo": + nodeusagedic = json.loads(bean["NodeUsage"]); + nodeusage_detail_dic = nodeusagedic["nodeUsage"]; + min = round( float(nodeusage_detail_dic["min"].strip('%')) ,2 ); --- End diff -- In order to avoid confusing, could you pls. rename local variable min/max to min_val/max_val as min and max are Python <built-in function> names?
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---