|
|
-
Re: Checking Which Filesystem Being Used?Edward Capriolo 2012-02-07, 22:42
On Tue, Feb 7, 2012 at 5:24 PM, Eli Finkelshteyn <[EMAIL PROTECTED]> wrote:
> Hi Folks, > This might be a stupid question, but I'm new to Java and Hadoop, so... > > Anyway, if I want to check what FileSystem is currently being used at some > point (i.e. evaluating FileSystem.get(conf)), what would be the most > elegant way of doing that? Should I just do something like: > if (FileSystem.get(conf) == "HDFS") {...} > Or is there a better way? > > Eli > conf.get("fs.default.name") would return a URI such as hdfs://bla:8000 or file:///this. Although an application could have two Configurations which could be used to connect to two separate FileSystems inside the same java application. Edward |