diff --git a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java index 7e96cd6556d0..853a14aa1e68 100644 --- a/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java +++ b/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/OmUtils.java @@ -303,6 +303,7 @@ public static boolean isReadOnly( case SetS3Secret: case RevokeS3Secret: case PurgeDirectories: + case PurgePaths: case CreateTenant: case DeleteTenant: case TenantAssignUserAccessId: diff --git a/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto b/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto index 19f699756f3f..96b48fbc9cd2 100644 --- a/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto +++ b/hadoop-ozone/interface-client/src/main/proto/OmClientProtocol.proto @@ -101,7 +101,8 @@ enum Type { RevokeS3Secret = 93; - PurgeDirectories = 94; + PurgePaths = 94; // [deprecated = true] + PurgeDirectories = 95; CreateTenant = 96; DeleteTenant = 97; @@ -201,7 +202,8 @@ message OMRequest { optional RevokeS3SecretRequest RevokeS3SecretRequest = 93; - optional PurgeDirectoriesRequest purgeDirectoriesRequest = 94; + optional PurgePathsRequest purgePathsRequest = 94 [deprecated = true]; + optional PurgeDirectoriesRequest purgeDirectoriesRequest = 108; optional S3Authentication s3Authentication = 95; @@ -297,7 +299,8 @@ message OMResponse { optional ListTrashResponse listTrashResponse = 91; optional RecoverTrashResponse RecoverTrashResponse = 92; - optional PurgeDirectoriesResponse purgeDirectoriesResponse = 93; + optional PurgePathsResponse purgePathsResponse = 93 [deprecated = true]; + optional PurgeDirectoriesResponse purgeDirectoriesResponse = 108; // Skipped 94/95 to align with OMRequest optional CreateTenantResponse CreateTenantResponse = 96; @@ -1081,22 +1084,35 @@ message PurgeKeysResponse { } -message PurgeDirectoriesRequest { - repeated PurgePathRequest deletedPath = 1; +message PurgePathsRequest { + // option deprecated = true; + // Use PurgeDirectoriesRequest + repeated string deletedDirs = 1; + repeated KeyInfo deletedSubFiles = 2; + repeated KeyInfo markDeletedSubDirs = 3; } -message PurgePathRequest { - required uint64 volumeId = 1; - required uint64 bucketId = 2; - optional string deletedDir = 3; - repeated KeyInfo deletedSubFiles = 4; - repeated KeyInfo markDeletedSubDirs = 5; +message PurgePathsResponse { + // option deprecated = true; + // Use PurgeDirectoriesResponse +} + +message PurgeDirectoriesRequest { + repeated PurgePathRequest deletedPath = 1; } message PurgeDirectoriesResponse { } +message PurgePathRequest { + required uint64 volumeId = 1; + required uint64 bucketId = 2; + optional string deletedDir = 3; + repeated KeyInfo deletedSubFiles = 4; + repeated KeyInfo markDeletedSubDirs = 5; +} + message DeleteOpenKeysRequest { repeated OpenKeyBucket openKeysPerBucket = 1; } diff --git a/hadoop-ozone/interface-client/src/main/resources/proto.lock b/hadoop-ozone/interface-client/src/main/resources/proto.lock index 367bf166d7df..e6d24a895026 100644 --- a/hadoop-ozone/interface-client/src/main/resources/proto.lock +++ b/hadoop-ozone/interface-client/src/main/resources/proto.lock @@ -1,161 +1,5 @@ { "definitions": [ - { - "protopath": "OMAdminProtocol.proto", - "def": { - "enums": [ - { - "name": "NodeState", - "enum_fields": [ - { - "name": "ACTIVE", - "integer": 1 - }, - { - "name": "DECOMMISSIONED", - "integer": 2 - } - ] - } - ], - "messages": [ - { - "name": "OMConfigurationRequest" - }, - { - "name": "OMConfigurationResponse", - "fields": [ - { - "id": 1, - "name": "success", - "type": "bool" - }, - { - "id": 2, - "name": "errorMsg", - "type": "string" - }, - { - "id": 3, - "name": "nodesInMemory", - "type": "OMNodeInfo", - "is_repeated": true - }, - { - "id": 4, - "name": "nodesInNewConf", - "type": "OMNodeInfo", - "is_repeated": true - } - ] - }, - { - "name": "OMNodeInfo", - "fields": [ - { - "id": 1, - "name": "nodeID", - "type": "string" - }, - { - "id": 2, - "name": "hostAddress", - "type": "string" - }, - { - "id": 3, - "name": "rpcPort", - "type": "uint32" - }, - { - "id": 4, - "name": "ratisPort", - "type": "uint32" - }, - { - "id": 5, - "name": "nodeState", - "type": "NodeState", - "options": [ - { - "name": "default", - "value": "ACTIVE" - } - ] - } - ] - }, - { - "name": "DecommissionOMRequest", - "fields": [ - { - "id": 1, - "name": "nodeId", - "type": "string" - }, - { - "id": 2, - "name": "nodeAddress", - "type": "string" - } - ] - }, - { - "name": "DecommissionOMResponse", - "fields": [ - { - "id": 1, - "name": "success", - "type": "bool" - }, - { - "id": 3, - "name": "errorMsg", - "type": "string" - } - ] - } - ], - "services": [ - { - "name": "OzoneManagerAdminService", - "rpcs": [ - { - "name": "getOMConfiguration", - "in_type": "OMConfigurationRequest", - "out_type": "OMConfigurationResponse" - }, - { - "name": "decommission", - "in_type": "DecommissionOMRequest", - "out_type": "DecommissionOMResponse" - } - ] - } - ], - "package": { - "name": "hadoop.ozone" - }, - "options": [ - { - "name": "java_package", - "value": "org.apache.hadoop.ozone.protocol.proto" - }, - { - "name": "java_outer_classname", - "value": "OzoneManagerAdminProtocolProtos" - }, - { - "name": "java_generic_services", - "value": "true" - }, - { - "name": "java_generate_equals_and_hash", - "value": "true" - } - ] - } - }, { "protopath": "OmClientProtocol.proto", "def": { @@ -368,7 +212,7 @@ "integer": 93 }, { - "name": "PurgeDirectories", + "name": "PurgePaths", "integer": 94 } ] @@ -659,10 +503,6 @@ { "name": "NOT_SUPPORTED_OPERATION_WHEN_PREPARED", "integer": 74 - }, - { - "name": "NOT_SUPPORTED_OPERATION_PRIOR_FINALIZATION", - "integer": 75 } ] }, @@ -1176,13 +1016,8 @@ }, { "id": 94, - "name": "purgeDirectoriesRequest", - "type": "PurgeDirectoriesRequest" - }, - { - "id": 95, - "name": "s3Authentication", - "type": "S3Authentication" + "name": "purgePathsRequest", + "type": "PurgePathsRequest" } ] }, @@ -1472,8 +1307,8 @@ }, { "id": 93, - "name": "purgeDirectoriesResponse", - "type": "PurgeDirectoriesResponse" + "name": "purgePathsResponse", + "type": "PurgePathsResponse" } ] }, @@ -1960,16 +1795,6 @@ "id": 18, "name": "bucketLayout", "type": "BucketLayoutProto" - }, - { - "id": 19, - "name": "owner", - "type": "string" - }, - { - "id": 20, - "name": "defaultReplicationConfig", - "type": "hadoop.hdds.DefaultReplicationConfig" } ] }, @@ -2116,16 +1941,6 @@ "id": 9, "name": "quotaInNamespace", "type": "uint64" - }, - { - "id": 10, - "name": "ownerName", - "type": "string" - }, - { - "id": 11, - "name": "defaultReplicationConfig", - "type": "hadoop.hdds.DefaultReplicationConfig" } ] }, @@ -2384,14 +2199,7 @@ ] }, { - "name": "SetBucketPropertyResponse", - "fields": [ - { - "id": 1, - "name": "response", - "type": "bool" - } - ] + "name": "SetBucketPropertyResponse" }, { "name": "DeleteBucketRequest", @@ -2473,24 +2281,12 @@ { "id": 5, "name": "type", - "type": "hadoop.hdds.ReplicationType", - "options": [ - { - "name": "default", - "value": "NONE" - } - ] + "type": "hadoop.hdds.ReplicationType" }, { "id": 6, "name": "factor", - "type": "hadoop.hdds.ReplicationFactor", - "options": [ - { - "name": "default", - "value": "ZERO" - } - ] + "type": "hadoop.hdds.ReplicationFactor" }, { "id": 7, @@ -2554,11 +2350,6 @@ "id": 18, "name": "headOp", "type": "bool" - }, - { - "id": 19, - "name": "ecReplicationConfig", - "type": "hadoop.hdds.ECReplicationConfig" } ] }, @@ -2725,11 +2516,6 @@ "id": 16, "name": "parentID", "type": "uint64" - }, - { - "id": 17, - "name": "ecReplicationConfig", - "type": "hadoop.hdds.ECReplicationConfig" } ] }, @@ -3202,42 +2988,22 @@ "name": "PurgeKeysResponse" }, { - "name": "PurgeDirectoriesRequest", + "name": "PurgePathsRequest", "fields": [ { "id": 1, - "name": "deletedPath", - "type": "PurgePathRequest", + "name": "deletedDirs", + "type": "string", "is_repeated": true - } - ] - }, - { - "name": "PurgePathRequest", - "fields": [ - { - "id": 1, - "name": "volumeId", - "type": "uint64" }, { "id": 2, - "name": "bucketId", - "type": "uint64" - }, - { - "id": 3, - "name": "deletedDir", - "type": "string" - }, - { - "id": 4, "name": "deletedSubFiles", "type": "KeyInfo", "is_repeated": true }, { - "id": 5, + "id": 3, "name": "markDeletedSubDirs", "type": "KeyInfo", "is_repeated": true @@ -3245,7 +3011,7 @@ ] }, { - "name": "PurgeDirectoriesResponse" + "name": "PurgePathsResponse" }, { "name": "DeleteOpenKeysRequest", @@ -3290,13 +3056,7 @@ { "id": 2, "name": "clientID", - "type": "uint64", - "options": [ - { - "name": "deprecated", - "value": "true" - } - ] + "type": "uint64" } ] }, @@ -3509,11 +3269,6 @@ "id": 1, "name": "sequenceNumber", "type": "uint64" - }, - { - "id": 2, - "name": "limitCount", - "type": "uint64" } ] }, @@ -3552,11 +3307,6 @@ "name": "data", "type": "bytes", "is_repeated": true - }, - { - "id": 3, - "name": "latestSequenceNumber", - "type": "uint64" } ] }, @@ -3741,17 +3491,6 @@ "id": 4, "name": "omRole", "type": "OMRoleInfo" - }, - { - "id": 5, - "name": "OMVersion", - "type": "int32", - "options": [ - { - "name": "default", - "value": "0" - } - ] } ] }, @@ -3833,11 +3572,6 @@ "id": 8, "name": "parentID", "type": "uint64" - }, - { - "id": 9, - "name": "ecReplicationConfig", - "type": "hadoop.hdds.ECReplicationConfig" } ] }, @@ -4018,11 +3752,6 @@ "name": "partsList", "type": "PartInfo", "is_repeated": true - }, - { - "id": 7, - "name": "ecReplicationConfig", - "type": "hadoop.hdds.ECReplicationConfig" } ] }, @@ -4099,11 +3828,6 @@ "id": 7, "name": "factor", "type": "hadoop.hdds.ReplicationFactor" - }, - { - "id": 8, - "name": "ecReplicationConfig", - "type": "hadoop.hdds.ECReplicationConfig" } ] }, @@ -4231,26 +3955,6 @@ "type": "string" } ] - }, - { - "name": "S3Authentication", - "fields": [ - { - "id": 1, - "name": "stringToSign", - "type": "string" - }, - { - "id": 2, - "name": "signature", - "type": "string" - }, - { - "id": 3, - "name": "accessId", - "type": "string" - } - ] } ], "services": [