我在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
发布评论