gpt4 book ai didi

hadoop - namenode -format删除hdfs中的文件

转载 作者:行者123 更新时间:2023-12-02 21:47:51 25 4
gpt4 key购买 nike

我通过sqoop命令将数据从mysql成功上传到HDFS。

MySQL Hadoop集群有

1个名称节点
1个用于次要NameNode的节点
Jobtracker的1个节点
3个用于Datanade + Tasktracker的节点

之后,我停止了hadoop集群。

再次启动Hadoop

在下面的命令中使用

  namenode -format (start NameNode)

place new VERSION number in all datanode VERSION FILE

now START DATANODE

启动datanode时,我在HDFS中上传的MYSQL数据似乎丢失了。

以下是datanode日志的输出。
2014-05-15 07:46:56,018 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_2445513848423894029_1337 at file /app/hadoop/data/dn/current/blk_2445513848423894029
2014-05-15 07:46:56,018 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_3541234094053021888_1338 at file /app/hadoop/data/dn/current/blk_3541234094053021888
2014-05-15 07:46:56,018 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_3862391472172526583_1347 at file /app/hadoop/data/dn/current/blk_3862391472172526583
2014-05-15 07:46:56,018 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_4001223662527683746_1387 at file /app/hadoop/data/dn/current/blk_4001223662527683746
2014-05-15 07:46:56,018 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_4143551839757190038_1410 at file /app/hadoop/data/dn/current/subdir14/blk_4143551839757190038
2014-05-15 07:46:56,019 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_5292612097544035620_1384 at file /app/hadoop/data/dn/current/blk_5292612097544035620
2014-05-15 07:46:56,019 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_5318982235915332439_1333 at file /app/hadoop/data/dn/current/blk_5318982235915332439
2014-05-15 07:46:56,019 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_5806860765395122737_1388 at file /app/hadoop/data/dn/current/blk_5806860765395122737
2014-05-15 07:46:56,019 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_6490571696460682483_1302 at file /app/hadoop/data/dn/current/blk_6490571696460682483
2014-05-15 07:46:56,020 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_7721528058087862562_1336 at file /app/hadoop/data/dn/current/blk_7721528058087862562
2014-05-15 07:46:56,020 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_7734832800955956873_1375 at file /app/hadoop/data/dn/current/blk_7734832800955956873
2014-05-15 07:46:56,020 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_8691928504867292802_1297 at file /app/hadoop/data/dn/current/blk_8691928504867292802
2014-05-15 07:46:56,020 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_8861743153245195509_1303 at file /app/hadoop/data/dn/current/blk_8861743153245195509
2014-05-15 07:46:56,021 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_8921828525927242630_1300 at file /app/hadoop/data/dn/current/blk_8921828525927242630
2014-05-15 07:46:56,021 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Deleted blk_8938258584084219299_1344 at file

最佳答案

我的问题如下

当我将namenode的新VERSION更改为所有datanode时。并启动datanodes,所有上传的RDBMS数据都被删除,日志文件“在文件/ app / hadoop / data / dn / current / blk_6490571696460682483”中的“已删除blk_6490571696460682483_1302”出现以下错误

我的问题是,当我们使用Haddop fs -format命令将所有数据格式化时,是否有恢复数据的方法

关于hadoop - namenode -format删除hdfs中的文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23668665/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com