Hi,

Generally the user expectation is to get back to the previous state of
FileSystem, so we should see the old state of block(the block size should
shrink). I couldn't find the semantics of this kind of operations in design
document either.

Thank You

Pushparaj

On Tue, Oct 21, 2014 at 8:23 PM, Andrew Wang <andrew.w...@cloudera.com>
wrote:

> Hi Pushparaj,
>
> Based on those steps, isn't the expectation that you end up with a 0.6*size
> block at the end? Blocks are append only (i.e. only grow in length), so
> deleting a snapshot cannot result in a block shrinking.
>
> Best,
> Andrew
>
> On Tue, Oct 21, 2014 at 7:20 AM, Pushparaj Motamari <pushpara...@gmail.com
> >
> wrote:
>
> > Hi,
> >
> > Consider the scenario below.
> >
> > /A/file.txt  in HDFS
> >
> > 1. file.txt size = 0.5*(Size of Block).
> >
> > 2. Take Snapshot on directory A
> >
> > 3. Append to the file.txt, making its size as 0.6*(Size of Block)
> >
> > 4. Remove/delete the snapshot on folder taken in step2.
> >
> > My Question
> > --------------------------------
> > 1. How does HDFS handle when it has to decrease the size of block, as
> above
> > when we delete the snapshot the block size has to be reduces to its
> > previous size. This code is handled at datanode or Namnode?
> >
> > Thank You
> >
>

Reply via email to