You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by "jason_jice@yahoo.com" <ja...@yahoo.com> on 2014/07/18 06:24:29 UTC

umsubscribe


-------- Original Message --------
From: Wellington Chevreuil <we...@gmail.com>
Sent: Thursday, July 17, 2014 04:34 AM
To: user@hadoop.apache.org
Subject: Re: Replace a block with a new one

>Hi,
>
>there's no way to do that, as HDFS does not provide file updates features. You'll need to write a new file with the changes. 
>
>Notice that even if you manage to find the physical block replica files on the disk, corresponding to the part of the file you want to change, you can't simply update it manually, as this would give a different checksum, making HDFS mark such blocks as corrupt.
>
>Regards,
>Wellington.
>
>
>
>On 17 Jul 2014, at 10:50, Zesheng Wu <wu...@gmail.com> wrote:
>
>> Hi guys,
>> 
>> I recently encounter a scenario which needs to replace an exist block with a newly written block
>> The most straightforward way to finish may be like this:
>> Suppose the original file is A, and we write a new file B which is composed by the new data blocks, then we merge A and B to C which is the file we wanted
>> The obvious shortcoming of this method is wasting of network bandwidth 
>> 
>> I'm wondering whether there is a way to replace the old block by the new block directly.
>> Any thoughts?
>> 
>> -- 
>> Best Wishes!
>> 
>> Yours, Zesheng
>