Package org.apache.orc.util
Class StreamWrapperFileSystem
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.orc.util.StreamWrapperFileSystem
- All Implemented Interfaces:
Closeable,AutoCloseable,Configurable,BulkDeleteSource,PathCapabilities,DelegationTokenIssuer
This class provides an adaptor so that tools that want to read an ORC
file from an FSDataInputStream can do so. Create an instance with the
stream, path, and fileSize and pass it in to the reader as the FileSystem.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem
FileSystem.DirectoryEntries, FileSystem.DirListingIterator<T extends FileStatus>, FileSystem.Statistics -
Field Summary
Fields inherited from class org.apache.hadoop.fs.FileSystem
DEFAULT_FS, FS_DEFAULT_NAME_KEY, LOG, SHUTDOWN_HOOK_PRIORITY, statistics, TRASH_PREFIX, USER_HOME_PREFIXFields inherited from interface org.apache.hadoop.security.token.DelegationTokenIssuer
TOKEN_LOG -
Constructor Summary
ConstructorsConstructorDescriptionStreamWrapperFileSystem(FSDataInputStream stream, FileStatus status, Configuration conf) Create a FileSystem that only has information about the given stream.StreamWrapperFileSystem(FSDataInputStream stream, Path path, long fileSize, Configuration conf) Create a FileSystem that only has information about the given stream. -
Method Summary
Modifier and TypeMethodDescriptionappend(Path path, int i, Progressable progressable) create(Path path, org.apache.hadoop.fs.permission.FsPermission fsPermission, boolean b, int i, short i1, long l, Progressable progressable) booleangetFileStatus(Path path) getUri()listStatus(Path path) booleanbooleanvoidsetWorkingDirectory(Path path) Methods inherited from class org.apache.hadoop.fs.FileSystem
access, append, append, append, append, appendFile, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, checkPath, clearStatistics, close, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createBulkDelete, createDataInputStreamBuilder, createDataInputStreamBuilder, createDataOutputStreamBuilder, createFile, createMultipartUploader, createNewFile, createNonRecursive, createNonRecursive, createNonRecursive, createPathHandle, createSnapshot, createSnapshot, createSymlink, delete, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAdditionalTokenIssuers, getAllStatistics, getAllStoragePolicies, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getEnclosingRoot, getFileBlockLocations, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getGlobalStorageStatistics, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getPathHandle, getQuotaUsage, getReplication, getScheme, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getStoragePolicy, getStorageStatistics, getTrashRoot, getTrashRoots, getUsed, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, hasPathCapability, initialize, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusBatch, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, msync, newInstance, newInstance, newInstance, newInstanceLocal, open, open, open, openFile, openFile, openFileWithOptions, openFileWithOptions, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, satisfyStoragePolicy, setAcl, setDefaultUri, setDefaultUri, setOwner, setPermission, setQuota, setQuotaByStorageType, setReplication, setStoragePolicy, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncate, unsetStoragePolicyMethods inherited from class org.apache.hadoop.conf.Configured
getConf, setConfMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.hadoop.security.token.DelegationTokenIssuer
addDelegationTokens
-
Constructor Details
-
StreamWrapperFileSystem
Create a FileSystem that only has information about the given stream.- Parameters:
stream- the data of the streamstatus- the file status of the streamconf- the configuration to use
-
StreamWrapperFileSystem
public StreamWrapperFileSystem(FSDataInputStream stream, Path path, long fileSize, Configuration conf) Create a FileSystem that only has information about the given stream.- Parameters:
stream- the data of the streampath- the file name of the streamfileSize- the length of the stream in bytesconf- the configuration to use
-
-
Method Details
-
getUri
- Specified by:
getUriin classFileSystem
-
open
- Specified by:
openin classFileSystem- Throws:
IOException
-
create
public FSDataOutputStream create(Path path, org.apache.hadoop.fs.permission.FsPermission fsPermission, boolean b, int i, short i1, long l, Progressable progressable) - Specified by:
createin classFileSystem
-
append
- Specified by:
appendin classFileSystem
-
rename
- Specified by:
renamein classFileSystem
-
delete
- Specified by:
deletein classFileSystem
-
setWorkingDirectory
- Specified by:
setWorkingDirectoryin classFileSystem
-
getWorkingDirectory
- Specified by:
getWorkingDirectoryin classFileSystem
-
mkdirs
- Specified by:
mkdirsin classFileSystem
-
listStatus
- Specified by:
listStatusin classFileSystem- Throws:
IOException
-
getFileStatus
- Specified by:
getFileStatusin classFileSystem- Throws:
IOException
-