zoukankan      html  css  js  c++  java
  • Hadoop记录-metastore jmx配置

    参考:http://www.lixiuliang.cn/categories/%E5%A4%A7%E6%95%B0%E6%8D%AE/

    1.修改bin/hive文件 添加jvm启动参数:

    if [ ${SERVICE} == 'metastore' ]
    then
    HADOOP_CLIENT_OPTS="$HADOOP_CLIENT_OPTS -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9093 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"
    fi

    参数说明:
    #开启远程jmx
    -Dcom.sun.management.jmxremote
    #此Java进程的jmx端口为9093
    -Dcom.sun.management.jmxremote.port=9093
    #不要求SSL连接
    -Dcom.sun.management.jmxremote.ssl=false
    #不需要用户认证
    -Dcom.sun.management.jmxremote.authenticate=false

    2.修改conf/hive-site.xml文件 开启MetaStore JXMReporter:

    <!-- 开启metastore服务metrics -->
    <property>
    <name>hive.metastore.metrics.enabled</name>
    <value>true</value>
    </property>
    <!-- 可使用默认值,无需修改 -->
    <property>
    <name>hive.service.metrics.class</name>
    <value>org.apache.hadoop.hive.common.metrics.metrics2.CodahaleMetrics</value>
    </property>
    <!-- 可使用默认值,无需修改 -->
    <property>
    <name>hive.service.metrics.reporter</name>
    <value>JSON_FILE, JMX</value>
    </property>

    3.启动MetaStore 并检查是否成功开启

    #启动
    nohup bin/hive --service metastore >> logs/metadata.log 2>&1 &
    netstat -nltp | grep 9093

  • 相关阅读:
    20165212第八周学习总结
    20165212第八周课上测试补做
    20165212实验二面向对象程序设计
    Titanic生存预测
    聚类算法数据生成器make_blobs
    k-means
    监督学习、无监督学习与半监督学习
    在线Latex公式编辑器
    西瓜书课后习题——第四章
    ML经典数据集
  • 原文地址:https://www.cnblogs.com/xinfang520/p/10721615.html
Copyright © 2011-2022 走看看