You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-user@hadoop.apache.org by ch huang <ju...@gmail.com> on 2013/12/12 02:07:47 UTC

how to corrupt a replica of a block by manually?

hi,maillist:
        what is the sample way to corrupt a replica of a block ,i opened a
replica data file ,and delete a line,than use fsck ,nothing corrupt,
 should the DN  be restarted?

Re: how to corrupt a replica of a block by manually?

Posted by Adam Kawa <ka...@gmail.com>.
Hmmm.. I guess that you can try to read this file using

$ hadoop fs -cat <file-with-corrupt-replica> to detect that

When reading a file its checksums are calculated and compared to checksums
that were calculated during a write operation. If verification fails, NN is
notified about the corrupt replica and you will fetch a different replica
from another DN to read that file.


2013/12/12 ch huang <ju...@gmail.com>

> hi,maillist:
>         what is the sample way to corrupt a replica of a block ,i opened a
> replica data file ,and delete a line,than use fsck ,nothing corrupt,
>  should the DN  be restarted?
>

Re: how to corrupt a replica of a block by manually?

Posted by Adam Kawa <ka...@gmail.com>.
Hmmm.. I guess that you can try to read this file using

$ hadoop fs -cat <file-with-corrupt-replica> to detect that

When reading a file its checksums are calculated and compared to checksums
that were calculated during a write operation. If verification fails, NN is
notified about the corrupt replica and you will fetch a different replica
from another DN to read that file.


2013/12/12 ch huang <ju...@gmail.com>

> hi,maillist:
>         what is the sample way to corrupt a replica of a block ,i opened a
> replica data file ,and delete a line,than use fsck ,nothing corrupt,
>  should the DN  be restarted?
>

Re: how to corrupt a replica of a block by manually?

Posted by Adam Kawa <ka...@gmail.com>.
Hmmm.. I guess that you can try to read this file using

$ hadoop fs -cat <file-with-corrupt-replica> to detect that

When reading a file its checksums are calculated and compared to checksums
that were calculated during a write operation. If verification fails, NN is
notified about the corrupt replica and you will fetch a different replica
from another DN to read that file.


2013/12/12 ch huang <ju...@gmail.com>

> hi,maillist:
>         what is the sample way to corrupt a replica of a block ,i opened a
> replica data file ,and delete a line,than use fsck ,nothing corrupt,
>  should the DN  be restarted?
>

Re: how to corrupt a replica of a block by manually?

Posted by Adam Kawa <ka...@gmail.com>.
Hmmm.. I guess that you can try to read this file using

$ hadoop fs -cat <file-with-corrupt-replica> to detect that

When reading a file its checksums are calculated and compared to checksums
that were calculated during a write operation. If verification fails, NN is
notified about the corrupt replica and you will fetch a different replica
from another DN to read that file.


2013/12/12 ch huang <ju...@gmail.com>

> hi,maillist:
>         what is the sample way to corrupt a replica of a block ,i opened a
> replica data file ,and delete a line,than use fsck ,nothing corrupt,
>  should the DN  be restarted?
>