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

  • 相关阅读:
    23种设计模式之外观模式
    HashMap系列之底层数据结构
    HashMap系列之基本概念
    轻松搞定荷兰国旗问题
    服务治理:Spring Cloud Eureka
    Spring Cloud简介
    简单了解什么是微服务架构
    字符串和时间
    调用shell命令
    s3操作
  • 原文地址:https://www.cnblogs.com/leeeee/p/7276497.html
Copyright © 2011-2022 走看看