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 69ae8f5ac5 HDDS-8023. [HTTPFSGW] Remove support for
satisfyStoragePolicy operation (#4312)
69ae8f5ac5 is described below
commit 69ae8f5ac5edc70a7a3b9c4ae1947d4f0f21cfc7
Author: Zita Dombi <[email protected]>
AuthorDate: Mon Feb 27 12:40:36 2023 +0100
HDDS-8023. [HTTPFSGW] Remove support for satisfyStoragePolicy operation
(#4312)
---
.../apache/ozone/fs/http/server/FSOperations.java | 27 ----------------------
.../apache/ozone/fs/http/server/HttpFSServer.java | 16 ++-----------
2 files changed, 2 insertions(+), 41 deletions(-)
diff --git
a/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java
b/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java
index ae42ee80f4..59945f829e 100644
---
a/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java
+++
b/hadoop-ozone/httpfsgateway/src/main/java/org/apache/ozone/fs/http/server/FSOperations.java
@@ -2102,31 +2102,4 @@ public final class FSOperations {
return null;
}
}
-
- /**
- * Executor that performs a satisfyStoragePolicy operation.
- */
- @InterfaceAudience.Private
- public static class FSSatisyStoragePolicy
- implements FileSystemAccess.FileSystemExecutor<Void> {
-
- private Path path;
-
- public FSSatisyStoragePolicy(String path) {
- this.path = new Path(path);
- }
-
- @Override
- public Void execute(FileSystem fs) throws IOException {
- if (fs instanceof DistributedFileSystem) {
- DistributedFileSystem dfs = (DistributedFileSystem) fs;
- dfs.satisfyStoragePolicy(path);
- } else {
- throw new UnsupportedOperationException("satisfyStoragePolicy is "
- + "not supported for HttpFs on " + fs.getClass()
- + ". Please check your fs.defaultFS configuration");
- }
- return null;
- }
- }
}
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 24b16f29cc..e35ac3660d 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
@@ -1050,8 +1050,8 @@ public class HttpFSServer {
response = handleSetECPolicy(path, params, user);
break;
case SATISFYSTORAGEPOLICY:
- response = handleSatisfyStoragePolicy(path, user);
- break;
+ throw new UnsupportedOperationException(getClass().getSimpleName()
+ + " doesn't support SATISFYSTORAGEPOLICY");
default:
throw new IOException(
MessageFormat.format("Invalid HTTP PUT operation [{0}]",
@@ -1060,18 +1060,6 @@ public class HttpFSServer {
return response;
}
- private Response handleSatisfyStoragePolicy(String path,
- UserGroupInformation user)
- throws IOException, FileSystemAccessException {
- Response response;
- FSOperations.FSSatisyStoragePolicy command =
- new FSOperations.FSSatisyStoragePolicy(path);
- fsExecute(user, command);
- AUDIT_LOG.info("satisfy storage policy for [{}]", path);
- response = Response.ok().build();
- return response;
- }
-
private Response handleSetECPolicy(String path,
Parameters params,
UserGroupInformation user)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]