Re: HDFS Snapshots

2014-10-21 Thread Andrew Wang
Why would the state go backwards? Let me try to restate your scenario: t1: snapshot a file with length 5 t2: append to the file, now length 6 t3: delete the snapshot After this, since we deleted the snapshot, we only have the current filesystem state which is length 6. There's no "restore" funct

Re: HDFS Snapshots

2014-10-21 Thread Pushparaj Motamari
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 wrote

Re: HDFS Snapshots

2014-10-21 Thread Pushparaj Motamari
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,

Re: HDFS Snapshots

2014-10-21 Thread Andrew Wang
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 wrote: > Hi