HDDS-15191. Add ScmInvoker subclasses for the remaining SCMHandler(s)#10252
Merged
szetszwo merged 6 commits intoMay 19, 2026
Conversation
Contributor
Author
|
Hi @Russole, can you help me review this? Thanks! |
szetszwo
reviewed
May 17, 2026
Contributor
szetszwo
left a comment
There was a problem hiding this comment.
@YutaLin , thanks for working on this! Please see the comments inlined and also https://issues.apache.org/jira/secure/attachment/13082261/10252_review.patch
Contributor
Author
|
Hi @szetszwo |
szetszwo
reviewed
May 19, 2026
Contributor
szetszwo
left a comment
There was a problem hiding this comment.
Tried to regenerate all the Invoker code. Found the diff below. Since the discrepancy is minor, we may regenerate them later.
+1
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/FinalizationStateManagerInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/had
oop/hdds/scm/ha/invoker/FinalizationStateManagerInvoker.java
index ab0dc40fad..89cfad9ded 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/FinalizationStateManagerInvoker.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/FinalizationStateManagerInvoker.java
@@ -87,7 +87,7 @@ public FinalizationCheckpoint getFinalizationCheckpoint() {
}
@Override
- public void reinitialize(Table<String, String> arg0) throws IOException {
+ public void reinitialize(Table arg0) throws IOException {
invoker.getImpl().reinitialize(arg0);
}
@@ -131,7 +131,7 @@ public Message invokeLocal(String methodName, Object[] p) throws Exception {
break;
case "reinitialize":
- final Table<String, String> arg2 = p.length > 0 ? (Table<String, String>) p[0] : null;
+ final Table arg2 = p.length > 0 ? (Table) p[0] : null;
getImpl().reinitialize(arg2);
return Message.EMPTY;
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SecretKeyStateInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SecretKeyStateInvoker.java
index 3126ec9563..6310591611 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SecretKeyStateInvoker.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SecretKeyStateInvoker.java
@@ -74,12 +74,12 @@ public List<ManagedSecretKey> getSortedKeys() {
}
@Override
- public void reinitialize(List<ManagedSecretKey> arg0) {
+ public void reinitialize(List arg0) {
invoker.getImpl().reinitialize(arg0);
}
@Override
- public void updateKeys(List<ManagedSecretKey> arg0) throws SCMException {
+ public void updateKeys(List arg0) throws SCMException {
final Object[] args = {arg0};
invoker.invokeReplicateDirect(ReplicateMethod.updateKeys, args);
}
@@ -109,12 +109,12 @@ public Message invokeLocal(String methodName, Object[] p) throws Exception {
break;
case "reinitialize":
- final List<ManagedSecretKey> arg1 = p.length > 0 ? (List<ManagedSecretKey>) p[0] : null;
+ final List arg1 = p.length > 0 ? (List) p[0] : null;
getImpl().reinitialize(arg1);
return Message.EMPTY;
case "updateKeys":
- final List<ManagedSecretKey> arg2 = p.length > 0 ? (List<ManagedSecretKey>) p[0] : null;
+ final List arg2 = p.length > 0 ? (List) p[0] : null;
getImpl().updateKeys(arg2);
return Message.EMPTY;
diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SequenceIdGeneratorStateManagerInvoker.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SequenceIdGeneratorStateManagerInvoker.java
index 4ffd0cb3ae..08b4561c58 100644
--- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SequenceIdGeneratorStateManagerInvoker.java
+++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/ha/invoker/SequenceIdGeneratorStateManagerInvoker.java
@@ -103,8 +103,7 @@ public Message invokeLocal(String methodName, Object[] p) throws Exception {
return Message.EMPTY;
default:
- throw new IllegalArgumentException("Method not found: " + methodName
- + " in SequenceIdGenerator.StateManager");
+ throw new IllegalArgumentException("Method not found: " + methodName + " in StateManager");
}
return SCMRatisResponse.encode(returnValue, returnType);
Contributor
|
@Russole would you like to take a look? |
Contributor
|
@Russole , in case you have any comments, please feel free post here. We could address them in the follow-up PRs. |
Contributor
|
Sounds good, thanks. @szetszwo I’ll leave any comments here if I have them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The remaining SCMHandler(s) are:
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15191
How was this patch tested?
CI(https://github.com/YutaLin/ozone/actions/runs/25711803021)