伪分布式模式Hadoop [英] Pseudo Distributed Mode Hadoop

查看:65
本文介绍了伪分布式模式Hadoop的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Mac& C安装了伪分布式模式 Hadoop 2.7.3 完成了 Plural Sight 中指定的所有配置。我将 Csv文件从本地复制到hdfs。但第二天,当我搜索文件时,它不存在于hdfs中并自动删除。有没有其他的conf设置,以便我的文件不会丢失?

core-site.xml

 < configuration> 
<属性>
<名称> fs.defaultFS< / name>
< value> hdfs:// localhost:9000< / value>
< / property>
< / configuration>

hdfs-site.xml

 < configuration> 
<属性>
< name> dfs.replication< / name>
<值> 1< /值>
< / property>
< / configuration>

谢谢,

解决方案

将这些属性添加到 hdfs-site.xml

 <性> 
<名称> dfs.namenode.name.dir< /名称>
< value> / home / username / hadoop-dfs / name< / value>
< / property>
<属性>
< name> dfs.datanode.data.dir< / name>
< value> / home / username / hadoop-dfs / data< / value>
< / property>

元数据和数据块存储在 / tmp ,因为它是 hadoop.tmp.dir 的值。重新启动时删除 / tmp 中的内容。


$ b 添加这些属性后,格式化 namenode 并启动服务。


I have installed Pseudo Distributed mode Hadoop 2.7.3 in Mac & did all Configuration which is specified in Plural Sight. I Copied Csv file from Local to hdfs. But next day when i searched for files , it is not present in hdfs and removed automatically. Is there any other conf setting so that my files are not loss?

core-site.xml

<configuration> 
   <property> 
      <name>fs.defaultFS</name> 
      <value>hdfs://localhost:9000</value> 
   </property> 
</configuration>

hdfs-site.xml

<configuration> 
   <property> 
      <name>dfs.replication</name> 
      <value>1</value> 
   </property> 
</configuration>

Thanks,

解决方案

Add these properties to hdfs-site.xml

<property> 
   <name>dfs.namenode.name.dir</name> 
   <value>/home/username/hadoop-dfs/name</value> 
</property>
<property> 
   <name>dfs.datanode.data.dir</name> 
   <value>/home/username/hadoop-dfs/data</value> 
</property>

The metadata and data blocks are stored under /tmp by default as it is the value of hadoop.tmp.dir. The contents inside /tmp are deleted on reboot.

After adding these properties, format the namenode and start the services.

这篇关于伪分布式模式Hadoop的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆