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 Aaron Baff <Aa...@telescope.tv> on 2011/03/22 21:53:53 UTC

Using FileContext for FS API

I was trying to use FileSystem for an append, but couldn't get it to work, and so I found org.apache.hadoop.fs.FileContext which I did get append to work in, and which according to my reading of https://issues.apache.org/jira/browse/HADOOP-4952 and https://issues.apache.org/jira/browse/HADOOP-6223 will be the new filesystem interaction API.

My big question, is how do I set multiple options? FileContext.create() specifies only a single object, and Options.CreateOpts only has some static methods to create individual option Options.CreateOptions objects of various types to control the different options. How do I specify multiple of those? Or how do I set the default SS Options on the FileContext (such as replication, block size, etc). It appears the only way to do that is by passing in a Configuration object with those set, yet the description Javadoc for the FileContext class states that only the default filesystem and umask are pulled from the Configuration object.

Any documentation that I'm missing? Do I need to go look through the source code?

--Aaron