美文网首页
hadoop配置文件之yarn-env.sh

hadoop配置文件之yarn-env.sh

作者: IT_小白 | 来源:发表于2019-09-30 14:51 被阅读0次
    # User for YARN daemons
    # yarn 守护进程用户
    export HADOOP_YARN_USER=${HADOOP_YARN_USER:-yarn}
    
    # resolve links - $0 may be a softlink
    # yarn配置文件地址
    export YARN_CONF_DIR="${YARN_CONF_DIR:-$HADOOP_YARN_HOME/conf}"
    
    # some Java parameters
    #JAVA_HOME 路径
    export JAVA_HOME=/home/y/libexec/jdk1.6.0/
    #如果已经配置JAVA_HOME就使用已经配置的JAVA_HOME,如果没配置就退出
    if [ "$JAVA_HOME" != "" ]; then
      #echo "run java in $JAVA_HOME"
      JAVA_HOME=$JAVA_HOME
    fi
    if [ "$JAVA_HOME" = "" ]; then
      echo "Error: JAVA_HOME is not set."
      exit 1
    fi
    #避免只配置了JAVA_HOME没有配置JAVA_HOME/bin到PATH
    JAVA=$JAVA_HOME/bin/java
    
    #yarn的最大内存
    JAVA_HEAP_MAX=-Xmx1000m 
    
    # For setting YARN specific HEAP sizes please use this
    # Parameter and set appropriately
    # 如果设置了YARN_HEAPSIZE上面配置的JAVA_HEAP_MAX将会被覆盖
    YARN_HEAPSIZE=1000
    # check envvars which might override default args
    if [ "$YARN_HEAPSIZE" != "" ]; then
      JAVA_HEAP_MAX="-Xmx""$YARN_HEAPSIZE""m"
    fi
    

    相关文章

      网友评论

          本文标题:hadoop配置文件之yarn-env.sh

          本文链接:https://www.haomeiwen.com/subject/kwzcpctx.html