Skip to content

HDDS-17595. Use the KeyManager interface instead of KeyManagerImpl casts - #11849

Draft
rajeshkumarchandolu wants to merge 1 commit into
apache:masterfrom
rajeshkumarchandolu:om-keymanager-interface
Draft

rajeshkumarchandolu wants to merge 1 commit into
apache:masterfrom
rajeshkumarchandolu:om-keymanager-interface

Conversation

@rajeshkumarchandolu

@rajeshkumarchandolu rajeshkumarchandolu commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • Add KeyManager#restartSnapshotSstFilteringService, and use it in OzoneManager#reconfOzoneSnapshotSSTFilteringServiceInterval in place of three KeyManagerImpl casts.
  • Use the KeyManager, VolumeManager and BucketManager interfaces in tests instead of the implementation classes.

These changes are needed for the tracing proxies in OM (HDDS-17586). The key manager will be created as a tracing proxy, so that every key manager call gets its own span, for example KeyManagerImpl.listStatus:

keyManager = TracingUtil.createProxy(new KeyManagerImpl(...), KeyManager.class, SpanKind.INTERNAL);

A tracing proxy is a JDK dynamic proxy and implements only the KeyManager interface, so a cast to KeyManagerImpl would fail with a ClassCastException. This PR doesn't add any tracing itself, and there is no functional change.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-17595

How was this patch tested?

@github-actions github-actions Bot added the om label Oct 29, 2026
@priyeshkaratha

Copy link
Copy Markdown
Member

Hi @rajeshkumarchandolu Please raise PR with proper Jira and follow the guidline

@priyeshkaratha
priyeshkaratha marked this pull request as draft October 30, 2026 05:05
@rajeshkumarchandolu rajeshkumarchandolu changed the title Use the KeyManager interface instead of KeyManagerImpl casts in OM an… HDDS-17595: Use the KeyManager interface instead of KeyManagerImpl casts in OM an… Oct 30, 2026
@rajeshkumarchandolu rajeshkumarchandolu changed the title HDDS-17595: Use the KeyManager interface instead of KeyManagerImpl casts in OM an… HDDS-17595: Use the KeyManager interface instead of KeyManagerImpl casts in OM Oct 30, 2026
@priyeshkaratha priyeshkaratha changed the title HDDS-17595: Use the KeyManager interface instead of KeyManagerImpl casts in OM HDDS-17595. Use the KeyManager interface instead of KeyManagerImpl casts in OM Oct 30, 2026
@rajeshkumarchandolu rajeshkumarchandolu changed the title HDDS-17595. Use the KeyManager interface instead of KeyManagerImpl casts in OM HDDS-17595. Use the KeyManager interface instead of KeyManagerImpl casts Oct 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants