Skip to content

Commit db2e507

Browse files
authored
HDDS-10793. HttpFS gateway should throw unsupported operation for some operations (#6645)
1 parent d49a2b6 commit db2e507

2 files changed

Lines changed: 8 additions & 14 deletions

File tree

‎hadoop-ozone/dist/src/main/smoketest/httpfs/operations_tests.robot‎

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,16 +105,6 @@ Get quota usage of directory
105105
${usage} = Execute curl command ${volume} GETQUOTAUSAGE ${EMPTY}
106106
Should contain ${usage.stdout} QuotaUsage "fileAndDirectoryCount":3
107107

108-
Get home directory
109-
${home} = Execute curl command ${EMPTY} GETHOMEDIRECTORY ${EMPTY}
110-
${user} = Set Variable If '${SECURITY_ENABLED}'=='true' testuser ${USERNAME}
111-
Should contain ${home.stdout} "Path":"\\/user\\/${user}"
112-
113-
Get trash root
114-
${trash} = Execute curl command ${volume}/buck1/testfile GETTRASHROOT ${EMPTY}
115-
${user} = Set Variable If '${SECURITY_ENABLED}'=='true' testuser ${USERNAME}
116-
Should contain ${trash.stdout} "Path":"\\/${volume}\\/buck1\\/.Trash\\/${user}"
117-
118108
# Missing functionality, not working yet.
119109
# Set permission of bucket
120110
# ${status} = Execute curl command vol1/buck1 GETFILESTATUS ${EMPTY}

‎hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/HttpFSServer.java‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -282,8 +282,10 @@ public Response get(@PathParam("path") String path,
282282
response = handleListStatus(path, params, user);
283283
break;
284284
case GETHOMEDIRECTORY:
285-
response = handleGetHomeDir(path, op, user);
286-
break;
285+
throw new UnsupportedOperationException(getClass().getSimpleName()
286+
+ " doesn't support GETHOMEDIRECTORY");
287+
//response = handleGetHomeDir(path, op, user);
288+
//break;
287289
case INSTRUMENTATION:
288290
response = handleInstrumentation(path, op, user);
289291
break;
@@ -316,8 +318,10 @@ public Response get(@PathParam("path") String path,
316318
//response = handleListStatusBatch(path, params, user);
317319
//break;
318320
case GETTRASHROOT:
319-
response = handleGetTrashRoot(path, user);
320-
break;
321+
throw new UnsupportedOperationException(getClass().getSimpleName()
322+
+ " doesn't support GETTRASHROOT");
323+
//response = handleGetTrashRoot(path, user);
324+
//break;
321325
case GETALLSTORAGEPOLICY:
322326
response = handleGetAllStoragePolicy(path, user);
323327
break;

0 commit comments

Comments
 (0)