i hadoop 2.7.1 e成功地工作了。接下来,我下载了Apache-Hive-2.1.1 bin,然后编辑了" .bashrc"文件,以更新用户的环境变量。现在,当我使用命令'*/sbin/start-dfs.sh'开始hadoop时,有一个错误:"找不到或加载main类org.apache.hadoop.hdfs.server.datanode.datanode.datanode"
Air-di-Danilo:2.7.1 danilogrifoni$ */sbin/start-dfs.sh
18/04/28 12:33:36 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting namenodes on [localhost]
localhost: starting namenode, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/hadoop-danilogrifoni-namenode-Air-di-Danilo.out
localhost: Errore: impossibile trovare o caricare la classe principale org.apache.hadoop.hdfs.server.namenode.NameNode
localhost: starting datanode, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/hadoop-danilogrifoni-datanode-Air-di-Danilo.out
localhost: Errore: impossibile trovare o caricare la classe principale org.apache.hadoop.hdfs.server.datanode.DataNode
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/local/Cellar/hadoop/2.7.1/libexec/logs/hadoop-danilogrifoni-secondarynamenode-Air-di-Danilo.out
0.0.0.0: Errore: impossibile trovare o caricare la classe principale org.apache.hadoop.hdfs.server.namenode.SecondaryNameNode
18/04/28 12:34:22 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
这是我编辑的BASHRC文件:
export HADOOP_HOME=/usr/local/Cellar/hadoop/2.7.1
export HADOOP_PREFIX=/usr/local/Cellar/hadoop/2.7.1/libexec
export HADOOP_CONF_DIR=/usr/local/Cellar/hadoop/2.7.1/libexec/etc/hadoop
export HADOOP_MAPRED_HOME=/usr/local/Cellar/hadoop/2.7.1
export HADOOP_COMMON_HOME=/usr/local/Cellar/hadoop/2.7.1
export HADOOP_HDFS_HOME=/usr/local/Cellar/hadoop/2.7.1
export YARN_HOME=/usr/local/Cellar/hadoop/2.7.1
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"
export HADOOP_CLASSPATH=$(hadoop classpath):$HADOOP_CLASSPATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home
export PATH=$PATH:/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home/bin
export PATH=$PATH:/usr/local/Cellar/hadoop/2.7.1/bin
export HADOOP_PID_DIR=/usr/local/Cellar/hadoop/2.7.1
# Set HIVE_HOME
export HIVE_HOME=/Users/danilogrifoni/Documents/apache-hive-2.1.1-bin
export PATH=$PATH:/Users/danilogrifoni/Documents/apache-hive-2.1.1-bin/bin
是否在设置bashrc文件上运行源.bashrc命令??