Skip to content

Classify surviving deprecated APIs in storm-server, external modules, and utilities (#8994) - #9173

Merged
reiabreu merged 1 commit into
apache:masterfrom
Mohit20057:classify-server-deprecated-apis
Oct 25, 2026
Merged

reiabreu merged 1 commit into
apache:masterfrom
Mohit20057:classify-server-deprecated-apis

Conversation

@Mohit20057

@Mohit20057 Mohit20057 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

What is the purpose of the change

Sub-task of umbrella issue #8994 ("inventory deprecated API and remove what is marked for removal").

Classifies surviving @Deprecated APIs and utilities in storm-server, storm-hdfs, and storm-client by upgrading plain @Deprecated annotations to include explicit since = "..." versions and forRemoval decisions, and documents supported replacements in Javadoc:

  • storm-server:
    • SchedulerAssignmentImpl.assign(WorkerSlot, Collection): @Deprecated(since = "2.0.0", forRemoval = true) (use overload with WorkerResources).
    • Testing.java (10 testing harness methods): @Deprecated(since = "2.0.0", forRemoval = true) (use LocalCluster.Builder, SimulatedTime, TrackedTopology).
    • BaseResourceAwareStrategy.NodeSortType.GENERIC_RAS and DEFAULT_RAS: @Deprecated(since = "2.3.0", forRemoval = false) (retained for compatibility with *Old strategies; use COMMON).
    • GenericResourceAwareStrategyOld and DefaultResourceAwareStrategyOld: @Deprecated(since = "2.3.0", forRemoval = false) (use GenericResourceAwareStrategy / DefaultResourceAwareStrategy).
    • NodeSorter / NodeSorterHostProximity: documented private helper methods with @deprecated Javadoc.
  • storm-hdfs:
    • Configs.java (12 HDFS Spout config key constants): @Deprecated(since = "2.0.0", forRemoval = true) (configure via spout builders).
    • HdfsState.HdfsFileOptions#addRotationAction: @Deprecated(since = "1.0.0", forRemoval = false) (retained for backwards compatibility).
  • storm-client:
    • LinearDRPCTopologyBuilder#addBolt(IRichBolt, ...): @Deprecated(forRemoval = true).
    • StormMetricRegistry#gauge(String, Gauge, String, String, Integer, Integer): @Deprecated(since = "2.3.0", forRemoval = true).
    • StormReporter#prepare(MetricRegistry, Map, Map): @Deprecated(since = "2.3.0", forRemoval = true).
    • SASL plain test auth classes (PlainClientCallbackHandler, PlainSaslTransportPlugin, SaslPlainServer): @Deprecated(since = "2.0.0", forRemoval = true).

How was this tested

  • Built and compiled all touched modules with JDK 23 (mvn test-compile -pl storm-client,storm-server,external/storm-hdfs,flux/flux-core)
  • Checkstyle validated with 0 violations

@Mohit20057 Mohit20057 changed the title Classify surviving deprecated storm-server APIs with forRemoval decisions (#8994) Classify surviving deprecated APIs in storm-server, external modules, and utilities (#8994) Oct 14, 2026
@reiabreu reiabreu added this to the 3.2.0 milestone Oct 17, 2026

@reiabreu reiabreu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This review was generated with the help of an LLM (Claude) and reviewed by me before posting.

Claude spot-checked the new since values against git history. 12 of the 14 files match; the two below do not.

Comment thread external/storm-hdfs/src/main/java/org/apache/storm/hdfs/trident/HdfsState.java Outdated
Comment thread storm-client/src/jvm/org/apache/storm/drpc/LinearDRPCTopologyBuilder.java Outdated
Comment thread storm-client/src/jvm/org/apache/storm/drpc/LinearDRPCTopologyBuilder.java Outdated
@rzo1

rzo1 commented Oct 22, 2026

Copy link
Copy Markdown
Contributor

@Mohit20057 friendly ping: could you have a look at @reiabreu's review? Two of the since values (HdfsState#addRotationAction and the two LinearDRPCTopologyBuilder#addBolt methods) don't match the git history yet. Thanks!

@Mohit20057

Copy link
Copy Markdown
Contributor Author

Hi @rzo1 @reiabreu,

Thank you for checking the git history! In the latest commit:

  • HdfsState#addRotationAction has been corrected to @Deprecated(since = "1.0.0", forRemoval = true).
  • Both LinearDRPCTopologyBuilder#addBolt overloads have been updated to @Deprecated(forRemoval = true) without the inaccurate since = "2.0.0".

@rzo1
rzo1 force-pushed the classify-server-deprecated-apis branch from d1ff9c9 to aea1305 Compare October 22, 2026 19:38
@rzo1

rzo1 commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Thanks, the since values I checked all match the tags now.

Two decisions I'd question:

  1. HdfsFileOptions.addRotationAction is marked forRemoval=true without a replacement, while the feature still works and the SequenceFileOptions variant is not deprecated and is documented in storm-hdfs.md. Maybe forRemoval=false, or a short rationale?
  2. NodeSortType.GENERIC_RAS/DEFAULT_RAS are marked for removal, but the public *ResourceAwareStrategyOld classes that use them are not deprecated. Should those be deprecated too?

The description still mentions the old since values and getStatus, which no longer match the diff. Nit: forRemoval on private members (e.g. in Flux, NodeSorter) has no effect for API users. The conflicts are from #9184 and look trivial.

@Mohit20057
Mohit20057 force-pushed the classify-server-deprecated-apis branch from aea1305 to 406c592 Compare October 25, 2026 16:55
@Mohit20057

Copy link
Copy Markdown
Contributor Author

@rzo1 Thanks for the review! I have updated the branch to address all the points:

  1. HdfsFileOptions#addRotationAction: Updated to @Deprecated(since = "1.0.0", forRemoval = false) with updated Javadoc noting it is retained for backwards compatibility.
  2. BaseResourceAwareStrategy.NodeSortType (GENERIC_RAS, DEFAULT_RAS): Changed to forRemoval = false. Also annotated GenericResourceAwareStrategyOld and DefaultResourceAwareStrategyOld with @Deprecated(since = "2.3.0", forRemoval = false) directing users to the current non-"Old" strategies.
  3. Flux.java & NodeSorter* private members: Removed (since = "...", forRemoval = true) on private fields and private methods so they remain standard @Deprecated without affecting public API contracts.
  4. Rebased onto latest master, resolved merge conflicts in StormMetricRegistry and StormReporter, and verified test compilation with JDK 23 (0 Checkstyle violations).

@rzo1 rzo1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @Mohit20057 for addressing all the points. LGTM.

@reiabreu
reiabreu merged commit 88aa8b1 into apache:master Oct 25, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants