protected DistributedFileSystem getDFS ( Path p ) throws IOException { FileSystem fs = p . getFileSystem ( getConf ( ) ) ; DistributedFileSystem dfs = null ; if ( fs instanceof DistributedFileSystem ) { dfs = ( DistributedFileSystem ) fs ; } else if ( fs instanceof FilterFileSystem ) { FilterFileSystem ffs = ( FilterFileSystem ) fs ; if ( ffs . getRawFileSystem ( ) instanceof DistributedFileSystem ) { dfs = ( DistributedFileSystem ) ffs . getRawFileSystem ( ) ; } } return dfs ; }
Returns a DistributedFileSystem hosting the path supplied .