hadoop-metrics配置说明

本文介绍了Hadoop中运行时指标数据的默认监测配置。包括dfs、mapred和jvm等不同上下文的具体配置示例,如使用NullContext、FileContext及GangliaContext等方式收集指标,并指定了文件记录位置及周期。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

hadoop提供了各种运行时指标数据  默认的监测配置如下

 

Java代码     收藏代码
  1. # Configuration of the  "dfs"  context  for   null   
  2. dfs.class =org.apache.hadoop.metrics.spi.NullContext  
  3.   
  4. # Configuration of the "dfs"  context  for  file  
  5. #dfs.class =org.apache.hadoop.metrics.file.FileContext  
  6. #dfs.period=10   
  7. #dfs.fileName=/tmp/dfsmetrics.log  
  8.   
  9. # Configuration of the "dfs"  context  for  ganglia  
  10. # dfs.class =org.apache.hadoop.metrics.ganglia.GangliaContext  
  11. # dfs.period=10   
  12. # dfs.servers=localhost:8649   
  13.   
  14.   
  15. # Configuration of the "mapred"  context  for   null   
  16. mapred.class =org.apache.hadoop.metrics.spi.NullContext  
  17.   
  18. # Configuration of the "mapred"  context  for  file  
  19. #mapred.class =org.apache.hadoop.metrics.file.FileContext  
  20. #mapred.period=10   
  21. #mapred.fileName=/tmp/mrmetrics.log  
  22.   
  23. # Configuration of the "mapred"  context  for  ganglia  
  24. # mapred.class =org.apache.hadoop.metrics.ganglia.GangliaContext  
  25. # mapred.period=10   
  26. # mapred.servers=localhost:8649   
  27.   
  28.   
  29. # Configuration of the "jvm"  context  for   null   
  30. jvm.class =org.apache.hadoop.metrics.spi.NullContext  
  31.   
  32. # Configuration of the "jvm"  context  for  file  
  33. #jvm.class =org.apache.hadoop.metrics.file.FileContext  
  34. #jvm.period=10   
  35. #jvm.fileName=/tmp/jvmmetrics.log  
  36.   
  37. # Configuration of the "jvm"  context  for  ganglia  
  38. # jvm.class =org.apache.hadoop.metrics.ganglia.GangliaContext  
  39. # jvm.period=10   
  40. # jvm.servers=localhost:8649   

 更多信息请查看 java进阶网 http://www.javady.com

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值