Package org.apache.drill.exec.store.dfs
Class BoxFileSystem
java.lang.Object
org.apache.hadoop.conf.Configured
org.apache.hadoop.fs.FileSystem
org.apache.drill.exec.store.dfs.OAuthEnabledFileSystem
org.apache.drill.exec.store.dfs.BoxFileSystem
- All Implemented Interfaces:
Closeable
,AutoCloseable
,org.apache.hadoop.conf.Configurable
,org.apache.hadoop.fs.PathCapabilities
,org.apache.hadoop.security.token.DelegationTokenIssuer
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.FileSystem
org.apache.hadoop.fs.FileSystem.DirectoryEntries, org.apache.hadoop.fs.FileSystem.DirListingIterator<T extends org.apache.hadoop.fs.FileStatus>, org.apache.hadoop.fs.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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.apache.hadoop.fs.FSDataOutputStream
append
(org.apache.hadoop.fs.Path f, int bufferSize, org.apache.hadoop.util.Progressable progress) org.apache.hadoop.fs.FSDataOutputStream
create
(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress) Create an FSDataOutputStream at the indicated Path with write-progress reporting.boolean
delete
(org.apache.hadoop.fs.Path f, boolean recursive) org.apache.hadoop.fs.FileStatus
getFileStatus
(org.apache.hadoop.fs.Path f) Return a file status object that represents the path.getUri()
Returns a URI which identifies this FileSystem.org.apache.hadoop.fs.Path
org.apache.hadoop.fs.FileStatus[]
listStatus
(org.apache.hadoop.fs.Path f) List the statuses of the files/directories in the given path if the path is a directory.boolean
mkdirs
(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission) org.apache.hadoop.fs.FSDataInputStream
open
(org.apache.hadoop.fs.Path inputPath, int bufferSize) Opens an FSDataInputStream at the indicated Path.boolean
rename
(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) void
setWorkingDirectory
(org.apache.hadoop.fs.Path new_dir) Set the current working directory for the given FileSystem.Methods inherited from class org.apache.drill.exec.store.dfs.OAuthEnabledFileSystem
getAuthMode, getCredentialsProvider, getoAuthConfig, getPluginConfig, getTokenTable, setoAuthConfig, setPluginConfig, setTokenTable, updateTokens, updateTokens
Methods inherited from class org.apache.hadoop.fs.FileSystem
access, 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, createFile, 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, 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, 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
-
BoxFileSystem
public BoxFileSystem()
-
-
Method Details
-
getUri
Returns a URI which identifies this FileSystem.- Specified by:
getUri
in classorg.apache.hadoop.fs.FileSystem
- Returns:
- the URI of this filesystem.
-
open
public org.apache.hadoop.fs.FSDataInputStream open(org.apache.hadoop.fs.Path inputPath, int bufferSize) throws IOException Opens an FSDataInputStream at the indicated Path.- Specified by:
open
in classorg.apache.hadoop.fs.FileSystem
- Parameters:
inputPath
- the file name to openbufferSize
- the size of the buffer to be used.- Throws:
IOException
- IO failure
-
create
public org.apache.hadoop.fs.FSDataOutputStream create(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, org.apache.hadoop.util.Progressable progress) throws IOException Create an FSDataOutputStream at the indicated Path with write-progress reporting.- Specified by:
create
in classorg.apache.hadoop.fs.FileSystem
- Parameters:
f
- the file name to openpermission
- file permissionoverwrite
- if a file with this name already exists, then if true, the file will be overwritten, and if false an error will be thrown.bufferSize
- the size of the buffer to be used.replication
- required block replication for the file.blockSize
- block sizeprogress
- the progress reporter- Throws:
IOException
- IO failure- See Also:
-
FileSystem.setPermission(Path, FsPermission)
-
append
public org.apache.hadoop.fs.FSDataOutputStream append(org.apache.hadoop.fs.Path f, int bufferSize, org.apache.hadoop.util.Progressable progress) throws IOException - Specified by:
append
in classorg.apache.hadoop.fs.FileSystem
- Throws:
IOException
-
rename
public boolean rename(org.apache.hadoop.fs.Path src, org.apache.hadoop.fs.Path dst) throws IOException - Specified by:
rename
in classorg.apache.hadoop.fs.FileSystem
- Throws:
IOException
-
delete
- Specified by:
delete
in classorg.apache.hadoop.fs.FileSystem
- Throws:
IOException
-
listStatus
public org.apache.hadoop.fs.FileStatus[] listStatus(org.apache.hadoop.fs.Path f) throws FileNotFoundException, IOException List the statuses of the files/directories in the given path if the path is a directory.Does not guarantee to return the List of files/directories status in a sorted order.
Will not return null. Expect IOException upon access error.
- Specified by:
listStatus
in classorg.apache.hadoop.fs.FileSystem
- Parameters:
f
- given path- Returns:
- the statuses of the files/directories in the given patch
- Throws:
FileNotFoundException
- when the path does not existIOException
- see specific implementation
-
setWorkingDirectory
public void setWorkingDirectory(org.apache.hadoop.fs.Path new_dir) Set the current working directory for the given FileSystem. All relative paths will be resolved relative to it.- Specified by:
setWorkingDirectory
in classorg.apache.hadoop.fs.FileSystem
- Parameters:
new_dir
- Path of new working directory
-
getWorkingDirectory
public org.apache.hadoop.fs.Path getWorkingDirectory()- Specified by:
getWorkingDirectory
in classorg.apache.hadoop.fs.FileSystem
-
mkdirs
public boolean mkdirs(org.apache.hadoop.fs.Path f, org.apache.hadoop.fs.permission.FsPermission permission) throws IOException - Specified by:
mkdirs
in classorg.apache.hadoop.fs.FileSystem
- Throws:
IOException
-
getFileStatus
public org.apache.hadoop.fs.FileStatus getFileStatus(org.apache.hadoop.fs.Path f) throws IOException Return a file status object that represents the path.- Specified by:
getFileStatus
in classorg.apache.hadoop.fs.FileSystem
- Parameters:
f
- The path we want information from- Returns:
- a FileStatus object
- Throws:
FileNotFoundException
- when the path does not existIOException
- see specific implementation
-