You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by sm...@yahoo.co.in on 2009/11/15 06:29:12 UTC

Dynamically adjusting replication factor for a data block

Is it possible to set the replication factor for a data block dynamically ?

Regards,
Hrishikesh



      

Re: Dynamically adjusting replication factor for a data block

Posted by Philip Zeyliger <ph...@cloudera.com>.
On Sun, Nov 15, 2009 at 9:53 AM, <sm...@yahoo.co.in> wrote:

> Thanks Philip.
> Also how about setting the replication factor at a block level ?
> Is there support for this in the current version of hdfs ?
>

I believe this is not possible right now.

-- Philip

Re: Dynamically adjusting replication factor for a data block

Posted by sm...@yahoo.co.in.
Thanks Philip.
Also how about setting the replication factor at a block level ? 
Is there support for this in the current version of hdfs ?

- Hrishi



----- Original Message ----
From: Philip Zeyliger <ph...@cloudera.com>
To: common-dev@hadoop.apache.org
Sent: Sun, November 15, 2009 12:48:43 PM
Subject: Re: Dynamically adjusting replication factor for a data block

On Sun, Nov 15, 2009 at 9:45 AM, <sm...@yahoo.co.in> wrote:

> This needs to be done manually.
> Is there a way to do this at runtime i.e. in the java code ?
>

Sure.  It's a method in the FileSystem class:

http://hadoop.apache.org/common/docs/r0.18.3/api/org/apache/hadoop/fs/FileSystem.html#setReplication%28org.apache.hadoop.fs.Path,%20short%29

-- Philip



      

Re: Dynamically adjusting replication factor for a data block

Posted by Philip Zeyliger <ph...@cloudera.com>.
On Sun, Nov 15, 2009 at 9:45 AM, <sm...@yahoo.co.in> wrote:

> This needs to be done manually.
> Is there a way to do this at runtime i.e. in the java code ?
>

Sure.  It's a method in the FileSystem class:

http://hadoop.apache.org/common/docs/r0.18.3/api/org/apache/hadoop/fs/FileSystem.html#setReplication%28org.apache.hadoop.fs.Path,%20short%29

-- Philip

Re: Dynamically adjusting replication factor for a data block

Posted by sm...@yahoo.co.in.
This needs to be done manually.
Is there a way to do this at runtime i.e. in the java code ?

- Hrishi



----- Original Message ----
From: Sagar <sn...@attributor.com>
To: common-dev@hadoop.apache.org
Sent: Sun, November 15, 2009 1:20:12 AM
Subject: Re: Dynamically adjusting replication factor for a data block

I dont think we can set replication on block level.
We can change replication on a file. This will change the replication on 
all blocks belonging to a file

hadoop fs -setrep [-R] <path>
http://hadoop.apache.org/common/docs/current/hdfs_shell.html#setrep


-Sagar
smarthrish@yahoo.co.in wrote:
> Is it possible to set the replication factor for a data block dynamically ?
>
> Regards,
> Hrishikesh
>
>
>
>      
>  


      

Re: Dynamically adjusting replication factor for a data block

Posted by Sagar <sn...@attributor.com>.
I dont think we can set replication on block level.
We can change replication on a file. This will change the replication on 
all blocks belonging to a file

hadoop fs -setrep [-R] <path>
http://hadoop.apache.org/common/docs/current/hdfs_shell.html#setrep


-Sagar
smarthrish@yahoo.co.in wrote:
> Is it possible to set the replication factor for a data block dynamically ?
>
> Regards,
> Hrishikesh
>
>
>
>       
>