美文网首页工作生活
配置Hadoop环境变量

配置Hadoop环境变量

作者: 城堡下的晚祷 | 来源:发表于2019-07-01 21:56 被阅读0次

    (1)/etc/profile 下加入:

    ##HADOOP_HOME
    export HADOOP_HOME=/opt/module/hadoop-2.7.7
    export PATH=$PATH:$HADOOP_HOME/bin
    export PATH=$PATH:$HADOOP_HOME/sbin
    

    版本和位置根据实际调整
    (2)执行 source /etc/profile
    (3)检查是否配置成功

    [root@hadoop1 jdk1.8.0_144]# hadoop
    Usage: hadoop [--config confdir] [COMMAND | CLASSNAME]
      CLASSNAME            run the class named CLASSNAME
     or
      where COMMAND is one of:
      fs                   run a generic filesystem user client
      version              print the version
      jar <jar>            run a jar file
                           note: please use "yarn jar" to launch
                                 YARN applications, not this command.
      checknative [-a|-h]  check native hadoop and compression libraries availability
      distcp <srcurl> <desturl> copy file or directories recursively
      archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive
      classpath            prints the class path needed to get the
      credential           interact with credential providers
                           Hadoop jar and the required libraries
      daemonlog            get/set the log level for each daemon
      trace                view and modify Hadoop tracing settings
    
    Most commands print help when invoked w/o parameters.
    
    

    相关文章

      网友评论

        本文标题:配置Hadoop环境变量

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