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_PREFIX
Fields inherited from interface org.apache.hadoop.security.token.DelegationTokenIssuer
TOKEN_LOG
-
Constructor Summary
ConstructorDescriptionStreamWrapperFileSystem
(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) boolean
getFileStatus
(Path path) getUri()
listStatus
(Path path) boolean
boolean
void
setWorkingDirectory
(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, unsetStoragePolicy
Methods inherited from class org.apache.hadoop.conf.Configured
getConf, setConf
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
getUri
in classFileSystem
-
open
- Specified by:
open
in 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:
create
in classFileSystem
-
append
- Specified by:
append
in classFileSystem
-
rename
- Specified by:
rename
in classFileSystem
-
delete
- Specified by:
delete
in classFileSystem
-
setWorkingDirectory
- Specified by:
setWorkingDirectory
in classFileSystem
-
getWorkingDirectory
- Specified by:
getWorkingDirectory
in classFileSystem
-
mkdirs
- Specified by:
mkdirs
in classFileSystem
-
listStatus
- Specified by:
listStatus
in classFileSystem
- Throws:
IOException
-
getFileStatus
- Specified by:
getFileStatus
in classFileSystem
- Throws:
IOException
-