Class HdfsFileObject
java.lang.Object
org.apache.commons.vfs2.provider.AbstractFileObject<HdfsFileSystem>
org.apache.commons.vfs2.provider.hdfs.HdfsFileObject
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<FileObject>,Iterable<FileObject>,FileObject
A VFS representation of an HDFS file.
- Since:
- 2.1
-
Field Summary
Fields inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
DEFAULT_BUFFER_SIZEFields inherited from interface org.apache.commons.vfs2.FileObject
EMPTY_ARRAY -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedHdfsFileObject(AbstractFileName name, HdfsFileSystem fs, org.apache.hadoop.fs.FileSystem hdfs, org.apache.hadoop.fs.Path path) Constructs a new HDFS FileObject -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRenameTo(FileObject newfile) protected voiddoAttach()protected voidprotected voiddoDelete()protected longprotected InputStreamdoGetInputStream(int bufferSize) protected longprotected OutputStreamdoGetOutputStream(boolean append) protected RandomAccessContentprotected FileTypeprotected booleanprotected booleanprotected booleanprotected String[]protected FileObject[]protected voiddoRemoveAttribute(String attrName) protected voiddoRename(FileObject newfile) protected voiddoSetAttribute(String attrName, Object value) protected booleandoSetLastModifiedTime(long modtime) booleanexists()Methods inherited from class org.apache.commons.vfs2.provider.AbstractFileObject
childrenChanged, close, compareTo, copyFrom, createFile, createFolder, delete, delete, deleteAll, doCreateFileContent, doDetach, doGetCertificates, doGetInputStream, doIsExecutable, doIsSameFile, doIsSymbolicLink, doSetExecutable, doSetReadable, doSetWritable, endOutput, finalize, findFiles, findFiles, getAbstractFileSystem, getChild, getChildren, getContent, getFileContentInfoFactory, getFileOperations, getFileSystem, getInputStream, getInputStream, getName, getOutputStream, getOutputStream, getParent, getPublicURIString, getRandomAccessContent, getType, getURL, handleChanged, handleCreate, handleDelete, holdObject, injectType, isAttached, isContentOpen, isExecutable, isFile, isFolder, isHidden, isReadable, isSameFile, isSymbolicLink, isWriteable, iterator, listFiles, moveTo, notifyAllStreamsClosed, onChange, onChildrenChanged, refresh, resolveFile, resolveFile, setExecutable, setReadable, setWritable, toStringMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.commons.vfs2.FileObject
getPath, getURIMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
HdfsFileObject
protected HdfsFileObject(AbstractFileName name, HdfsFileSystem fs, org.apache.hadoop.fs.FileSystem hdfs, org.apache.hadoop.fs.Path path) Constructs a new HDFS FileObject- Parameters:
name- FileNamefs- HdfsFileSystem instancehdfs- Hadoop FileSystem instancepath- Path to the file in HDFS
-
-
Method Details
-
canRenameTo
- Specified by:
canRenameToin interfaceFileObject- Overrides:
canRenameToin classAbstractFileObject<HdfsFileSystem>- See Also:
-
doAttach
- Overrides:
doAttachin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doCreateFolder
- Overrides:
doCreateFolderin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- Since:
- 2.7.0
- See Also:
-
doDelete
- Overrides:
doDeletein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- Since:
- 2.7.0
- See Also:
-
doGetAttributes
- Overrides:
doGetAttributesin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doGetContentSize
- Specified by:
doGetContentSizein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doGetInputStream
- Overrides:
doGetInputStreamin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doGetLastModifiedTime
- Overrides:
doGetLastModifiedTimein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doGetOutputStream
- Overrides:
doGetOutputStreamin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- Since:
- 2.7.0
- See Also:
-
doGetRandomAccessContent
- Overrides:
doGetRandomAccessContentin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doGetType
- Specified by:
doGetTypein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doIsHidden
- Overrides:
doIsHiddenin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doIsReadable
- Overrides:
doIsReadablein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doIsWriteable
- Overrides:
doIsWriteablein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doListChildren
- Specified by:
doListChildrenin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doListChildrenResolved
- Overrides:
doListChildrenResolvedin classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doRemoveAttribute
- Overrides:
doRemoveAttributein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doRename
- Overrides:
doRenamein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- Since:
- 2.7.0
- See Also:
-
doSetAttribute
- Overrides:
doSetAttributein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
doSetLastModifiedTime
- Overrides:
doSetLastModifiedTimein classAbstractFileObject<HdfsFileSystem>- Throws:
Exception- See Also:
-
exists
- Specified by:
existsin interfaceFileObject- Overrides:
existsin classAbstractFileObject<HdfsFileSystem>- Returns:
- boolean true if file exists, false if not
- Throws:
FileSystemException- See Also:
-