[
https://issues.apache.org/jira/browse/HDDS-13951?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Huang Guan Hao updated HDDS-13951:
----------------------------------
Description:
I found that we have TODO comments indicating in
[https://github.com/rich7420/ozone/blob/f9facd848ae52781badb468f741017bd8a68af11/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProviderBase.java#L134]
. It says we should migrate from `ProtobufRpcEngine` to `ProtobufRpcEngine2`
after upgrading to Protobuf 3.x. Since we're already on Protobuf 3.25.8 and
Hadoop 3.4.2, it would be good to complete this migration.
Current Status:
* Hadoop 3.4.2 includes `ProtobufRpcEngine2` (verified in
`hadoop-common-3.4.2.jar`)
* Protobuf 3.25.8 is in use
* Still using `ProtobufRpcEngine` in ~29 files
* expect for Hadoop27RpcTransport.java
I think the keys in this migration task are
1. HddsServerUtil.addPBProtocol() must be updated *last*
This utility is used by multiple components (OM, SCM, DN, Recon).
Updating it early would force all RPCs to use ProtobufRpcEngine2 immediately,
causing failures unless *every protocol* is migrated first.
Therefore, *HddsServerUtil is the final step*
2. Each RPC protocol must be migrated in a single PRA protocol migration must
include:
• Server implementation
• Client translator
• FailoverProxyProvider (if any)
• Protobuf service definitions
• Tests
Mixing versions (server on v2, client on v1) causes runtime crashes (e.g.
missing callId → IllegalStateException).
----
Migration Strategy
Phase 1 — Test Infrastructure (2 files)
No behavior changes. Zero risk. like a test.
ContainerTestUtils and SCMTestUtils
----
PR 2 — SCM Location Protocol
Migrate StorageContainerLocationProtocol (server + client + proto).
Switch only this protocol to ProtobufRpcEngine2.
Ensure tests pass before moving on.
----
PR 3 — SCM Security / Cert Protocol
Migrate SCM security protocols (Cert & SecretKey).
Update client translators and server implementations.
Use generated blocking stubs.
----
PR 4 — OM Client Protocol
OM has multiple client-side translators and failover logic.
Migrate them together with OM server handlers.
----
PR 5 — Datanode Client Protocol
Migrate HddsDatanodeClientProtocolServer and related components such as
SCMConnectionManager.
----
Phase 6 — Recon RPC
Recon uses ReconDatanodeProtocol , migrate its server + client in the same PR.
----
Phase 7 — Tools and Miscellaneous
Low-risk tools and CLI components (Freon, QuotaRepair, OMAdmin, etc.).
Can be migrated after core protocols stabilize.
----
Final PRr: update HddsServerUtil to use ProtobufRpcEngine2 globally.
hoping at this point:
CI stays green
All been migrated to ProtobufRpcEngine2 except for Hadoop27RpcTransport.java
was:
I found that we have TODO comments indicating in
[https://github.com/rich7420/ozone/blob/f9facd848ae52781badb468f741017bd8a68af11/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProviderBase.java#L134]
. It says we should migrate from `ProtobufRpcEngine` to `ProtobufRpcEngine2`
after upgrading to Protobuf 3.x. Since we're already on Protobuf 3.25.8 and
Hadoop 3.4.2, it would be good to complete this migration.
Current Status:
* Hadoop 3.4.2 includes `ProtobufRpcEngine2` (verified in
`hadoop-common-3.4.2.jar`)
* Protobuf 3.25.8 is in use
* Still using `ProtobufRpcEngine` in ~29 files
* expect for Hadoop27RpcTransport.java
1
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/HddsDatanodeClientProtocolServer.java
2
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/SCMConnectionManager.java
3
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/ContainerTestUtils.java
4
hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/common/SCMTestUtils.java
5
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/protocolPB/ReconfigureProtocolClientSideTranslatorPB.java
6
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/scm/proxy/SCMFailoverProxyProviderBase.java
7
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HddsServerUtil.java
8
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMBlockProtocolServer.java
9
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMClientProtocolServer.java
10
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMDatanodeProtocolServer.java
11
hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/server/SCMSecurityProtocolServer.java
12
hadoop-ozone/cli-admin/src/main/java/org/apache/hadoop/ozone/admin/om/OMAdmin.java
13
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProviderBase.java
14
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/Hadoop3OmTransport.java
15
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OMAdminProtocolClientSideImpl.java
16
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/protocolPB/OMInterServiceProtocolClientSideImpl.java
17
hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/security/acl/RequestContext.java
18
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/BaseFreonGenerator.java
19
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/DatanodeSimulator.java
20
hadoop-ozone/freon/src/main/java/org/apache/hadoop/ozone/freon/SCMThroughputBenchmark.java
21
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OMMultiTenantManagerImpl.java
22
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OmMetadataReader.java
23
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
24
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerRatisServer.java
25
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/OMClientRequest.java
26
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/security/S3SecretRequestHelper.java
27
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/s3/tenant/OMTenantCreateRequest.java
28
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/protocolPB/TestGrpcOmTransport.java
29
hadoop-ozone/tools/src/main/java/org/apache/hadoop/ozone/repair/om/quota/QuotaRepair.java
> Migrate from ProtobufRpcEngine to ProtobufRpcEngine2
> ----------------------------------------------------
>
> Key: HDDS-13951
> URL: https://issues.apache.org/jira/browse/HDDS-13951
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: Huang Guan Hao
> Assignee: Huang Guan Hao
> Priority: Major
>
> I found that we have TODO comments indicating in
> [https://github.com/rich7420/ozone/blob/f9facd848ae52781badb468f741017bd8a68af11/hadoop-ozone/common/src/main/java/org/apache/hadoop/ozone/om/ha/OMFailoverProxyProviderBase.java#L134]
> . It says we should migrate from `ProtobufRpcEngine` to `ProtobufRpcEngine2`
> after upgrading to Protobuf 3.x. Since we're already on Protobuf 3.25.8 and
> Hadoop 3.4.2, it would be good to complete this migration.
>
> Current Status:
> * Hadoop 3.4.2 includes `ProtobufRpcEngine2` (verified in
> `hadoop-common-3.4.2.jar`)
> * Protobuf 3.25.8 is in use
> * Still using `ProtobufRpcEngine` in ~29 files
> * expect for Hadoop27RpcTransport.java
> I think the keys in this migration task are
> 1. HddsServerUtil.addPBProtocol() must be updated *last*
> This utility is used by multiple components (OM, SCM, DN, Recon).
> Updating it early would force all RPCs to use ProtobufRpcEngine2 immediately,
> causing failures unless *every protocol* is migrated first.
> Therefore, *HddsServerUtil is the final step*
> 2. Each RPC protocol must be migrated in a single PRA protocol migration must
> include:
> • Server implementation
> • Client translator
> • FailoverProxyProvider (if any)
> • Protobuf service definitions
> • Tests
> Mixing versions (server on v2, client on v1) causes runtime crashes (e.g.
> missing callId → IllegalStateException).
> ----
> Migration Strategy
> Phase 1 — Test Infrastructure (2 files)
> No behavior changes. Zero risk. like a test.
> ContainerTestUtils and SCMTestUtils
> ----
> PR 2 — SCM Location Protocol
> Migrate StorageContainerLocationProtocol (server + client + proto).
> Switch only this protocol to ProtobufRpcEngine2.
> Ensure tests pass before moving on.
> ----
> PR 3 — SCM Security / Cert Protocol
> Migrate SCM security protocols (Cert & SecretKey).
> Update client translators and server implementations.
> Use generated blocking stubs.
> ----
> PR 4 — OM Client Protocol
> OM has multiple client-side translators and failover logic.
> Migrate them together with OM server handlers.
> ----
> PR 5 — Datanode Client Protocol
> Migrate HddsDatanodeClientProtocolServer and related components such as
> SCMConnectionManager.
> ----
> Phase 6 — Recon RPC
> Recon uses ReconDatanodeProtocol , migrate its server + client in the same PR.
> ----
> Phase 7 — Tools and Miscellaneous
> Low-risk tools and CLI components (Freon, QuotaRepair, OMAdmin, etc.).
> Can be migrated after core protocols stabilize.
> ----
> Final PRr: update HddsServerUtil to use ProtobufRpcEngine2 globally.
> hoping at this point:
> CI stays green
> All been migrated to ProtobufRpcEngine2 except for Hadoop27RpcTransport.java
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]