Hi,

Actually, how does namenode handle when block report is sent from datanodes?

After removing snapshot the file size = 0.5*BLOCK_SIZE.
but the block report says it is 0.6*BLOCK_SIZE,(if we do not shrink the
block)
there is a mismatch.


On Tue, Oct 21, 2014 at 8:34 PM, Pushparaj Motamari <pushpara...@gmail.com>
wrote:

> 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