Class NamenodeWebHdfsMethods
java.lang.Object
org.apache.hadoop.hdfs.server.namenode.web.resources.NamenodeWebHdfsMethods
Web-hdfs NameNode implementation.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static org.apache.hadoop.hdfs.protocol.DatanodeInfobestNode(org.apache.hadoop.hdfs.protocol.DatanodeInfo[] nodes, Set<org.apache.hadoop.net.Node> excludes) Choose the datanode to redirect the request.voidcancelDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> token) org.apache.hadoop.security.CredentialscreateCredentials(org.apache.hadoop.security.UserGroupInformation ugi, String renewer) javax.ws.rs.core.Responsedelete(org.apache.hadoop.security.UserGroupInformation ugi, javax.ws.rs.core.UriInfo uriInfo, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.DeleteOpParam op, org.apache.hadoop.hdfs.web.resources.RecursiveParam recursive, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName) Handle HTTP DELETE request.protected javax.ws.rs.core.Responsedelete(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.DeleteOpParam op, org.apache.hadoop.hdfs.web.resources.RecursiveParam recursive, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName) javax.ws.rs.core.ResponsedeleteRoot(org.apache.hadoop.security.UserGroupInformation ugi, javax.ws.rs.core.UriInfo uriInfo, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.DeleteOpParam op, org.apache.hadoop.hdfs.web.resources.RecursiveParam recursive, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName) Handle HTTP DELETE request for the root.org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier>generateDelegationToken(org.apache.hadoop.security.UserGroupInformation ugi, String renewer) javax.ws.rs.core.Responseget(org.apache.hadoop.security.UserGroupInformation ugi, javax.ws.rs.core.UriInfo uriInfo, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.GetOpParam op, org.apache.hadoop.hdfs.web.resources.OffsetParam offset, org.apache.hadoop.hdfs.web.resources.LengthParam length, org.apache.hadoop.hdfs.web.resources.RenewerParam renewer, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, List<org.apache.hadoop.hdfs.web.resources.XAttrNameParam> xattrNames, org.apache.hadoop.hdfs.web.resources.XAttrEncodingParam xattrEncoding, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.FsActionParam fsAction, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.SnapshotDiffStartPathParam snapshotDiffStartPath, org.apache.hadoop.hdfs.web.resources.SnapshotDiffIndexParam snapshotDiffIndex, TokenKindParam tokenKind, TokenServiceParam tokenService, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, org.apache.hadoop.hdfs.web.resources.StartAfterParam startAfter, org.apache.hadoop.hdfs.web.resources.AllUsersParam allUsers) Handle HTTP GET request.protected javax.ws.rs.core.Responseget(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.GetOpParam op, org.apache.hadoop.hdfs.web.resources.OffsetParam offset, org.apache.hadoop.hdfs.web.resources.LengthParam length, org.apache.hadoop.hdfs.web.resources.RenewerParam renewer, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, List<org.apache.hadoop.hdfs.web.resources.XAttrNameParam> xattrNames, org.apache.hadoop.hdfs.web.resources.XAttrEncodingParam xattrEncoding, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.FsActionParam fsAction, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.SnapshotDiffStartPathParam snapshotDiffStartPath, org.apache.hadoop.hdfs.web.resources.SnapshotDiffIndexParam snapshotDiffIndex, TokenKindParam tokenKind, TokenServiceParam tokenService, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirectParam, org.apache.hadoop.hdfs.web.resources.StartAfterParam startAfter, org.apache.hadoop.hdfs.web.resources.AllUsersParam allUsers) protected javax.servlet.ServletContextReturns the parent of a path in the same way as Path#getParent.protected Stringprotected intjavax.ws.rs.core.ResponsegetRoot(org.apache.hadoop.security.UserGroupInformation ugi, javax.ws.rs.core.UriInfo uriInfo, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.GetOpParam op, org.apache.hadoop.hdfs.web.resources.OffsetParam offset, org.apache.hadoop.hdfs.web.resources.LengthParam length, org.apache.hadoop.hdfs.web.resources.RenewerParam renewer, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, List<org.apache.hadoop.hdfs.web.resources.XAttrNameParam> xattrNames, org.apache.hadoop.hdfs.web.resources.XAttrEncodingParam xattrEncoding, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.FsActionParam fsAction, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.SnapshotDiffStartPathParam snapshotDiffStartPath, org.apache.hadoop.hdfs.web.resources.SnapshotDiffIndexParam snapshotDiffIndex, TokenKindParam tokenKind, TokenServiceParam tokenService, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, org.apache.hadoop.hdfs.web.resources.StartAfterParam startAfter, org.apache.hadoop.hdfs.web.resources.AllUsersParam allUsers) Handle HTTP GET request for the root.protected org.apache.hadoop.hdfs.protocol.ClientProtocolprotected Stringprotected voidinit(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, UriFsPathParam path, org.apache.hadoop.hdfs.web.resources.HttpOpParam<?> op, org.apache.hadoop.hdfs.web.resources.Param<?, ?>... parameters) protected javax.ws.rs.core.Responsepost(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.PostOpParam op, org.apache.hadoop.hdfs.web.resources.ConcatSourcesParam concatSrcs, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.NewLengthParam newLength, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirectParam) javax.ws.rs.core.Responsepost(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, UriFsPathParam path, org.apache.hadoop.hdfs.web.resources.PostOpParam op, org.apache.hadoop.hdfs.web.resources.ConcatSourcesParam concatSrcs, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.NewLengthParam newLength, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect) Handle HTTP POST request.javax.ws.rs.core.ResponsepostRoot(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.PostOpParam op, org.apache.hadoop.hdfs.web.resources.ConcatSourcesParam concatSrcs, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.NewLengthParam newLength, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect) Handle HTTP POST request for the root.javax.ws.rs.core.Responseput(org.apache.hadoop.security.UserGroupInformation ugi, javax.ws.rs.core.UriInfo uriInfo, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.PutOpParam op, org.apache.hadoop.hdfs.web.resources.DestinationParam destination, org.apache.hadoop.hdfs.web.resources.OwnerParam owner, org.apache.hadoop.hdfs.web.resources.GroupParam group, org.apache.hadoop.hdfs.web.resources.PermissionParam permission, org.apache.hadoop.hdfs.web.resources.UnmaskedPermissionParam unmaskedPermission, org.apache.hadoop.hdfs.web.resources.OverwriteParam overwrite, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ReplicationParam replication, org.apache.hadoop.hdfs.web.resources.BlockSizeParam blockSize, org.apache.hadoop.hdfs.web.resources.ModificationTimeParam modificationTime, org.apache.hadoop.hdfs.web.resources.AccessTimeParam accessTime, org.apache.hadoop.hdfs.web.resources.RenameOptionSetParam renameOptions, org.apache.hadoop.hdfs.web.resources.CreateParentParam createParent, org.apache.hadoop.hdfs.web.resources.TokenArgumentParam delegationTokenArgument, org.apache.hadoop.hdfs.web.resources.AclPermissionParam aclPermission, org.apache.hadoop.hdfs.web.resources.XAttrNameParam xattrName, org.apache.hadoop.hdfs.web.resources.XAttrValueParam xattrValue, org.apache.hadoop.hdfs.web.resources.XAttrSetFlagParam xattrSetFlag, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.CreateFlagParam createFlagParam, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, org.apache.hadoop.hdfs.web.resources.StoragePolicyParam policyName, org.apache.hadoop.hdfs.web.resources.ECPolicyParam ecpolicy, org.apache.hadoop.hdfs.web.resources.NameSpaceQuotaParam namespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageSpaceQuotaParam storagespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageTypeParam storageType) Handle HTTP PUT request.protected javax.ws.rs.core.Responseput(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.PutOpParam op, org.apache.hadoop.hdfs.web.resources.DestinationParam destination, org.apache.hadoop.hdfs.web.resources.OwnerParam owner, org.apache.hadoop.hdfs.web.resources.GroupParam group, org.apache.hadoop.hdfs.web.resources.PermissionParam permission, org.apache.hadoop.hdfs.web.resources.UnmaskedPermissionParam unmaskedPermission, org.apache.hadoop.hdfs.web.resources.OverwriteParam overwrite, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ReplicationParam replication, org.apache.hadoop.hdfs.web.resources.BlockSizeParam blockSize, org.apache.hadoop.hdfs.web.resources.ModificationTimeParam modificationTime, org.apache.hadoop.hdfs.web.resources.AccessTimeParam accessTime, org.apache.hadoop.hdfs.web.resources.RenameOptionSetParam renameOptions, org.apache.hadoop.hdfs.web.resources.CreateParentParam createParent, org.apache.hadoop.hdfs.web.resources.TokenArgumentParam delegationTokenArgument, org.apache.hadoop.hdfs.web.resources.AclPermissionParam aclPermission, org.apache.hadoop.hdfs.web.resources.XAttrNameParam xattrName, org.apache.hadoop.hdfs.web.resources.XAttrValueParam xattrValue, org.apache.hadoop.hdfs.web.resources.XAttrSetFlagParam xattrSetFlag, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam exclDatanodes, org.apache.hadoop.hdfs.web.resources.CreateFlagParam createFlagParam, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirectParam, org.apache.hadoop.hdfs.web.resources.StoragePolicyParam policyName, org.apache.hadoop.hdfs.web.resources.ECPolicyParam ecpolicy, org.apache.hadoop.hdfs.web.resources.NameSpaceQuotaParam namespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageSpaceQuotaParam storagespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageTypeParam storageType) javax.ws.rs.core.ResponseputRoot(org.apache.hadoop.security.UserGroupInformation ugi, javax.ws.rs.core.UriInfo uriInfo, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, org.apache.hadoop.hdfs.web.resources.PutOpParam op, org.apache.hadoop.hdfs.web.resources.DestinationParam destination, org.apache.hadoop.hdfs.web.resources.OwnerParam owner, org.apache.hadoop.hdfs.web.resources.GroupParam group, org.apache.hadoop.hdfs.web.resources.PermissionParam permission, org.apache.hadoop.hdfs.web.resources.UnmaskedPermissionParam unmaskedPermission, org.apache.hadoop.hdfs.web.resources.OverwriteParam overwrite, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ReplicationParam replication, org.apache.hadoop.hdfs.web.resources.BlockSizeParam blockSize, org.apache.hadoop.hdfs.web.resources.ModificationTimeParam modificationTime, org.apache.hadoop.hdfs.web.resources.AccessTimeParam accessTime, org.apache.hadoop.hdfs.web.resources.RenameOptionSetParam renameOptions, org.apache.hadoop.hdfs.web.resources.CreateParentParam createParent, org.apache.hadoop.hdfs.web.resources.TokenArgumentParam delegationTokenArgument, org.apache.hadoop.hdfs.web.resources.AclPermissionParam aclPermission, org.apache.hadoop.hdfs.web.resources.XAttrNameParam xattrName, org.apache.hadoop.hdfs.web.resources.XAttrValueParam xattrValue, org.apache.hadoop.hdfs.web.resources.XAttrSetFlagParam xattrSetFlag, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.CreateFlagParam createFlagParam, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, org.apache.hadoop.hdfs.web.resources.StoragePolicyParam policyName, org.apache.hadoop.hdfs.web.resources.ECPolicyParam ecpolicy, org.apache.hadoop.hdfs.web.resources.NameSpaceQuotaParam namespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageSpaceQuotaParam storagespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageTypeParam storageType) Handle HTTP PUT request for the root.protected voidqueueExternalCall(org.apache.hadoop.ipc.ExternalCall call) longrenewDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> token) protected voidvalidateOpParams(org.apache.hadoop.hdfs.web.resources.HttpOpParam<?> op, org.apache.hadoop.hdfs.web.resources.Param... params) Validate all required params.
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG
-
-
Constructor Details
-
NamenodeWebHdfsMethods
public NamenodeWebHdfsMethods(@Context javax.servlet.http.HttpServletRequest request)
-
-
Method Details
-
init
protected void init(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, UriFsPathParam path, org.apache.hadoop.hdfs.web.resources.HttpOpParam<?> op, org.apache.hadoop.hdfs.web.resources.Param<?, ?>... parameters) -
getRpcClientProtocol
- Throws:
IOException
-
getScheme
-
getContext
protected javax.servlet.ServletContext getContext() -
getRemoteAddr
-
getRemotePortFromJSPHelper
protected int getRemotePortFromJSPHelper() -
queueExternalCall
protected void queueExternalCall(org.apache.hadoop.ipc.ExternalCall call) throws IOException, InterruptedException - Throws:
IOExceptionInterruptedException
-
bestNode
protected static org.apache.hadoop.hdfs.protocol.DatanodeInfo bestNode(org.apache.hadoop.hdfs.protocol.DatanodeInfo[] nodes, Set<org.apache.hadoop.net.Node> excludes) throws IOException Choose the datanode to redirect the request. Note that the nodes have been sorted based on availability and network distances, thus it is sufficient to return the first element of the node here.- Throws:
IOException
-
renewDelegationToken
public long renewDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> token) throws IOException - Throws:
IOException
-
cancelDelegationToken
public void cancelDelegationToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier> token) throws IOException - Throws:
IOException
-
createCredentials
public org.apache.hadoop.security.Credentials createCredentials(org.apache.hadoop.security.UserGroupInformation ugi, String renewer) throws IOException - Throws:
IOException
-
generateDelegationToken
public org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> generateDelegationToken(org.apache.hadoop.security.UserGroupInformation ugi, String renewer) throws IOException - Throws:
IOException
-
putRoot
@PUT @Consumes("*/*") @Produces({"application/octet-stream; charset=utf-8","application/json; charset=utf-8"}) public javax.ws.rs.core.Response putRoot(@Context org.apache.hadoop.security.UserGroupInformation ugi, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.PutOpParam op, @QueryParam("destination") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DestinationParam destination, @QueryParam("owner") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.OwnerParam owner, @QueryParam("group") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.GroupParam group, @QueryParam("permission") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.PermissionParam permission, @QueryParam("unmaskedpermission") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.UnmaskedPermissionParam unmaskedPermission, @QueryParam("overwrite") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.OverwriteParam overwrite, @QueryParam("buffersize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, @QueryParam("replication") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.ReplicationParam replication, @QueryParam("blocksize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BlockSizeParam blockSize, @QueryParam("modificationtime") @DefaultValue("-1") org.apache.hadoop.hdfs.web.resources.ModificationTimeParam modificationTime, @QueryParam("accesstime") @DefaultValue("-1") org.apache.hadoop.hdfs.web.resources.AccessTimeParam accessTime, @QueryParam("renameoptions") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.RenameOptionSetParam renameOptions, @QueryParam("createparent") @DefaultValue("true") org.apache.hadoop.hdfs.web.resources.CreateParentParam createParent, @QueryParam("token") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.TokenArgumentParam delegationTokenArgument, @QueryParam("aclspec") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.AclPermissionParam aclPermission, @QueryParam("xattr.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrNameParam xattrName, @QueryParam("xattr.value") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrValueParam xattrValue, @QueryParam("flag") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrSetFlagParam xattrSetFlag, @QueryParam("snapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, @QueryParam("oldsnapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, @QueryParam("excludedatanodes") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, @QueryParam("createflag") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.CreateFlagParam createFlagParam, @QueryParam("noredirect") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, @QueryParam("storagepolicy") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.StoragePolicyParam policyName, @QueryParam("ecpolicy") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ECPolicyParam ecpolicy, @QueryParam("namespacequota") @DefaultValue("9223372036854775807") org.apache.hadoop.hdfs.web.resources.NameSpaceQuotaParam namespaceQuota, @QueryParam("storagespacequota") @DefaultValue("9223372036854775807") org.apache.hadoop.hdfs.web.resources.StorageSpaceQuotaParam storagespaceQuota, @QueryParam("storagetype") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.StorageTypeParam storageType) throws IOException, InterruptedException Handle HTTP PUT request for the root.- Parameters:
ugi- User and group information for Hadoop.uriInfo- An injectable interface that provides access. to application and request URI information.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http POST operation parameter.destination- Destination path parameter.owner- Owner parameter.group- Group parameter.permission- Permission parameter, use a Short to represent a FsPermission.unmaskedPermission- Unmasked permission parameter, use a Short to represent a FsPermission.overwrite- Overwrite parameter.bufferSize- Buffer size parameter.replication- Replication parameter.blockSize- Block size parameter.modificationTime- Modification time parameter.accessTime- Access time parameter.renameOptions- Rename option set parameter.createFlagParam- CreateFlag enum.noredirect- Overwrite parameter.policyName- policy parameter.ecpolicy- policy parameter.namespaceQuota- The name space quota parameter for directory.storagespaceQuota- The storage space quota parameter for directory.storageType- storage type parameter.- Returns:
- Represents an HTTP response.
- Throws:
IOExceptionInterruptedException
-
validateOpParams
protected void validateOpParams(org.apache.hadoop.hdfs.web.resources.HttpOpParam<?> op, org.apache.hadoop.hdfs.web.resources.Param... params) Validate all required params. -
put
@PUT @Path("{path:.*}") @Consumes("*/*") @Produces({"application/octet-stream; charset=utf-8","application/json; charset=utf-8"}) public javax.ws.rs.core.Response put(@Context org.apache.hadoop.security.UserGroupInformation ugi, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.PutOpParam op, @QueryParam("destination") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DestinationParam destination, @QueryParam("owner") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.OwnerParam owner, @QueryParam("group") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.GroupParam group, @QueryParam("permission") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.PermissionParam permission, @QueryParam("unmaskedpermission") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.UnmaskedPermissionParam unmaskedPermission, @QueryParam("overwrite") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.OverwriteParam overwrite, @QueryParam("buffersize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, @QueryParam("replication") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.ReplicationParam replication, @QueryParam("blocksize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BlockSizeParam blockSize, @QueryParam("modificationtime") @DefaultValue("-1") org.apache.hadoop.hdfs.web.resources.ModificationTimeParam modificationTime, @QueryParam("accesstime") @DefaultValue("-1") org.apache.hadoop.hdfs.web.resources.AccessTimeParam accessTime, @QueryParam("renameoptions") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.RenameOptionSetParam renameOptions, @QueryParam("createparent") @DefaultValue("true") org.apache.hadoop.hdfs.web.resources.CreateParentParam createParent, @QueryParam("token") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.TokenArgumentParam delegationTokenArgument, @QueryParam("aclspec") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.AclPermissionParam aclPermission, @QueryParam("xattr.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrNameParam xattrName, @QueryParam("xattr.value") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrValueParam xattrValue, @QueryParam("flag") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrSetFlagParam xattrSetFlag, @QueryParam("snapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, @QueryParam("oldsnapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, @QueryParam("excludedatanodes") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, @QueryParam("createflag") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.CreateFlagParam createFlagParam, @QueryParam("noredirect") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, @QueryParam("storagepolicy") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.StoragePolicyParam policyName, @QueryParam("ecpolicy") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ECPolicyParam ecpolicy, @QueryParam("namespacequota") @DefaultValue("9223372036854775807") org.apache.hadoop.hdfs.web.resources.NameSpaceQuotaParam namespaceQuota, @QueryParam("storagespacequota") @DefaultValue("9223372036854775807") org.apache.hadoop.hdfs.web.resources.StorageSpaceQuotaParam storagespaceQuota, @QueryParam("storagetype") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.StorageTypeParam storageType) throws IOException, InterruptedException Handle HTTP PUT request.- Parameters:
ugi- User and group information for Hadoop.uriInfo- An injectable interface that provides access.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http POST operation parameter.destination- Destination path parameter.owner- Owner parameter.group- Group parameter.permission- Permission parameter, use a Short to represent a FsPermission.unmaskedPermission- Unmasked permission parameter, use a Short to represent a FsPermission.overwrite- Overwrite parameter.bufferSize- Buffer size parameter.replication- Replication parameter.blockSize- Block size parameter.modificationTime- Modification time parameter.accessTime- Access time parameter.renameOptions- Rename option set parameter.createParent- Create Parent parameter.delegationTokenArgument- Represents delegation token parameter as method arguments.aclPermission- AclPermission parameter.xattrName- XAttr Name parameter.xattrValue- XAttr Value parameter.xattrSetFlag- XAttr SetFlag parameter.snapshotName- The snapshot name parameter for createSnapshot and deleteSnapshot operation.oldSnapshotName- The old snapshot name parameter for renameSnapshot operation.excludeDatanodes- Exclude datanodes param.createFlagParam- CreateFlag enum.noredirect- Overwrite parameter.policyName- policy parameter.ecpolicy- ec policy parameter.namespaceQuota- The name space quota parameter for directory.storagespaceQuota- The storage space quota parameter for directory.storageType- storage type parameter.- Returns:
- Represents an HTTP response.
- Throws:
IOException- any IOE raised, or translated exception.InterruptedException- if the current thread was interrupted before or during the call.
-
put
protected javax.ws.rs.core.Response put(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.PutOpParam op, org.apache.hadoop.hdfs.web.resources.DestinationParam destination, org.apache.hadoop.hdfs.web.resources.OwnerParam owner, org.apache.hadoop.hdfs.web.resources.GroupParam group, org.apache.hadoop.hdfs.web.resources.PermissionParam permission, org.apache.hadoop.hdfs.web.resources.UnmaskedPermissionParam unmaskedPermission, org.apache.hadoop.hdfs.web.resources.OverwriteParam overwrite, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ReplicationParam replication, org.apache.hadoop.hdfs.web.resources.BlockSizeParam blockSize, org.apache.hadoop.hdfs.web.resources.ModificationTimeParam modificationTime, org.apache.hadoop.hdfs.web.resources.AccessTimeParam accessTime, org.apache.hadoop.hdfs.web.resources.RenameOptionSetParam renameOptions, org.apache.hadoop.hdfs.web.resources.CreateParentParam createParent, org.apache.hadoop.hdfs.web.resources.TokenArgumentParam delegationTokenArgument, org.apache.hadoop.hdfs.web.resources.AclPermissionParam aclPermission, org.apache.hadoop.hdfs.web.resources.XAttrNameParam xattrName, org.apache.hadoop.hdfs.web.resources.XAttrValueParam xattrValue, org.apache.hadoop.hdfs.web.resources.XAttrSetFlagParam xattrSetFlag, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam exclDatanodes, org.apache.hadoop.hdfs.web.resources.CreateFlagParam createFlagParam, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirectParam, org.apache.hadoop.hdfs.web.resources.StoragePolicyParam policyName, org.apache.hadoop.hdfs.web.resources.ECPolicyParam ecpolicy, org.apache.hadoop.hdfs.web.resources.NameSpaceQuotaParam namespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageSpaceQuotaParam storagespaceQuota, org.apache.hadoop.hdfs.web.resources.StorageTypeParam storageType) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
postRoot
@POST @Consumes("*/*") @Produces({"application/octet-stream; charset=utf-8","application/json; charset=utf-8"}) public javax.ws.rs.core.Response postRoot(@Context org.apache.hadoop.security.UserGroupInformation ugi, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.PostOpParam op, @QueryParam("sources") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ConcatSourcesParam concatSrcs, @QueryParam("buffersize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, @QueryParam("excludedatanodes") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, @QueryParam("newlength") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.NewLengthParam newLength, @QueryParam("noredirect") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect) throws IOException, InterruptedException Handle HTTP POST request for the root.- Parameters:
ugi- User and group information for Hadoop.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http POST operation parameter.concatSrcs- The concat source paths parameter.bufferSize- Buffer size parameter.excludeDatanodes- Exclude datanodes param.newLength- NewLength parameter.noredirect- Overwrite parameter.- Returns:
- Represents an HTTP response.
- Throws:
IOException- any IOE raised, or translated exception.InterruptedException- if the current thread was interrupted before or during the call.
-
post
@POST @Path("{path:.*}") @Consumes("*/*") @Produces({"application/octet-stream; charset=utf-8","application/json; charset=utf-8"}) public javax.ws.rs.core.Response post(@Context org.apache.hadoop.security.UserGroupInformation ugi, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @PathParam("path") UriFsPathParam path, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.PostOpParam op, @QueryParam("sources") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ConcatSourcesParam concatSrcs, @QueryParam("buffersize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, @QueryParam("excludedatanodes") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, @QueryParam("newlength") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.NewLengthParam newLength, @QueryParam("noredirect") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect) throws IOException, InterruptedException Handle HTTP POST request.- Parameters:
ugi- User and group information for Hadoop.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.path- The FileSystem path parameter.op- Http POST operation parameter.concatSrcs- The concat source paths parameter.bufferSize- Buffer size parameter.excludeDatanodes- Exclude datanodes param.newLength- NewLength parameter.noredirect- Overwrite parameter.- Returns:
- Represents an HTTP response.
- Throws:
IOException- any IOE raised, or translated exception.InterruptedException- if the current thread was interrupted before or during the call.
-
post
protected javax.ws.rs.core.Response post(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.PostOpParam op, org.apache.hadoop.hdfs.web.resources.ConcatSourcesParam concatSrcs, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.NewLengthParam newLength, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirectParam) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
getRoot
@GET @Produces({"application/octet-stream; charset=utf-8","application/json; charset=utf-8"}) public javax.ws.rs.core.Response getRoot(@Context org.apache.hadoop.security.UserGroupInformation ugi, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.GetOpParam op, @QueryParam("offset") @DefaultValue("0") org.apache.hadoop.hdfs.web.resources.OffsetParam offset, @QueryParam("length") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.LengthParam length, @QueryParam("renewer") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.RenewerParam renewer, @QueryParam("buffersize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, @QueryParam("xattr.name") @DefaultValue("") List<org.apache.hadoop.hdfs.web.resources.XAttrNameParam> xattrNames, @QueryParam("encoding") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrEncodingParam xattrEncoding, @QueryParam("excludedatanodes") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, @QueryParam("fsaction") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.FsActionParam fsAction, @QueryParam("snapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, @QueryParam("oldsnapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, @QueryParam("snapshotdiffstartpath") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotDiffStartPathParam snapshotDiffStartPath, @QueryParam("snapshotdiffindex") @DefaultValue("-1") org.apache.hadoop.hdfs.web.resources.SnapshotDiffIndexParam snapshotDiffIndex, @QueryParam("kind") @DefaultValue("null") TokenKindParam tokenKind, @QueryParam("service") @DefaultValue("null") TokenServiceParam tokenService, @QueryParam("noredirect") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, @QueryParam("startafter") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.StartAfterParam startAfter, @QueryParam("allusers") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.AllUsersParam allUsers) throws IOException, InterruptedException Handle HTTP GET request for the root.- Parameters:
ugi- User and group information for Hadoop.uriInfo- An injectable interface that provides access. to application and request URI information.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http GET operation parameter.offset- Offset parameter.length- Length parameter.renewer- Renewer parameter.bufferSize- Buffer size parameter.xattrNames- XAttr Name parameter.xattrEncoding- Xattr Encoding parameter.excludeDatanodes- Exclude datanodes param.fsAction- FsAction Parameter.snapshotName- The snapshot name parameter for createSnapshot and deleteSnapshot operation.oldSnapshotName- The old snapshot name parameter for renameSnapshot operation.snapshotDiffStartPath- The snapshot startPath parameter used by snapshotDiffReportListing.snapshotDiffIndex- resuming index of snapshotDiffReportListing operation.tokenKind- tokenKind Parameter.tokenService- TokenService Parameter.noredirect- Overwrite parameter.startAfter- Used during batched ListStatus operations.allUsers- AllUsers parameter.- Returns:
- Represents an HTTP response.
- Throws:
IOException- any IOE raised, or translated exception.InterruptedException- if the current thread was interrupted before or during the call.
-
get
@GET @Path("{path:.*}") @Produces({"application/octet-stream; charset=utf-8","application/json; charset=utf-8"}) public javax.ws.rs.core.Response get(@Context org.apache.hadoop.security.UserGroupInformation ugi, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.GetOpParam op, @QueryParam("offset") @DefaultValue("0") org.apache.hadoop.hdfs.web.resources.OffsetParam offset, @QueryParam("length") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.LengthParam length, @QueryParam("renewer") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.RenewerParam renewer, @QueryParam("buffersize") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, @QueryParam("xattr.name") @DefaultValue("") List<org.apache.hadoop.hdfs.web.resources.XAttrNameParam> xattrNames, @QueryParam("encoding") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.XAttrEncodingParam xattrEncoding, @QueryParam("excludedatanodes") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, @QueryParam("fsaction") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.FsActionParam fsAction, @QueryParam("snapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, @QueryParam("oldsnapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, @QueryParam("snapshotdiffstartpath") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotDiffStartPathParam snapshotDiffStartPath, @QueryParam("snapshotdiffindex") @DefaultValue("-1") org.apache.hadoop.hdfs.web.resources.SnapshotDiffIndexParam snapshotDiffIndex, @QueryParam("kind") @DefaultValue("null") TokenKindParam tokenKind, @QueryParam("service") @DefaultValue("null") TokenServiceParam tokenService, @QueryParam("noredirect") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirect, @QueryParam("startafter") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.StartAfterParam startAfter, @QueryParam("allusers") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.AllUsersParam allUsers) throws IOException, InterruptedException Handle HTTP GET request.- Parameters:
ugi- User and group information for Hadoop.uriInfo- An injectable interface that provides access.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http DELETE operation parameter.offset- Offset parameter.length- Length parameter.renewer- Renewer parameter.bufferSize- Buffer size parameter.xattrNames- XAttr Name parameter.xattrEncoding- Xattr Encoding parameter.excludeDatanodes- Exclude datanodes param.fsAction- FsAction Parameter.snapshotName- The snapshot name parameter for createSnapshot and deleteSnapshot operation.oldSnapshotName- The old snapshot name parameter for renameSnapshot operation.snapshotDiffStartPath- The snapshot startPath parameter used by snapshotDiffReportListing.snapshotDiffIndex- resuming index of snapshotDiffReportListing operation.tokenKind- tokenKind Parameter.tokenService- tokenService Parameter.noredirect- overwrite parameter.startAfter- used during batched ListStatus operations.allUsers- AllUsers parameter.- Returns:
- Represents an HTTP response.
- Throws:
IOException- any IOE raised, or translated exception.InterruptedException- if the current thread was interrupted before or during the call.
-
get
protected javax.ws.rs.core.Response get(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.GetOpParam op, org.apache.hadoop.hdfs.web.resources.OffsetParam offset, org.apache.hadoop.hdfs.web.resources.LengthParam length, org.apache.hadoop.hdfs.web.resources.RenewerParam renewer, org.apache.hadoop.hdfs.web.resources.BufferSizeParam bufferSize, List<org.apache.hadoop.hdfs.web.resources.XAttrNameParam> xattrNames, org.apache.hadoop.hdfs.web.resources.XAttrEncodingParam xattrEncoding, org.apache.hadoop.hdfs.web.resources.ExcludeDatanodesParam excludeDatanodes, org.apache.hadoop.hdfs.web.resources.FsActionParam fsAction, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName, org.apache.hadoop.hdfs.web.resources.OldSnapshotNameParam oldSnapshotName, org.apache.hadoop.hdfs.web.resources.SnapshotDiffStartPathParam snapshotDiffStartPath, org.apache.hadoop.hdfs.web.resources.SnapshotDiffIndexParam snapshotDiffIndex, TokenKindParam tokenKind, TokenServiceParam tokenService, org.apache.hadoop.hdfs.web.resources.NoRedirectParam noredirectParam, org.apache.hadoop.hdfs.web.resources.StartAfterParam startAfter, org.apache.hadoop.hdfs.web.resources.AllUsersParam allUsers) throws IOException, URISyntaxException - Throws:
IOExceptionURISyntaxException
-
getParent
Returns the parent of a path in the same way as Path#getParent.- Returns:
- the parent of a path or null if at root
-
deleteRoot
@DELETE @Produces("application/json; charset=utf-8") public javax.ws.rs.core.Response deleteRoot(@Context org.apache.hadoop.security.UserGroupInformation ugi, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.DeleteOpParam op, @QueryParam("recursive") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.RecursiveParam recursive, @QueryParam("snapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName) throws IOException, InterruptedException Handle HTTP DELETE request for the root.- Parameters:
ugi- User and group information for Hadoop.uriInfo- An injectable interface that provides access. to application and request URI information.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http DELETE operation parameter.recursive- Recursive parameter.snapshotName- The snapshot name parameter for createSnapshot. and deleteSnapshot operation.- Returns:
- Represents an HTTP response.
- Throws:
IOException- any IOE raised, or translated exception.InterruptedException- if the current thread was interrupted before or during the call.
-
delete
@DELETE @Path("{path:.*}") @Produces("application/json; charset=utf-8") public javax.ws.rs.core.Response delete(@Context org.apache.hadoop.security.UserGroupInformation ugi, @Context javax.ws.rs.core.UriInfo uriInfo, @QueryParam("delegation") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, @QueryParam("user.name") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.UserParam username, @QueryParam("doas") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, @QueryParam("op") @DefaultValue("null") org.apache.hadoop.hdfs.web.resources.DeleteOpParam op, @QueryParam("recursive") @DefaultValue("false") org.apache.hadoop.hdfs.web.resources.RecursiveParam recursive, @QueryParam("snapshotname") @DefaultValue("") org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName) throws IOException, InterruptedException Handle HTTP DELETE request.- Parameters:
ugi- User and group information for Hadoop.uriInfo- An injectable interface that provides access. to application and request URI information.delegation- Represents delegation token used for authentication.username- User parameter.doAsUser- DoAs parameter for proxy user.op- Http DELETE operation parameter.recursive- Recursive parameter.snapshotName- The snapshot name parameter for createSnapshot and deleteSnapshot operation.- Returns:
- Represents an HTTP response.
- Throws:
IOExceptionInterruptedException
-
delete
protected javax.ws.rs.core.Response delete(org.apache.hadoop.security.UserGroupInformation ugi, org.apache.hadoop.hdfs.web.resources.DelegationParam delegation, org.apache.hadoop.hdfs.web.resources.UserParam username, org.apache.hadoop.hdfs.web.resources.DoAsParam doAsUser, String fullpath, org.apache.hadoop.hdfs.web.resources.DeleteOpParam op, org.apache.hadoop.hdfs.web.resources.RecursiveParam recursive, org.apache.hadoop.hdfs.web.resources.SnapshotNameParam snapshotName) throws IOException - Throws:
IOException
-