hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hadoop hive <hadooph...@gmail.com>
Subject Re: Which replication value will be used
Date Tue, 29 Jul 2014 08:08:51 GMT
Its should pick whatever value you are providing in your api only If in
hdfs-site.XML doesn't have set final in replication parameter.
On Jul 29, 2014 1:26 PM, "Satyam Singh" <satyam.singh@ericsson.com> wrote:

> Hello,
>
>
>
> I have given dfs.replication=2 in hdfs-site.xml as:
> <property>
>     <name>dfs.replication</name>
>     <value>2</value>
> </property>
>
> Also, In my application i have used api for wrting in hdfs:
> public FSDataOutputStream create(Path f,
>                                             boolean overwrite,
>                                             int bufferSize,
>                                             short replication,
>                                             long blockSize,
>                                             Progressable progress
>                                             ) throws IOException {
>     return this.create(f, FsPermission.getFileDefault().applyUMask(
>         FsPermission.getUMask(getConf())), overwrite, bufferSize,
>         replication, blockSize, progress);
>   }
>
> here i also given replication as fourth parameter.
>
> So my question is which replication value will be used that we have given
> in api or in hdfs-site.xml
>
>
> Warm Regards,
> Satyam
>

Mime
View raw message