伪分布式模式Hadoop

编程入门 行业动态 更新时间:2024-10-08 08:22:33
本文介绍了伪分布式模式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

本文发布于:2023-11-23 07:18:05,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分布式   模式   Hadoop

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!