public class AbfsClient extends Object implements Closeable
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
LOG |
| Constructor and Description |
|---|
AbfsClient(URL baseUrl,
SharedKeyCredentials sharedKeyCredentials,
AbfsConfiguration abfsConfiguration,
AccessTokenProvider tokenProvider,
AbfsClientContext abfsClientContext) |
AbfsClient(URL baseUrl,
SharedKeyCredentials sharedKeyCredentials,
AbfsConfiguration abfsConfiguration,
SASTokenProvider sasTokenProvider,
AbfsClientContext abfsClientContext) |
| Modifier and Type | Method and Description |
|---|---|
AbfsRestOperation |
acquireLease(String path,
int duration,
TracingContext tracingContext) |
<V> void |
addCallback(org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture<V> future,
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.FutureCallback<V> callback) |
AbfsRestOperation |
append(String path,
byte[] buffer,
AppendRequestParameters reqParams,
String cachedSasToken,
TracingContext tracingContext) |
boolean |
appendSuccessCheckOp(AbfsRestOperation op,
String path,
long length,
TracingContext tracingContext) |
AbfsRestOperation |
breakLease(String path,
TracingContext tracingContext) |
AbfsRestOperation |
checkAccess(String path,
String rwx,
TracingContext tracingContext)
Talks to the server to check whether the permission specified in
the rwx parameter is present for the path specified in the path parameter.
|
void |
close() |
AbfsRestOperation |
createFilesystem(TracingContext tracingContext) |
AbfsRestOperation |
createPath(String path,
boolean isFile,
boolean overwrite,
String permission,
String umask,
boolean isAppendBlob,
String eTag,
TracingContext tracingContext) |
protected URL |
createRequestUrl(String path,
String query) |
AbfsRestOperation |
deleteFilesystem(TracingContext tracingContext) |
AbfsRestOperation |
deleteIdempotencyCheckOp(AbfsRestOperation op)
Check if the delete request failure is post a retry and if delete failure
qualifies to be a success response assuming idempotency.
|
AbfsRestOperation |
deletePath(String path,
boolean recursive,
String continuation,
TracingContext tracingContext) |
AbfsRestOperation |
flush(String path,
long position,
boolean retainUncommittedData,
boolean isClose,
String cachedSasToken,
String leaseId,
TracingContext tracingContext) |
protected AbfsCounters |
getAbfsCounters()
Getter for abfsCounters from AbfsClient.
|
protected AbfsPerfTracker |
getAbfsPerfTracker() |
String |
getAccessToken() |
AbfsRestOperation |
getAclStatus(String path,
boolean useUPN,
TracingContext tracingContext) |
AbfsRestOperation |
getAclStatus(String path,
TracingContext tracingContext) |
AuthType |
getAuthType() |
static String |
getDirectoryQueryParameter(String path)
Get the directory query parameter used by the List Paths REST API and used
as the path in the continuation token.
|
String |
getFileSystem() |
AbfsRestOperation |
getFilesystemProperties(TracingContext tracingContext) |
int |
getNumLeaseThreads() |
AbfsRestOperation |
getPathStatus(String path,
boolean includeProperties,
TracingContext tracingContext) |
SASTokenProvider |
getSasTokenProvider() |
AbfsRestOperation |
listPath(String relativePath,
boolean recursive,
int listMaxResults,
String continuation,
TracingContext tracingContext) |
AbfsRestOperation |
read(String path,
long position,
byte[] buffer,
int bufferOffset,
int bufferLength,
String eTag,
String cachedSasToken,
TracingContext tracingContext) |
AbfsRestOperation |
releaseLease(String path,
String leaseId,
TracingContext tracingContext) |
AbfsRestOperation |
renamePath(String source,
String destination,
String continuation,
TracingContext tracingContext) |
AbfsRestOperation |
renewLease(String path,
String leaseId,
TracingContext tracingContext) |
<V> org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableScheduledFuture<V> |
schedule(Callable<V> callable,
long delay,
TimeUnit timeUnit) |
AbfsRestOperation |
setAcl(String path,
String aclSpecString,
String eTag,
TracingContext tracingContext) |
AbfsRestOperation |
setAcl(String path,
String aclSpecString,
TracingContext tracingContext) |
AbfsRestOperation |
setFilesystemProperties(String properties,
TracingContext tracingContext) |
AbfsRestOperation |
setOwner(String path,
String owner,
String group,
TracingContext tracingContext) |
AbfsRestOperation |
setPathProperties(String path,
String properties,
TracingContext tracingContext) |
AbfsRestOperation |
setPermission(String path,
String permission,
TracingContext tracingContext) |
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture<?> |
submit(Runnable runnable) |
static String |
urlEncode(String value) |
public AbfsClient(URL baseUrl, SharedKeyCredentials sharedKeyCredentials, AbfsConfiguration abfsConfiguration, AccessTokenProvider tokenProvider, AbfsClientContext abfsClientContext) throws IOException
IOExceptionpublic AbfsClient(URL baseUrl, SharedKeyCredentials sharedKeyCredentials, AbfsConfiguration abfsConfiguration, SASTokenProvider sasTokenProvider, AbfsClientContext abfsClientContext) throws IOException
IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionpublic String getFileSystem()
protected AbfsPerfTracker getAbfsPerfTracker()
public AbfsRestOperation createFilesystem(TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation setFilesystemProperties(String properties, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation listPath(String relativePath, boolean recursive, int listMaxResults, String continuation, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation getFilesystemProperties(TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation deleteFilesystem(TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation createPath(String path, boolean isFile, boolean overwrite, String permission, String umask, boolean isAppendBlob, String eTag, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation acquireLease(String path, int duration, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation renewLease(String path, String leaseId, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation releaseLease(String path, String leaseId, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation breakLease(String path, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation renamePath(String source, String destination, String continuation, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation append(String path, byte[] buffer, AppendRequestParameters reqParams, String cachedSasToken, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic boolean appendSuccessCheckOp(AbfsRestOperation op, String path, long length, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation flush(String path, long position, boolean retainUncommittedData, boolean isClose, String cachedSasToken, String leaseId, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation setPathProperties(String path, String properties, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation getPathStatus(String path, boolean includeProperties, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation read(String path, long position, byte[] buffer, int bufferOffset, int bufferLength, String eTag, String cachedSasToken, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation deletePath(String path, boolean recursive, String continuation, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation deleteIdempotencyCheckOp(AbfsRestOperation op)
op - Delete request REST operation response with non-null HTTP responsepublic AbfsRestOperation setOwner(String path, String owner, String group, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation setPermission(String path, String permission, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation setAcl(String path, String aclSpecString, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation setAcl(String path, String aclSpecString, String eTag, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation getAclStatus(String path, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation getAclStatus(String path, boolean useUPN, TracingContext tracingContext) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic AbfsRestOperation checkAccess(String path, String rwx, TracingContext tracingContext) throws AzureBlobFileSystemException
path - Path for which access check needs to be performedrwx - The permission to be checked on the pathtracingContext - Tracks identifiers for request headerAbfsRestOperation object for the operationAzureBlobFileSystemException - in case of bad requestspublic static String getDirectoryQueryParameter(String path)
path - the path to be listed.protected URL createRequestUrl(String path, String query) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic static String urlEncode(String value) throws AzureBlobFileSystemException
AzureBlobFileSystemExceptionpublic String getAccessToken() throws IOException
IOExceptionpublic AuthType getAuthType()
public SASTokenProvider getSasTokenProvider()
protected AbfsCounters getAbfsCounters()
public int getNumLeaseThreads()
public <V> org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableScheduledFuture<V> schedule(Callable<V> callable, long delay, TimeUnit timeUnit)
public org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture<?> submit(Runnable runnable)
public <V> void addCallback(org.apache.hadoop.thirdparty.com.google.common.util.concurrent.ListenableFuture<V> future,
org.apache.hadoop.thirdparty.com.google.common.util.concurrent.FutureCallback<V> callback)
Copyright © 2008–2022 Apache Software Foundation. All rights reserved.