You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by pi...@apache.org on 2021/11/28 21:16:07 UTC
[ozone] branch HDDS-5447-httpfs updated: HDDS-5828 [HTTPFSGW] Add proper handling for unsupported operations (#2862)
This is an automated email from the ASF dual-hosted git repository.
pifta pushed a commit to branch HDDS-5447-httpfs
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/HDDS-5447-httpfs by this push:
new bd76bfc HDDS-5828 [HTTPFSGW] Add proper handling for unsupported operations (#2862)
bd76bfc is described below
commit bd76bfc70ba1d527e50c98eb2df24a0262b6f559
Author: Zita Dombi <50...@users.noreply.github.com>
AuthorDate: Sun Nov 28 22:15:44 2021 +0100
HDDS-5828 [HTTPFSGW] Add proper handling for unsupported operations (#2862)
---
.../apache/ozone/fs/http/server/HttpFSServer.java | 39 ++++++++++++++--------
1 file changed, 26 insertions(+), 13 deletions(-)
diff --git a/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java b/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java
index ebb96eb..a11496b 100644
--- a/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java
+++ b/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java
@@ -258,7 +258,8 @@ public class HttpFSServer {
@QueryParam(OperationParam.NAME) OperationParam op,
@Context Parameters params,
@Context HttpServletRequest request)
- throws IOException, FileSystemAccessException {
+ throws IOException, FileSystemAccessException,
+ UnsupportedOperationException {
// Restrict access to only GETFILESTATUS and LISTSTATUS in write-only mode
if((op.value() != HttpFSConstants.Operation.GETFILESTATUS) &&
(op.value() != HttpFSConstants.Operation.LISTSTATUS) &&
@@ -293,8 +294,10 @@ public class HttpFSServer {
response = handleGetQuotaUsage(path, user);
break;
case GETFILECHECKSUM:
- response = handleGetFileCheckSum(path, uriInfo, params, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support GETFILECHECKSUM");
+ // response = handleGetFileCheckSum(path, uriInfo, params, user);
+ // break;
case GETFILEBLOCKLOCATIONS:
response = Response.status(Response.Status.BAD_REQUEST).build();
break;
@@ -308,8 +311,10 @@ public class HttpFSServer {
response = handleListXAttrs(path, user);
break;
case LISTSTATUS_BATCH:
- response = handleListStatusBatch(path, params, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support LISTSTATUS_BATCH");
+ //response = handleListStatusBatch(path, params, user);
+ //break;
case GETTRASHROOT:
response = handleGetTrashRoot(path, user);
break;
@@ -1004,17 +1009,25 @@ public class HttpFSServer {
response = handleRename(path, params, user);
break;
case SETOWNER:
- response = handleSetOwner(path, params, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support SETOWNER");
+ //response = handleSetOwner(path, params, user);
+ //break;
case SETPERMISSION:
- response = handleSetPermission(path, params, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support SETPERMISSION");
+ //response = handleSetPermission(path, params, user);
+ //break;
case SETREPLICATION:
- response = handleSetReplication(path, params, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support SETREPLICATION");
+ //response = handleSetReplication(path, params, user);
+ //break;
case SETTIMES:
- response = handleSetTimes(path, params, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support SETTIMES");
+ //response = handleSetTimes(path, params, user);
+ //break;
case SETACL:
response = handleSetACL(path, params, user);
break;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org