org.apache.accumulo.start.classloader.vfs.providers
Class HdfsFileObject

java.lang.Object
  extended by org.apache.commons.vfs2.provider.AbstractFileObject
      extended by org.apache.accumulo.start.classloader.vfs.providers.HdfsFileObject
All Implemented Interfaces:
org.apache.commons.vfs2.FileObject

public class HdfsFileObject
extends org.apache.commons.vfs2.provider.AbstractFileObject

A VFS representation of an HDFS file.

Since:
2.1

Constructor Summary
protected HdfsFileObject(org.apache.commons.vfs2.provider.AbstractFileName name, HdfsFileSystem fs, org.apache.hadoop.fs.FileSystem hdfs, org.apache.hadoop.fs.Path p)
          Constructs a new HDFS FileObject
 
Method Summary
 boolean canRenameTo(org.apache.commons.vfs2.FileObject newfile)
           
protected  void doAttach()
           
protected  Map<String,Object> doGetAttributes()
           
protected  long doGetContentSize()
           
protected  InputStream doGetInputStream()
           
protected  long doGetLastModifiedTime()
           
protected  org.apache.commons.vfs2.RandomAccessContent doGetRandomAccessContent(org.apache.commons.vfs2.util.RandomAccessMode mode)
           
protected  org.apache.commons.vfs2.FileType doGetType()
           
protected  boolean doIsHidden()
           
protected  boolean doIsReadable()
           
protected  boolean doIsSameFile(org.apache.commons.vfs2.FileObject destFile)
           
protected  boolean doIsWriteable()
           
protected  String[] doListChildren()
           
protected  org.apache.commons.vfs2.FileObject[] doListChildrenResolved()
           
protected  void doRemoveAttribute(String attrName)
           
protected  void doSetAttribute(String attrName, Object value)
           
protected  boolean doSetLastModifiedTime(long modtime)
           
 boolean equals(Object o)
           
 boolean exists()
           
 int hashCode()
           
 
Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
childrenChanged, close, copyFrom, createFile, createFolder, delete, delete, doCreateFileContent, doCreateFolder, doDelete, doDetach, doGetCertificates, doGetOutputStream, doRename, endOutput, finalize, findFiles, findFiles, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getName, getOutputStream, getOutputStream, getParent, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isHidden, isReadable, isSameFile, isWriteable, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, toString
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HdfsFileObject

protected HdfsFileObject(org.apache.commons.vfs2.provider.AbstractFileName name,
                         HdfsFileSystem fs,
                         org.apache.hadoop.fs.FileSystem hdfs,
                         org.apache.hadoop.fs.Path p)
Constructs a new HDFS FileObject

Parameters:
name - FileName
fs - HdfsFileSystem instance
hdfs - Hadoop FileSystem instance
p - Path to the file in HDFS
Method Detail

canRenameTo

public boolean canRenameTo(org.apache.commons.vfs2.FileObject newfile)
Specified by:
canRenameTo in interface org.apache.commons.vfs2.FileObject
Overrides:
canRenameTo in class org.apache.commons.vfs2.provider.AbstractFileObject
See Also:
AbstractFileObject.canRenameTo(org.apache.commons.vfs2.FileObject)

doAttach

protected void doAttach()
                 throws Exception
Overrides:
doAttach in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doAttach()

doGetAttributes

protected Map<String,Object> doGetAttributes()
                                      throws Exception
Overrides:
doGetAttributes in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doGetAttributes()

doGetContentSize

protected long doGetContentSize()
                         throws Exception
Specified by:
doGetContentSize in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doGetContentSize()

doGetInputStream

protected InputStream doGetInputStream()
                                throws Exception
Specified by:
doGetInputStream in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doGetInputStream()

doGetLastModifiedTime

protected long doGetLastModifiedTime()
                              throws Exception
Overrides:
doGetLastModifiedTime in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doGetLastModifiedTime()

doGetRandomAccessContent

protected org.apache.commons.vfs2.RandomAccessContent doGetRandomAccessContent(org.apache.commons.vfs2.util.RandomAccessMode mode)
                                                                        throws Exception
Overrides:
doGetRandomAccessContent in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
(org.apache.commons.vfs2.util.RandomAccessMode)

doGetType

protected org.apache.commons.vfs2.FileType doGetType()
                                              throws Exception
Specified by:
doGetType in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doGetType()

doIsHidden

protected boolean doIsHidden()
                      throws Exception
Overrides:
doIsHidden in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doIsHidden()

doIsReadable

protected boolean doIsReadable()
                        throws Exception
Overrides:
doIsReadable in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doIsReadable()

doIsSameFile

protected boolean doIsSameFile(org.apache.commons.vfs2.FileObject destFile)
                        throws org.apache.commons.vfs2.FileSystemException
Overrides:
doIsSameFile in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
org.apache.commons.vfs2.FileSystemException
See Also:
AbstractFileObject.doIsSameFile(org.apache.commons.vfs2.FileObject)

doIsWriteable

protected boolean doIsWriteable()
                         throws Exception
Overrides:
doIsWriteable in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doIsWriteable()

doListChildren

protected String[] doListChildren()
                           throws Exception
Specified by:
doListChildren in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doListChildren()

doListChildrenResolved

protected org.apache.commons.vfs2.FileObject[] doListChildrenResolved()
                                                               throws Exception
Overrides:
doListChildrenResolved in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doListChildrenResolved()

doRemoveAttribute

protected void doRemoveAttribute(String attrName)
                          throws Exception
Overrides:
doRemoveAttribute in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doRemoveAttribute(java.lang.String)

doSetAttribute

protected void doSetAttribute(String attrName,
                              Object value)
                       throws Exception
Overrides:
doSetAttribute in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doSetAttribute(java.lang.String, java.lang.Object)

doSetLastModifiedTime

protected boolean doSetLastModifiedTime(long modtime)
                                 throws Exception
Overrides:
doSetLastModifiedTime in class org.apache.commons.vfs2.provider.AbstractFileObject
Throws:
Exception
See Also:
AbstractFileObject.doSetLastModifiedTime(long)

equals

public boolean equals(Object o)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

exists

public boolean exists()
               throws org.apache.commons.vfs2.FileSystemException
Specified by:
exists in interface org.apache.commons.vfs2.FileObject
Overrides:
exists in class org.apache.commons.vfs2.provider.AbstractFileObject
Returns:
boolean true if file exists, false if not
Throws:
org.apache.commons.vfs2.FileSystemException
See Also:
AbstractFileObject.exists()

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()


Copyright © 2013 Apache Accumulo Project. All Rights Reserved.