Hadoop 2.7.3 Java运行时错误 - 未找到核心站点.xml

技术标签: java.  hadoop2.7.3.

运行时 hdfs dfs -mkdir /abc 我收到以下错误。

Exception in thread "main" java.lang.RuntimeException: core-site.xml not found
at org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2577)
at org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2503)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2409)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1144)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1116)
at org.apache.hadoop.conf.Configuration.setBoolean(Configuration.java:1454)
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.<init>(GenericOptionsParser.java:170)
at org.apache.hadoop.util.GenericOptionsParser.<init>(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:372)

我的core-site.xml的路径是/usr/local/hadoop/etc/hadoop/core-site.xml。

如何解决此错误?

看答案

您可以尝试在〜/ .bash_profile中或在脚本的开始时设置以下变量。

export HADOOP_CONF_DIR=**location of your hadoop in local**

像 (/home/hadoop/hadoop-2.7.3/etc/hadoop )

您还可以查看以下链接:

https://community.cloudera.com/t5/storage-random-access-hdfs/runtimeexception-running-the-hdfs-command-core-site-xml-not/td-p/28224


智能推荐

Hadoop2.7.3 mapreduce(五)详解

一、为什么使用Mapreduce? MapReduce是为了解决传统HPC框架在面对海量数据时扩展困难而产生的。 MapReduce致力于解决大规模数据处理的问题,利用局部性原理将整个问题分而治之。 MapReduce集群由普通PC机构成,为无共享式架构。在处理之前,将数据集分布至各个节点。处理时,每个节点就近读取本地存储的数据处理(Map),将处理后的数据进行合并(Combine)、排序(Shu...

Linux_Hadoop2.7.3 安装笔记

环境:Vmware Workstation 10,CentOS-7-x86_64-DVD-1511.iso,Xshell 4.0,Master:192.168.216.144,Slave1:192.168.216.145,Slave2:192.168.216.146. 参照Linux_Hadoop1.2.1 安装笔记到无密码登录: 官方安装手册 [hadoop@localhost ~]$ wget...

eclipse hadoop2.7.3 环境搭建

2019独角兽企业重金招聘Python工程师标准>>> 准备工作 jdk1.8 eclipse hadoop2.7.3(集群环境配置,可以参考我以前的博客) 特别注意看下hadoop集群启动情况,必须每个节点都启动成功 现在开始配置hadoop环境 1.下载hadoop插件 hadoop-eclipse-plugin-2.7.0,把插件放到eclipse下面的plugins &n...

hadoop-eclipse-plugin(版本hadoop2.7.3)

下载我们需要的  hadoop-eclipse-plugin-2.7.3.jar,winutils.exe 和 hadoop.dll 记录安装中遇到的问题 链接:https://pan.baidu.com/s/1g4QpGTJvF1IGd929L8bQxQ 提取码:97ey 可以模仿TA,有问题留言 https://www.cnblogs.com/supia...

Hadoop-windows10安装部署Hadoop2.7.3

1.到官网下载hadoo安装到windows本地 地址 https://archive.apache.org/dist/hadoop/core/hadoop-2.7.3/hadoop-2.7.3.tar.gz 2. 解压 3. 进行设置环境变量 1)新建 HADOOP_HOME D:\Hadoop\hadoop-2.7.3\hadoop-2.7.3 2) Path中增加 %HADOOP_HOME%...

猜你喜欢

【T3】登录提示运行时错误53,文件未找到

T3的幺蛾子越来越多,现在的补丁不过是狗尾续貂,不是添加广告,就是打着云旗号获取信息。 T3打了最新补丁后,过几天登录提示运行时错误53,文件未找到,之前一般是因为Client.dll文件问题,经查看此文件正常。 去250隔离区查看如下: HKJYTY=X会计云体验,UpDogToCloud 是上传客户信息到云吗?太XX!   将这个[敏感]文件添加受信即可登录。...

Hadoop2.7.3 下安装Hbase1.2.7

hbase-1.2.7下载地址http://hbase.apache.org/ 使用secureCRT连接虚拟机 进入要保存压缩包的文件夹内[root@server1 ~]# cd /opt/softwares 将Windows上的hbase-1.2.7-bin.tar.gz传输到CentOS上的softwares文件夹内[root@server1 softwares]# rz选择要传输的压缩包 ...

JVM类加载器

JVM中有三个重要的类加载器 BootstrapClassLoader(启动类加载器):最顶层的类加载器,由C++实现,负责加载%JAVA_HOME%/lib目录下的jar包和类。 ExtensionClassLoader(扩展类加载器):主要负责加载%JAVA_HOME%lib/ext目录下的jar包和类。 AppClassLoader(应用程序类加载器):面向用户的类加载器,负责加载当前应用下...

实践案例丨Pt-osc工具连接rds for mysql 数据库失败

本文分享自华为云社区《Pt-osc工具连接rds for mysql 数据库失败》,原文作者:云技术搬运工 。 【现象】 主机可以telent 通rds 端口,并且使用mysql-client 连接正常; 如下图所示:使用pt-osc工具连接时,一直没有响应,一直卡在哪里 等了4-5分钟左右后,会有响应,如下图所示:提示不能连接到x.x.x.x,而这个ip地址查到是备节点的ip。 【排查】 在rd...

java.nio.Buffer 中的 flip()方法

在Java NIO编程中,对缓冲区操作常常需要使用  java.nio.Buffer中的 flip()方法。   Buffer 中的 flip() 方法涉及到 Buffer 中的capacity、position、limit三个概念。        capacity:在读/写模式下都是固定的,就是我们分配的缓冲大小(容量)。   &nbs...

问答精选

Groupby first start date

my problem is the following I have this dataframe and I would like to sort of groupby by week_nb and year_nb. For example the final result would look something like: (I didn't make the calculation for...

download in one click issue

i want to download file from web server and for that I need 1. send request for file path to web service method 2. receive this path on iphone side 3. now convert this path into NSURL 4. and finally s...

Query is too Complex exception in access

I want to update 200 columns in a table in a single query using vb.net with ms-access. is there any other way to update the table or to split the table into two parts and then run the query? The Datat...

Deploy Eclipse - Error Executing file .jar - Spring Batch

I have a program running successfully in ECLIPSE. But when generate the .jar file and try to run it generates an error. The class information org/springframework/batch/core/ it is referenced in the pr...

Euclidean distance using numpy

I am trying to calculate the euclidean distance of two binary data (image) using numpy but I am getting nan in the result Output I am using this binary data This is not binary data. This is a binary i...

相关问题

相关文章

热门文章

推荐文章

相关标签

推荐问答