hadoop-config.sh小看
来源:互联网 发布:网络心理误区 编辑:程序博客网 时间:2024/05/29 16:41
# resolve links - $0 may be a softlink
this="$0" ===========================将hadoop-config.sh 文件所在的相对目录赋给this
while [ -h "$this" ]; do =================================while的测试条件里 -h "$this" 表示判断“$this”这个文件是否是符号链接ls=`ls -ld "$this"` ============================将$this下面的所有子文件或者目录赋给ls
link=`expr "$ls" : '.*-> \(.*\)$'` ===========================expr字符串匹配------见http://zhidao.baidu.com/question/218734332.html
if expr "$link" : '.*/.*' > /dev/null; then
this="$link"
else
this=`dirname "$this"`/"$link"
fi
done
# convert relative path to absolute path
bin=`dirname "$this"`
script=`basename "$this"`
bin=`cd "$bin"; pwd`
this="$bin/$script" ================================绝对路径
# the root of the Hadoop installation
export HADOOP_HOME=`dirname "$this"`/.. =========================hadoop的安装目录(绝对路径)
#check to see if the conf dir is given as an optional argument
if [ $# -gt 1 ] ==========================$#是指变量总数
then
if [ "--config" = "$1" ]
then
shift
confdir=$1 =================shift之后$1代表的是传进来的第二个变量也就是hadoop的conf的目录HADOOP_CONF_DIR
shift
HADOOP_CONF_DIR=$confdir
fi
fi
# Allow alternate conf dir location.
HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_HOME/conf}" ====================${a:-b}如果给定a,则取a,如果没有给定a,那么取b
#check to see it is specified whether to use the slaves or the
# masters file
if [ $# -gt 1 ]
then
if [ "--hosts" = "$1" ]
then
shift
slavesfile=$1
shift
export HADOOP_SLAVES="${HADOOP_CONF_DIR}/$slavesfile"
fi
fi
- hadoop-config.sh小看
- hadoop中的start-all.sh小看
- Hadoop的hadoop-config.sh脚本详解
- Hadoop集群配置文件分发工具config-dispatcher.sh
- Hadoop集群配置文件分发工具config-dispatcher.sh .
- 【Bug记录】hadoop启动失败:hadoop-config.sh: Syntax error: word unexpected (expecting ")")
- utils/config.sh
- Hadoop Config
- hadoop-config
- hadoop-0.20-env.sh
- hadoop base config
- hadoop cygwin ssh config
- hadoop启动之“hadoop-daemon.sh”详解
- hadoop 1.2.1 hadoop-env.sh
- hadoop启动之“hadoop-daemon.sh”详解
- hadoop:start-all.sh 启动时出错
- hadoop相关问题-stop-all.sh
- hadoop启动脚本分析:start-all.sh
- ubuntu系统jdk安装的默认路径
- 5号笔记
- 我的火狐浏览器不兼容迅雷下载
- 大连网络赛 即 hdu 4003 Find Metal Mineral
- 解决 struts2上传的excel2007文件,在用poi处理时通过new XSSFWorkbook(inputStream)出错
- hadoop-config.sh小看
- C# 获取DataGridView中的复选框
- Meego wifi 测试
- poj 1904 King's Quest 二分图中强联通分量的运用
- Java Properties文件的读写
- find命令查找包含指定内容的文件
- surf匹配流程。。。
- [System.ComponentModel.DataObject]
- c++简单的学生管理系统----继承练习