zoukankan      html  css  js  c++  java
  • JMX 监控 Hadoop

    1. 配置所有节点的$HADOOP_HOME/conf/hadoop-env.sh 文件

    exportHADOOP_HOME=/opt/hadoop-1.0.0

    exportHADOOP_NAMENODE_OPTS="-Dcom.sun.management.jmxremote.port=9191-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access  $HADOOP_NAMENODE_OPTS"

    exportHADOOP_DATANODE_OPTS="-Dcom.sun.management.jmxremote.port=9292-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access $HADOOP_DATANODE_OPTS"

    exportHADOOP_JOBTRACKER_OPTS="-Dcom.sun.management.jmxremote.port=9393-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access $HADOOP_JOBTRACKER_OPTS"

    exportHADOOP_TASKTRACKER_OPTS="-Dcom.sun.management.jmxremote.port=9494-Dcom.sun.management.jmxremote.ssl=false-Dcom.sun.management.jmxremote.authenticate=true-Dcom.sun.management.jmxremote.password.file=$HADOOP_HOME/conf/jmxremote.password-Dcom.sun.management.jmxremote.access.file=$HADOOP_HOME/conf/jmxremote.access $HADOOP_TASKTRACKER_OPTS"

    2.创建用户访问控制文件

    $HADOOP_HOME/conf/jmxremote.password内容:

    myAdmin mypassword

    $HADOOP_HOME/conf/jmxremote.access  内容:

    myAdmin readonly

    修改文件属性:

    chmod 600 jmxremote.password

    chmod 600jmxremote.password 

    3.使用JMX访问

    URL为:

    service:jmx:rmi://jdni/rmi://server1:9191/jmxrmi

    service:jmx:rmi://jdni/rmi://server2:9292/jmxrmi

    service:jmx:rmi://jdni/rmi://server1:9393/jmxrmi

    service:jmx:rmi://jdni/rmi://server2:9494/jmxrmi

    Jconsole中可见结果

    JMX <wbr>监控 <wbr>Hadoop

  • 相关阅读:
    C++STL中的unique函数解析
    STL中erase()的用法
    刷题技巧——简易哈希表的实现
    经典面试题目——找到第n个丑数(参考《剑指offer(第二版)》面试题49)
    C++中sort函数小结
    谈谈交叉验证法(个人小结)
    数字序列中某一位数字(《剑指offer》面试题44)
    求1~n整数中1出现的次数(《剑指offer》面试题43)
    2018年美团春招(第二批)题解
    C/C++中字符串和数字互转小结
  • 原文地址:https://www.cnblogs.com/leeeee/p/7276497.html
Copyright © 2011-2022 走看看