@InterfaceAudience.Public @InterfaceStability.Stable public class NativeAzureFileSystem extends FileSystem
FileSystem for reading and writing files stored on Windows Azure. This implementation is
blob-based and stores files on Azure in their native form so they can be read
by other Azure tools.| Modifier and Type | Class and Description |
|---|---|
static class |
NativeAzureFileSystem.FolderRenamePending
A description of a folder rename operation, including the source and
destination keys, and descriptions of the files in the source folder.
|
static class |
NativeAzureFileSystem.Secure
A
FileSystem for reading and writing files stored on Windows Azure. |
FileSystem.Statistics| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.logging.Log |
LOG |
static String |
SKIP_AZURE_METRICS_PROPERTY_NAME |
DEFAULT_FS, FS_DEFAULT_NAME_KEY, SHUTDOWN_HOOK_PRIORITY, statistics| Constructor and Description |
|---|
NativeAzureFileSystem() |
NativeAzureFileSystem(org.apache.hadoop.fs.azure.NativeFileSystemStore store) |
| Modifier and Type | Method and Description |
|---|---|
SelfRenewingLease |
acquireLease(Path path)
Get a self-renewing lease on the specified file.
|
FSDataOutputStream |
append(Path f,
int bufferSize,
Progressable progress)
This optional operation is not yet supported.
|
protected void |
checkPath(Path path) |
void |
close() |
FSDataOutputStream |
create(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
FSDataOutputStream |
createNonRecursive(Path f,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
FSDataOutputStream |
createNonRecursive(Path f,
FsPermission permission,
boolean overwrite,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
FSDataOutputStream |
createNonRecursive(Path f,
FsPermission permission,
EnumSet<CreateFlag> flags,
int bufferSize,
short replication,
long blockSize,
Progressable progress) |
boolean |
delete(Path path)
Deprecated.
|
boolean |
delete(Path f,
boolean recursive) |
boolean |
delete(Path f,
boolean recursive,
boolean skipParentFolderLastModifidedTimeUpdate)
Delete the specified file or folder.
|
void |
deleteFilesWithDanglingTempData(Path root)
Looks under the given root path for any blob that are left "dangling",
meaning that they are place-holder blobs that we created while we upload
the data to a temporary blob, but for some reason we crashed in the middle
of the upload and left them there.
|
protected void |
finalize() |
BlockLocation[] |
getFileBlockLocations(FileStatus file,
long start,
long len)
Return an array containing hostnames, offset and size of
portions of the given file.
|
FileStatus |
getFileStatus(Path f) |
AzureFileSystemInstrumentation |
getInstrumentation()
Gets the metrics source for this file system.
|
String |
getScheme() |
AzureNativeFileSystemStore |
getStore()
For unit test purposes, retrieves the AzureNativeFileSystemStore store
backing this file system.
|
URI |
getUri() |
Path |
getWorkingDirectory() |
void |
initialize(URI uri,
Configuration conf) |
FileStatus[] |
listStatus(Path f)
Retrieve the status of a given path if it is a file, or of all the
contained files if it is a directory.
|
Path |
makeAbsolute(Path path)
Get the absolute version of the path (fully qualified).
|
boolean |
mkdirs(Path f,
FsPermission permission) |
boolean |
mkdirs(Path f,
FsPermission permission,
boolean noUmask) |
static String |
newMetricsSourceName()
Creates a new metrics source name that's unique within this process.
|
FSDataInputStream |
open(Path f,
int bufferSize) |
String |
pathToKey(Path path)
Convert the path to a key.
|
void |
recoverFilesWithDanglingTempData(Path root,
Path destination)
Looks under the given root path for any blob that are left "dangling",
meaning that they are place-holder blobs that we created while we upload
the data to a temporary blob, but for some reason we crashed in the middle
of the upload and left them there.
|
boolean |
rename(Path src,
Path dst) |
void |
setOwner(Path p,
String username,
String groupname) |
void |
setPermission(Path p,
FsPermission permission) |
void |
setWorkingDirectory(Path newDir)
Set the working directory to the given directory.
|
access, addDelegationTokens, append, append, areSymlinksEnabled, cancelDeleteOnExit, canonicalizeUri, clearStatistics, closeAll, closeAllForUGI, completeLocalOutput, concat, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyFromLocalFile, copyToLocalFile, copyToLocalFile, copyToLocalFile, create, create, create, create, create, create, create, create, create, create, create, create, createNewFile, createSnapshot, createSnapshot, createSymlink, deleteOnExit, deleteSnapshot, enableSymlinks, exists, fixRelativePart, get, get, get, getAclStatus, getAllStatistics, getBlockSize, getCanonicalServiceName, getCanonicalUri, getChildFileSystems, getContentSummary, getDefaultBlockSize, getDefaultBlockSize, getDefaultPort, getDefaultReplication, getDefaultReplication, getDefaultUri, getDelegationToken, getFileBlockLocations, getFileChecksum, getFileChecksum, getFileLinkStatus, getFileSystemClass, getFSofPath, getHomeDirectory, getInitialWorkingDirectory, getLength, getLinkTarget, getLocal, getName, getNamed, getReplication, getServerDefaults, getServerDefaults, getStatistics, getStatistics, getStatus, getStatus, getUsed, getXAttr, getXAttrs, getXAttrs, globStatus, globStatus, isDirectory, isFile, listCorruptFileBlocks, listFiles, listLocatedStatus, listLocatedStatus, listStatus, listStatus, listStatus, listStatusIterator, listXAttrs, makeQualified, mkdirs, mkdirs, modifyAclEntries, moveFromLocalFile, moveFromLocalFile, moveToLocalFile, newInstance, newInstance, newInstance, newInstanceLocal, open, primitiveCreate, primitiveMkdir, primitiveMkdir, printStatistics, processDeleteOnExit, removeAcl, removeAclEntries, removeDefaultAcl, removeXAttr, rename, renameSnapshot, resolveLink, resolvePath, setAcl, setDefaultUri, setDefaultUri, setReplication, setTimes, setVerifyChecksum, setWriteChecksum, setXAttr, setXAttr, startLocalOutput, supportsSymlinks, truncategetConf, setConfpublic static final org.apache.commons.logging.Log LOG
public static final String SKIP_AZURE_METRICS_PROPERTY_NAME
public NativeAzureFileSystem()
public NativeAzureFileSystem(org.apache.hadoop.fs.azure.NativeFileSystemStore store)
public String getScheme()
getScheme in class FileSystempublic static String newMetricsSourceName()
protected void checkPath(Path path)
checkPath in class FileSystempublic void initialize(URI uri, Configuration conf) throws IOException, IllegalArgumentException
initialize in class FileSystemIOExceptionIllegalArgumentExceptionpublic String pathToKey(Path path)
public Path makeAbsolute(Path path)
path - public AzureNativeFileSystemStore getStore()
public AzureFileSystemInstrumentation getInstrumentation()
public FSDataOutputStream append(Path f, int bufferSize, Progressable progress) throws IOException
append in class FileSystemIOExceptionpublic FSDataOutputStream create(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
create in class FileSystemIOExceptionpublic SelfRenewingLease acquireLease(Path path) throws AzureException
AzureExceptionpublic FSDataOutputStream createNonRecursive(Path f, FsPermission permission, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
createNonRecursive in class FileSystemIOExceptionpublic FSDataOutputStream createNonRecursive(Path f, FsPermission permission, EnumSet<CreateFlag> flags, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
createNonRecursive in class FileSystemIOExceptionpublic FSDataOutputStream createNonRecursive(Path f, boolean overwrite, int bufferSize, short replication, long blockSize, Progressable progress) throws IOException
createNonRecursive in class FileSystemIOException@Deprecated public boolean delete(Path path) throws IOException
delete in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recursive) throws IOException
delete in class FileSystemIOExceptionpublic boolean delete(Path f, boolean recursive, boolean skipParentFolderLastModifidedTimeUpdate) throws IOException
f - recursive - skipParentFolderLastModifidedTimeUpdate - If true, don't update the folder last
modified time.IOExceptionpublic FileStatus getFileStatus(Path f) throws IOException
getFileStatus in class FileSystemIOExceptionpublic URI getUri()
getUri in class FileSystempublic FileStatus[] listStatus(Path f) throws IOException
listStatus in class FileSystemIOExceptionpublic boolean mkdirs(Path f, FsPermission permission) throws IOException
mkdirs in class FileSystemIOExceptionpublic boolean mkdirs(Path f, FsPermission permission, boolean noUmask) throws IOException
IOExceptionpublic FSDataInputStream open(Path f, int bufferSize) throws IOException
open in class FileSystemIOExceptionpublic boolean rename(Path src, Path dst) throws IOException
rename in class FileSystemIOExceptionpublic BlockLocation[] getFileBlockLocations(FileStatus file, long start, long len) throws IOException
getFileBlockLocations in class FileSystemIOExceptionpublic void setWorkingDirectory(Path newDir)
setWorkingDirectory in class FileSystempublic Path getWorkingDirectory()
getWorkingDirectory in class FileSystempublic void setPermission(Path p, FsPermission permission) throws IOException
setPermission in class FileSystemIOExceptionpublic void setOwner(Path p, String username, String groupname) throws IOException
setOwner in class FileSystemIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FileSystemIOExceptionpublic void recoverFilesWithDanglingTempData(Path root, Path destination) throws IOException
root - The root path to consider.destination - The destination path to move any recovered files to.IOExceptionpublic void deleteFilesWithDanglingTempData(Path root) throws IOException
root - The root path to consider.IOExceptionCopyright © 2018 CERN. All Rights Reserved.