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 Austin Chungath <au...@gmail.com> on 2013/02/04 07:44:22 UTC

how to set default replication factor for specific directories

Hi,

Is there any way for setting the default replication factor for specific
directories?
The default replication factor is 3 for the cluster. I don't want to change
this global default, but I want specific directories to have different
replication factor.
I can use the following command to set the replication factor of files
after they are created, but how to make it default for that directory?
hadoop dfs -setrep -R -w 1 /user

Thanks,
Austin

Re: how to set default replication factor for specific directories

Posted by Harsh J <ha...@cloudera.com>.
Replication factor is a client-sent property for files (doesn't apply
to 'directories'), so there's currently no way to do this outside of
controlling the client/client-config of those that write to that
directory (for example, HBase can have a separate replication config,
for all writes to /hbase), or by periodically setting the factor
recursively on the directory (as your sample command does).

On Mon, Feb 4, 2013 at 12:14 PM, Austin Chungath <au...@gmail.com> wrote:
> Hi,
>
> Is there any way for setting the default replication factor for specific
> directories?
> The default replication factor is 3 for the cluster. I don't want to change
> this global default, but I want specific directories to have different
> replication factor.
> I can use the following command to set the replication factor of files after
> they are created, but how to make it default for that directory?
> hadoop dfs -setrep -R -w 1 /user
>
> Thanks,
> Austin



-- 
Harsh J

Re: how to set default replication factor for specific directories

Posted by Harsh J <ha...@cloudera.com>.
Replication factor is a client-sent property for files (doesn't apply
to 'directories'), so there's currently no way to do this outside of
controlling the client/client-config of those that write to that
directory (for example, HBase can have a separate replication config,
for all writes to /hbase), or by periodically setting the factor
recursively on the directory (as your sample command does).

On Mon, Feb 4, 2013 at 12:14 PM, Austin Chungath <au...@gmail.com> wrote:
> Hi,
>
> Is there any way for setting the default replication factor for specific
> directories?
> The default replication factor is 3 for the cluster. I don't want to change
> this global default, but I want specific directories to have different
> replication factor.
> I can use the following command to set the replication factor of files after
> they are created, but how to make it default for that directory?
> hadoop dfs -setrep -R -w 1 /user
>
> Thanks,
> Austin



-- 
Harsh J

Re: how to set default replication factor for specific directories

Posted by Harsh J <ha...@cloudera.com>.
Replication factor is a client-sent property for files (doesn't apply
to 'directories'), so there's currently no way to do this outside of
controlling the client/client-config of those that write to that
directory (for example, HBase can have a separate replication config,
for all writes to /hbase), or by periodically setting the factor
recursively on the directory (as your sample command does).

On Mon, Feb 4, 2013 at 12:14 PM, Austin Chungath <au...@gmail.com> wrote:
> Hi,
>
> Is there any way for setting the default replication factor for specific
> directories?
> The default replication factor is 3 for the cluster. I don't want to change
> this global default, but I want specific directories to have different
> replication factor.
> I can use the following command to set the replication factor of files after
> they are created, but how to make it default for that directory?
> hadoop dfs -setrep -R -w 1 /user
>
> Thanks,
> Austin



-- 
Harsh J

Re: how to set default replication factor for specific directories

Posted by Harsh J <ha...@cloudera.com>.
Replication factor is a client-sent property for files (doesn't apply
to 'directories'), so there's currently no way to do this outside of
controlling the client/client-config of those that write to that
directory (for example, HBase can have a separate replication config,
for all writes to /hbase), or by periodically setting the factor
recursively on the directory (as your sample command does).

On Mon, Feb 4, 2013 at 12:14 PM, Austin Chungath <au...@gmail.com> wrote:
> Hi,
>
> Is there any way for setting the default replication factor for specific
> directories?
> The default replication factor is 3 for the cluster. I don't want to change
> this global default, but I want specific directories to have different
> replication factor.
> I can use the following command to set the replication factor of files after
> they are created, but how to make it default for that directory?
> hadoop dfs -setrep -R -w 1 /user
>
> Thanks,
> Austin



-- 
Harsh J