|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.fs.http.server.HttpFSServer
public class HttpFSServer
Main class of HttpFSServer server.
TheHttpFSServer
class uses Jersey JAX-RS to binds HTTP requests to the
different operations.
Constructor Summary | |
---|---|
HttpFSServer()
|
Method Summary | |
---|---|
protected URI |
createUploadRedirectionURL(javax.ws.rs.core.UriInfo uriInfo,
Enum<?> uploadOperation)
Creates the URL for an upload operation (create or append). |
javax.ws.rs.core.Response |
delete(Principal user,
HttpFSParams.FsPathParam path,
HttpFSParams.DeleteOpParam op,
HttpFSParams.DeleteRecursiveParam recursive,
HttpFSParams.DoAsParam doAs)
Binding to handle all DELETE requests. |
javax.ws.rs.core.Response |
get(Principal user,
HttpFSParams.FsPathParam path,
HttpFSParams.GetOpParam op,
HttpFSParams.OffsetParam offset,
HttpFSParams.LenParam len,
HttpFSParams.FilterParam filter,
HttpFSParams.DoAsParam doAs,
HttpFSParams.OverwriteParam override,
HttpFSParams.BlockSizeParam blockSize,
HttpFSParams.PermissionParam permission,
HttpFSParams.ReplicationParam replication)
Binding to handle all GET requests, supported operations are |
javax.ws.rs.core.Response |
post(InputStream is,
Principal user,
javax.ws.rs.core.UriInfo uriInfo,
HttpFSParams.FsPathParam path,
HttpFSParams.PostOpParam op,
HttpFSParams.DataParam hasData,
HttpFSParams.DoAsParam doAs)
Binding to handle all OPST requests, supported operations are |
javax.ws.rs.core.Response |
put(InputStream is,
Principal user,
javax.ws.rs.core.UriInfo uriInfo,
HttpFSParams.FsPathParam path,
HttpFSParams.PutOpParam op,
HttpFSParams.ToPathParam toPath,
HttpFSParams.OwnerParam owner,
HttpFSParams.GroupParam group,
HttpFSParams.OverwriteParam override,
HttpFSParams.BlockSizeParam blockSize,
HttpFSParams.PermissionParam permission,
HttpFSParams.ReplicationParam replication,
HttpFSParams.ModifiedTimeParam modifiedTime,
HttpFSParams.AccessTimeParam accessTime,
HttpFSParams.DataParam hasData,
HttpFSParams.DoAsParam doAs)
Binding to handle all PUT requests, supported operations are |
javax.ws.rs.core.Response |
root(Principal user,
HttpFSParams.GetOpParam op,
HttpFSParams.FilterParam filter,
HttpFSParams.DoAsParam doAs)
Special binding for '/' as it is not handled by the wildcard binding. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public HttpFSServer()
Method Detail |
---|
public javax.ws.rs.core.Response root(@Context Principal user, HttpFSParams.GetOpParam op, HttpFSParams.FilterParam filter, HttpFSParams.DoAsParam doAs) throws IOException, FileSystemAccessException
user
- principal making the request.op
- GET operation, default value is @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.GetOpValues#OPEN}.filter
- Glob filter, default value is none. Used only if the
operation is @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.GetOpValues#LISTSTATUS}doAs
- user being impersonated, defualt value is none. It can be used
only if the current user is a HttpFSServer proxyuser.
IOException
- thrown if an IO error occurred. Thrown exceptions are
handled by HttpFSExceptionProvider
.
FileSystemAccessException
- thrown if a FileSystemAccess releated error occurred. Thrown
exceptions are handled by HttpFSExceptionProvider
.public javax.ws.rs.core.Response get(@Context Principal user, HttpFSParams.FsPathParam path, HttpFSParams.GetOpParam op, HttpFSParams.OffsetParam offset, HttpFSParams.LenParam len, HttpFSParams.FilterParam filter, HttpFSParams.DoAsParam doAs, HttpFSParams.OverwriteParam override, HttpFSParams.BlockSizeParam blockSize, HttpFSParams.PermissionParam permission, HttpFSParams.ReplicationParam replication) throws IOException, FileSystemAccessException
user
- principal making the request.path
- path for the GET request.op
- GET operation, default value is @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.GetOpValues#OPEN}.offset
- of the file being fetch, used only withlen
- amounts of bytes, used only with @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.GetOpValues#OPEN}
operations.filter
- Glob filter, default value is none. Used only if the
operation is @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.GetOpValues#LISTSTATUS}doAs
- user being impersonated, defualt value is none. It can be used
only if the current user is a HttpFSServer proxyuser.override
- default is true. Used only forblockSize
- block size to set, used only bypermission
- permission to set, used only byreplication
- replication factor to set, used only by
IOException
- thrown if an IO error occurred. Thrown exceptions are
handled by HttpFSExceptionProvider
.
FileSystemAccessException
- thrown if a FileSystemAccess releated error occurred. Thrown
exceptions are handled by HttpFSExceptionProvider
.protected URI createUploadRedirectionURL(javax.ws.rs.core.UriInfo uriInfo, Enum<?> uploadOperation)
uriInfo
- uri info of the request.uploadOperation
- operation for the upload URL.
public javax.ws.rs.core.Response delete(@Context Principal user, HttpFSParams.FsPathParam path, HttpFSParams.DeleteOpParam op, HttpFSParams.DeleteRecursiveParam recursive, HttpFSParams.DoAsParam doAs) throws IOException, FileSystemAccessException
user
- principal making the request.path
- path for the DELETE request.op
- DELETE operation, default value is @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.DeleteOpValues#DELETE}.recursive
- indicates if the delete is recursive, default is false
doAs
- user being impersonated, defualt value is none. It can be used
only if the current user is a HttpFSServer proxyuser.
IOException
- thrown if an IO error occurred. Thrown exceptions are
handled by HttpFSExceptionProvider
.
FileSystemAccessException
- thrown if a FileSystemAccess releated error occurred. Thrown
exceptions are handled by HttpFSExceptionProvider
.public javax.ws.rs.core.Response put(InputStream is, @Context Principal user, @Context javax.ws.rs.core.UriInfo uriInfo, HttpFSParams.FsPathParam path, HttpFSParams.PutOpParam op, HttpFSParams.ToPathParam toPath, HttpFSParams.OwnerParam owner, HttpFSParams.GroupParam group, HttpFSParams.OverwriteParam override, HttpFSParams.BlockSizeParam blockSize, HttpFSParams.PermissionParam permission, HttpFSParams.ReplicationParam replication, HttpFSParams.ModifiedTimeParam modifiedTime, HttpFSParams.AccessTimeParam accessTime, HttpFSParams.DataParam hasData, HttpFSParams.DoAsParam doAs) throws IOException, FileSystemAccessException
is
- request input stream, used only foruser
- principal making the request.uriInfo
- the request uriInfo.path
- path for the PUT request.op
- PUT operation, no default value.toPath
- new path, used only for
HttpFSFileSystem.PutOpValues.RENAME
operations.owner
- owner to set, used only forgroup
- group to set, used only foroverride
- default is true. Used only forblockSize
- block size to set, used only bypermission
- permission to set, used only byreplication
- replication factor to set, used only bymodifiedTime
- modified time, in seconds since EPOC, used only byaccessTime
- accessed time, in seconds since EPOC, used only byhasData
- indicates if the append request is uploading data or not
(just getting the handle).doAs
- user being impersonated, defualt value is none. It can be used
only if the current user is a HttpFSServer proxyuser.
IOException
- thrown if an IO error occurred. Thrown exceptions are
handled by HttpFSExceptionProvider
.
FileSystemAccessException
- thrown if a FileSystemAccess releated error occurred. Thrown
exceptions are handled by HttpFSExceptionProvider
.public javax.ws.rs.core.Response post(InputStream is, @Context Principal user, @Context javax.ws.rs.core.UriInfo uriInfo, HttpFSParams.FsPathParam path, HttpFSParams.PostOpParam op, HttpFSParams.DataParam hasData, HttpFSParams.DoAsParam doAs) throws IOException, FileSystemAccessException
is
- request input stream, used only foruser
- principal making the request.uriInfo
- the request uriInfo.path
- path for the POST request.op
- POST operation, default is @link org.apache.hadoop.fs.http.client.HttpFSFileSystem.PostOpValues#APPEND}.hasData
- indicates if the append request is uploading data or not (just getting the handle).doAs
- user being impersonated, defualt value is none. It can be used
only if the current user is a HttpFSServer proxyuser.
IOException
- thrown if an IO error occurred. Thrown exceptions are
handled by HttpFSExceptionProvider
.
FileSystemAccessException
- thrown if a FileSystemAccess releated error occurred. Thrown
exceptions are handled by HttpFSExceptionProvider
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |