You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-dev@hadoop.apache.org by ch huang <ju...@gmail.com> on 2013/11/19 06:19:43 UTC

when datanode will delete these invalidate blocks?

hi,all:
         i read the replication monitor code ,in   *invalidateWork *call it
just add the invalidate block into
the invalidateBlocks list of the DatanodeDescriptor class  ,but i do not
see any remove operation in replication monitor code ,my question is when
these invalidate blocks will be removed from the DN which host them?

Re: when datanode will delete these invalidate blocks?

Posted by Andrew Wang <an...@cloudera.com>.
Try looking in the heartbeat code on the NN and DN, it should clear things
up. The namenode sends these block invalidations to the DN on the DN
heartbeat response. The DN then deletes the blocks and on the next
heartbeat reports to the NN that it invalidated the blocks. The NN then
removes the invalidated blocks from the blockmap.


On Mon, Nov 18, 2013 at 9:19 PM, ch huang <ju...@gmail.com> wrote:

> hi,all:
>          i read the replication monitor code ,in   *invalidateWork *call it
> just add the invalidate block into
> the invalidateBlocks list of the DatanodeDescriptor class  ,but i do not
> see any remove operation in replication monitor code ,my question is when
> these invalidate blocks will be removed from the DN which host them?
>