Skip to content

HDDS-15191. Add ScmInvoker subclasses for the remaining SCMHandler(s)#10252

Merged
szetszwo merged 6 commits into
apache:masterfrom
YutaLin:HDDS-15191_Add_ScmInvoker_subclasses_for_the_remaining_SCMHandlers
May 19, 2026
Merged

HDDS-15191. Add ScmInvoker subclasses for the remaining SCMHandler(s)#10252
szetszwo merged 6 commits into
apache:masterfrom
YutaLin:HDDS-15191_Add_ScmInvoker_subclasses_for_the_remaining_SCMHandlers

Conversation

@YutaLin
Copy link
Copy Markdown
Contributor

@YutaLin YutaLin commented May 12, 2026

What changes were proposed in this pull request?

The remaining SCMHandler(s) are:

  • FinalizationStateManager
  • SecretKeyState
  • SequenceIdGenerator$StateManager
  • StatefulServiceStateManager

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)

@YutaLin
Copy link
Copy Markdown
Contributor Author

YutaLin commented May 12, 2026

Hi @Russole, can you help me review this? Thanks!

Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@YutaLin , thanks for working on this! Please see the comments inlined and also https://issues.apache.org/jira/secure/attachment/13082261/10252_review.patch

@YutaLin
Copy link
Copy Markdown
Contributor Author

YutaLin commented May 19, 2026

Hi @szetszwo
Thanks for review, I've made some change!

@YutaLin YutaLin requested a review from szetszwo May 19, 2026 03:46
Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);

Copy link
Copy Markdown
Contributor

@szetszwo szetszwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@adoroszlai
Copy link
Copy Markdown
Contributor

@Russole would you like to take a look?

@szetszwo szetszwo merged commit 8c53f15 into apache:master May 19, 2026
47 checks passed
@szetszwo
Copy link
Copy Markdown
Contributor

@Russole , in case you have any comments, please feel free post here. We could address them in the follow-up PRs.

@YutaLin YutaLin deleted the HDDS-15191_Add_ScmInvoker_subclasses_for_the_remaining_SCMHandlers branch May 19, 2026 19:35
@Russole
Copy link
Copy Markdown
Contributor

Russole commented May 19, 2026

Sounds good, thanks. @szetszwo I’ll leave any comments here if I have them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants