[
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).
----
the strategy is like:
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
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
> 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).
> ----
> the strategy is like:
>
> 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]