首页 \ 问答 \ 无法在hadoop安装中找到start-all.sh(cant find start-all.sh in hadoop installation)

无法在hadoop安装中找到start-all.sh(cant find start-all.sh in hadoop installation)

我正在尝试在我的本地机器上设置hadoop并遵循 。 我也设置了hadoop回家

这是我现在要运行的命令

hduser@ubuntu:~$ /usr/local/hadoop/bin/start-all.sh

这就是我得到的错误

-su: /usr/local/hadoop/bin/start-all.sh: No such file or directory

这是我添加到$ HOME / .bashrc文件中的内容

# Set Hadoop-related environment variables
export HADOOP_HOME=/usr/local/hadoop

# Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on)
export JAVA_HOME=/usr/lib/jvm/java-8-oracle

# Some convenient aliases and functions for running Hadoop-related commands
unalias fs &> /dev/null
alias fs="hadoop fs"
unalias hls &> /dev/null
alias hls="fs -ls"

# If you have LZO compression enabled in your Hadoop cluster and
# compress job outputs with LZOP (not covered in this tutorial):
# Conveniently inspect an LZOP compressed file from the command
# line; run via:
#
# $ lzohead /hdfs/path/to/lzop/compressed/file.lzo
#
# Requires installed 'lzop' command.
#
lzohead () {
    hadoop fs -cat $1 | lzop -dc | head -1000 | less
}

# Add Hadoop bin/ directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin

编辑在尝试mahendra给出的解决方案后,我得到以下输出

This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh Starting namenodes on [localhost] localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-hduser-namenode-mmt-HP-ProBook-430-G3.out localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-hduser-datanode-mmt-HP-ProBook-430-G3.out Starting secondary namenodes [0.0.0.0] 0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-mmt-HP-ProBook-430-G3.out starting yarn daemons starting resourcemanager, logging to /usr/local/hadoop/logs/yarn-hduser-resourcemanager-mmt-HP-ProBook-430-G3.out localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-hduser-nodemanager-mmt-HP-ProBook-430-G3.out


I am trying to setup hadoop on my local machine and was following this. I have setup hadoop home also

This is the command I am trying to run now

hduser@ubuntu:~$ /usr/local/hadoop/bin/start-all.sh

And this is the error I get

-su: /usr/local/hadoop/bin/start-all.sh: No such file or directory

This is what I added to my $HOME/.bashrc file

# Set Hadoop-related environment variables
export HADOOP_HOME=/usr/local/hadoop

# Set JAVA_HOME (we will also configure JAVA_HOME directly for Hadoop later on)
export JAVA_HOME=/usr/lib/jvm/java-8-oracle

# Some convenient aliases and functions for running Hadoop-related commands
unalias fs &> /dev/null
alias fs="hadoop fs"
unalias hls &> /dev/null
alias hls="fs -ls"

# If you have LZO compression enabled in your Hadoop cluster and
# compress job outputs with LZOP (not covered in this tutorial):
# Conveniently inspect an LZOP compressed file from the command
# line; run via:
#
# $ lzohead /hdfs/path/to/lzop/compressed/file.lzo
#
# Requires installed 'lzop' command.
#
lzohead () {
    hadoop fs -cat $1 | lzop -dc | head -1000 | less
}

# Add Hadoop bin/ directory to PATH
export PATH=$PATH:$HADOOP_HOME/bin

EDIT After trying the solution given by mahendra I am getting the following output

This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh Starting namenodes on [localhost] localhost: starting namenode, logging to /usr/local/hadoop/logs/hadoop-hduser-namenode-mmt-HP-ProBook-430-G3.out localhost: starting datanode, logging to /usr/local/hadoop/logs/hadoop-hduser-datanode-mmt-HP-ProBook-430-G3.out Starting secondary namenodes [0.0.0.0] 0.0.0.0: starting secondarynamenode, logging to /usr/local/hadoop/logs/hadoop-hduser-secondarynamenode-mmt-HP-ProBook-430-G3.out starting yarn daemons starting resourcemanager, logging to /usr/local/hadoop/logs/yarn-hduser-resourcemanager-mmt-HP-ProBook-430-G3.out localhost: starting nodemanager, logging to /usr/local/hadoop/logs/yarn-hduser-nodemanager-mmt-HP-ProBook-430-G3.out


原文:https://stackoverflow.com/questions/35939312
更新时间:2022-05-01 20:05

最满意答案

  1. [AZ]{3}
  2. \d{4}

1,你也可以使用(JAN|FEB|MAR|APR|...) (你明白了)。 此外,如果要匹配所有Unicode字母,可以将[AZ]\pL交换。

如果您不想要这些匹配的中间串,请在每一侧添加单词边界( \b )。


  1. [A-Z]{3}
  2. \d{4}

For 1, you could also use (JAN|FEB|MAR|APR|...) (you get the idea). Also, if you wanted to match all Unicode letters, you could swap [A-Z] with \pL.

If you didn't want these matched midstring, add a word boundary (\b) on each side.

相关问答

更多
  • 请在下次提出单独的问题。 我无法回答这个问题。 我不太确定我理解这个问题。 不同的配置文件可以包含给定插件的不同值。 通常,如果你激活所有这些,只有其中一个会赢。 建议仅使用Pom父母poms。 实际上,他们是保持理智的唯一方法。 我们有很多运行selenium的经验,但只有通过surefire-plugin(以及jetty-plugin),因为我们所有的测试都是基于junit的。 它的效果非常好。 Please ask separate questions next time. I cannot answ ...
  • [AZ]{3} \d{4} 1,你也可以使用(JAN|FEB|MAR|APR|...) (你明白了)。 此外,如果要匹配所有Unicode字母,可以将[AZ]与\pL交换。 如果您不想要这些匹配的中间串,请在每一侧添加单词边界( \b )。 [A-Z]{3} \d{4} For 1, you could also use (JAN|FEB|MAR|APR|...) (you get the idea). Also, if you wanted to match all Unicode letters, yo ...
  • 试试下面的正则表达式: (?<=\[\[).*?(?=\]\](\s|$)) 例: String text = "Hello World: [[DATA.[field]]] something else"; Pattern regex = Pattern.compile("(?<=\\[\\[).*?(?=\\]\\](\\s|$))", Pattern.MULTILINE); Matcher regexMatcher = regex.matcher(text); if (regexMatcher.f ...
  • 要获得分组的效果,而没有捕获的效果,请使用(?:...)表示法: (?:X(\d+)| ) 这相当于您编写的内容,除了它不为X5创建捕获组,仅为5 。 (顺便说一句,你说“一个数字”,但你的正则表达式有\d+而不是\d ,所以它实际上可以匹配多个数字。) To get the effect of grouping, without the effect of capturing, use the (?:...) notation: (?:X(\d+)| ) This is equiv ...