Class HdfsFileSystem

java.lang.Object
org.apache.commons.vfs2.provider.AbstractVfsComponent
org.apache.commons.vfs2.provider.AbstractFileSystem
org.apache.commons.vfs2.provider.hdfs.HdfsFileSystem
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.commons.vfs2.FileSystem, org.apache.commons.vfs2.provider.VfsComponent

public class HdfsFileSystem extends org.apache.commons.vfs2.provider.AbstractFileSystem
A VFS FileSystem that interacts with HDFS.
Since:
2.1
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    HdfsFileSystem(org.apache.commons.vfs2.FileName rootName, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)
    Constructs file system.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    addCapabilities(Collection<org.apache.commons.vfs2.Capability> capabilities)
     
    void
     
    protected org.apache.commons.vfs2.FileObject
    createFile(org.apache.commons.vfs2.provider.AbstractFileName name)
     
    org.apache.commons.vfs2.FileObject
    resolveFile(org.apache.commons.vfs2.FileName name)
    Resolve FileName into FileObject.

    Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileSystem

    addJunction, addListener, closeCommunicationLink, decorateFileObject, doCloseCommunicationLink, doReplicateFile, fireFileChanged, fireFileCreated, fireFileDeleted, getAttribute, getFileFromCache, getFileSystemManager, getFileSystemOptions, getLastModTimeAccuracy, getParentLayer, getRoot, getRootName, getRootURI, hasCapability, init, isOpen, isReleaseable, notifyAllStreamsClosed, putFileToCache, removeFileFromCache, removeJunction, removeListener, replicateFile, resolveFile, setAttribute

    Methods inherited from class org.apache.commons.vfs2.provider.AbstractVfsComponent

    getContext, getLogger, setContext, setLogger

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HdfsFileSystem

      protected HdfsFileSystem(org.apache.commons.vfs2.FileName rootName, org.apache.commons.vfs2.FileSystemOptions fileSystemOptions)
      Constructs file system.
      Parameters:
      rootName - Name of the root directory of this file system.
      fileSystemOptions - options for this file system instance.
  • Method Details

    • addCapabilities

      protected void addCapabilities(Collection<org.apache.commons.vfs2.Capability> capabilities)
      Specified by:
      addCapabilities in class org.apache.commons.vfs2.provider.AbstractFileSystem
      See Also:
      • AbstractFileSystem.addCapabilities(Collection)
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Specified by:
      close in interface org.apache.commons.vfs2.provider.VfsComponent
      Overrides:
      close in class org.apache.commons.vfs2.provider.AbstractFileSystem
      See Also:
      • AbstractFileSystem.close()
    • createFile

      protected org.apache.commons.vfs2.FileObject createFile(org.apache.commons.vfs2.provider.AbstractFileName name) throws Exception
      Specified by:
      createFile in class org.apache.commons.vfs2.provider.AbstractFileSystem
      Throws:
      Exception
      See Also:
      • AbstractFileSystem.createFile(AbstractFileName)
    • resolveFile

      public org.apache.commons.vfs2.FileObject resolveFile(org.apache.commons.vfs2.FileName name) throws org.apache.commons.vfs2.FileSystemException
      Resolve FileName into FileObject.
      Specified by:
      resolveFile in interface org.apache.commons.vfs2.FileSystem
      Overrides:
      resolveFile in class org.apache.commons.vfs2.provider.AbstractFileSystem
      Parameters:
      name - The name of a file on the HdfsFileSystem.
      Returns:
      resolved FileObject.
      Throws:
      org.apache.commons.vfs2.FileSystemException - if an error occurred.