[root@HTY2-1 data]# hadoop fs -ls
Exception in thread “main” java.lang.RuntimeException: core-site.xml not found
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2485)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2411)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2321)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1059)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1031)
at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1369)
at org.apache.hadoop.util.GenericOptionsParser.processGeneralOptions(GenericOptionsParser.java:319)
at org.apache.hadoop.util.GenericOptionsParser.parseGeneralOptions(GenericOptionsParser.java:485)
at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:170)
at org.apache.hadoop.util.GenericOptionsParser.(GenericOptionsParser.java:153)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:64)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:84)
at org.apache.hadoop.fs.FsShell.main(FsShell.java:340)
[root@HTY2-1 data]#
[root@HTY2-1 data]# hadoop classpath
/root/Downloads/hadoop-2.7.2/etc/hadoop:/usr/lib/hadoop/lib/:/usr/lib/hadoop/.//:/usr/lib/hadoop-hdfs/./:/usr/lib/hadoop-hdfs/lib/:/usr/lib/hadoop-hdfs/.//:/usr/lib/hadoop-yarn/lib/:/usr/lib/hadoop-yarn/.//:/usr/lib/hadoop-mapreduce/lib/:/usr/lib/hadoop-mapreduce/.//
[root@HTY2-1 data]# cd
[root@HTY2-1 ~]# ls
cache1 Desktop Downloads gitclone idea IdeaProject software Templates
[root@HTY2-1 ~]# cd Downloads
[root@HTY2-1 Downloads]# ls
apache-maven-3.3.3 idea
apache-maven-3.3.3-bin.tar.gz ideaIC-2016.1.2b.tar.gz
fonts jdk1.8.0_92
fonts.tar.bz2 jdk-8u92-linux-x64.tar.gz
hadoop-2.7.2-jar-dependence libhadoop.so.1.0.0
hadoop-2.7.2-src scala-2.10.5.rpm
hadoop-2.7.2-src.tar.gz spark
hadoop-2.7.2.tar.gz
[root@HTY2-1 Downloads]#
[root@HTY2-1 Downloads]# hadoop version
Hadoop 2.6.0-cdh5.4.8
Subversion http://github.com/cloudera/hadoop -r d93b087d75839b271edf190638669bfde9bdc796
Compiled by jenkins on 2015-10-15T16:04Z
Compiled with protoc 2.5.0
From source with checksum e3ea30a354dfe490b21f10ab2e3693
This command was run using /usr/lib/hadoop/hadoop-common-2.6.0-cdh5.4.8.jar
[root@HTY2-1 Downloads]#
2.7.2那个解压缩之后的包我已经删除了
不知道为啥还提示有2.7.2
/etc/hadoop/conf (設定ファイルの場所) を設定します。
新しいエラーを生成します:
[root@HTY2-1 conf]# hadoop fs -ls
ls: No Route to HTY2-1/192.168.83.135 から HTY2-1:8020 へのホストがソケット タイムアウト例外で失敗しました: java.net.NoRouteToHostException: ホストへのルートがありません 詳細については、http://wiki.apache.org/hadoop.. .
[root@HTY2-1 conf]#
core-site.xml が見つからないということですか? 設定ファイルのディレクトリにあるかどうかを確認してください。