Quantcast
Channel: Hortonworks » All Replies
Viewing all articles
Browse latest Browse all 3435

dfs.support.append

$
0
0

Hello
I am using the HDP Sandbox 2.1. (Linux)
I am trying to append data to a file.
[root@sandbox conf]# pwd
/etc/hadoop/conf

hdfs-site.xml value for this parameter seems to be true, this is the default value
<property>
<name>dfs.support.append</name>
<value>true</value>
</property>
but the following call always return false/false

if(this._hdfsFile == null)
this._hdfsFile = FileSystem.get(URI.create(this._directory), new Configuration());

boolean flag1 = Boolean.getBoolean(this._hdfsFile.getConf().get(“dfs.support.append”));
System.out.println(“dfs.support.append is set to be ” + flag1);

boolean flag2 = this._hdfsFile.getConf().getBoolean(“hdfs.append.support”, false);
System.out.println(“hdfs.append.support is set to be ” + flag2);

unless I set _hdfsFile.setReplication(path, (short)1);
I cannot append to the file.

What am I doing wrong ?

Can somebody help?
Thanks


Viewing all articles
Browse latest Browse all 3435

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>