This is an automated email from the ASF dual-hosted git repository.

pifta pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new db2e507504 HDDS-10793. HttpFS gateway should throw unsupported 
operation for some operations (#6645)
db2e507504 is described below

commit db2e5075046bfa822847ceeff484c76a4b9c46c6
Author: Zita Dombi <[email protected]>
AuthorDate: Mon May 6 18:58:12 2024 +0200

    HDDS-10793. HttpFS gateway should throw unsupported operation for some 
operations (#6645)
---
 .../dist/src/main/smoketest/httpfs/operations_tests.robot    | 10 ----------
 .../java/org/apache/ozone/fs/http/server/HttpFSServer.java   | 12 ++++++++----
 2 files changed, 8 insertions(+), 14 deletions(-)

diff --git a/hadoop-ozone/dist/src/main/smoketest/httpfs/operations_tests.robot 
b/hadoop-ozone/dist/src/main/smoketest/httpfs/operations_tests.robot
index a4b19c89fa..4078623240 100644
--- a/hadoop-ozone/dist/src/main/smoketest/httpfs/operations_tests.robot
+++ b/hadoop-ozone/dist/src/main/smoketest/httpfs/operations_tests.robot
@@ -105,16 +105,6 @@ Get quota usage of directory
     ${usage} =      Execute curl command    ${volume}          GETQUOTAUSAGE   
   ${EMPTY}
     Should contain  ${usage.stdout}    QuotaUsage          
"fileAndDirectoryCount":3
 
-Get home directory
-    ${home} =       Execute curl command    ${EMPTY}          GETHOMEDIRECTORY 
     ${EMPTY}
-    ${user} =       Set Variable If     '${SECURITY_ENABLED}'=='true'   
testuser    ${USERNAME}
-    Should contain  ${home.stdout}     "Path":"\\/user\\/${user}"
-
-Get trash root
-    ${trash} =      Execute curl command    ${volume}/buck1/testfile          
GETTRASHROOT      ${EMPTY}
-    ${user} =       Set Variable If     '${SECURITY_ENABLED}'=='true'   
testuser    ${USERNAME}
-    Should contain  ${trash.stdout}    
"Path":"\\/${volume}\\/buck1\\/.Trash\\/${user}"
-
 # Missing functionality, not working yet.
 # Set permission of bucket
     # ${status} =     Execute curl command    vol1/buck1          
GETFILESTATUS      ${EMPTY}
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 e35ac3660d..0ba313e18b 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
@@ -282,8 +282,10 @@ public class HttpFSServer {
       response = handleListStatus(path, params, user);
       break;
     case GETHOMEDIRECTORY:
-      response = handleGetHomeDir(path, op, user);
-      break;
+      throw new UnsupportedOperationException(getClass().getSimpleName()
+          + " doesn't support GETHOMEDIRECTORY");
+      //response = handleGetHomeDir(path, op, user);
+      //break;
     case INSTRUMENTATION:
       response = handleInstrumentation(path, op, user);
       break;
@@ -316,8 +318,10 @@ public class HttpFSServer {
       //response = handleListStatusBatch(path, params, user);
       //break;
     case GETTRASHROOT:
-      response = handleGetTrashRoot(path, user);
-      break;
+      throw new UnsupportedOperationException(getClass().getSimpleName()
+          + " doesn't support GETTRASHROOT");
+      //response = handleGetTrashRoot(path, user);
+      //break;
     case GETALLSTORAGEPOLICY:
       response = handleGetAllStoragePolicy(path, user);
       break;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to