很多人在配置好了hadoop集群后,输入启动命令 start-all.sh 时,报错:This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh 如下:
hadoop@master:~/hadoop-2.6.4$ start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
很多人以为是Hadoop文件的权限问题,其实主要是环境变量没有设置好,修改~/.bash_profile或者/etc/profile文件即可。
解决办法如下:
# sudo vi /etc/profile 或者vi ~/.bash_profile
增加下面两行语句:
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
然后用source重新编译使之生效:
#source /etc/profile
或者:
#sudo vi ~/.bash_profile
增加下面两行语句:
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
source ~/.bash_profile