hdfs备份因子问题

25 views
Skip to first unread message

zhang辉张

unread,
Oct 14, 2012, 10:50:47 PM10/14/12
to hadoo...@googlegroups.com
各位大神,在hdfs上的文件,如果备份因子设置为1,并且这个文件的某些block坏掉了,那这个文件的其他block还能使用么?

dong.yajun

unread,
Oct 15, 2012, 9:09:31 PM10/15/12
to hadoo...@googlegroups.com
可以使用,看你怎么去读它了。 

1. 如果是开头一个block坏掉,从头读,当然是失败的。 

2. 最后一个block坏掉,从头读,是可以的。 

On Mon, Oct 15, 2012 at 10:50 AM, zhang辉张 <zhang...@gmail.com> wrote:
各位大神,在hdfs上的文件,如果备份因子设置为1,并且这个文件的某些block坏掉了,那这个文件的其他block还能使用么?

--
You received this message because you are subscribed to the Google Groups "Hadoop In China" group.
To post to this group, send email to hadoo...@googlegroups.com.
To unsubscribe from this group, send email to hadooper_cn...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/hadooper_cn?hl=en.



--
Ric Dong 
Newegg Ecommerce, MIS department 


zhang辉张

unread,
Oct 15, 2012, 9:20:15 PM10/15/12
to hadoo...@googlegroups.com

如果中间坏掉一些呢?我就顺序读,能不能把坏掉的块去掉,来修复这个文件呢?

dong.yajun

unread,
Oct 15, 2012, 11:23:36 PM10/15/12
to hadoo...@googlegroups.com
不行。

当然,有一种办法,你需要计算坏掉的块,在整个文件中的offset,在顺序读的时候再配合随机读,跨过坏掉的块。

zhang辉张

unread,
Oct 15, 2012, 11:28:31 PM10/15/12
to hadoo...@googlegroups.com

这个太难了,没有恢复文件的命令么?

Reply all
Reply to author
Forward
0 new messages