Skip to content

MINOR: cleanup deprectaion annotations#6290

Merged
bbejeck merged 2 commits intoapache:trunkfrom
mjsax:minor-deprecation-annotation-cleanup
Mar 8, 2019
Merged

MINOR: cleanup deprectaion annotations#6290
bbejeck merged 2 commits intoapache:trunkfrom
mjsax:minor-deprecation-annotation-cleanup

Conversation

@mjsax
Copy link
Copy Markdown
Member

@mjsax mjsax commented Feb 19, 2019

If deprecated interface methods are inherited, the @Deprication tag should be used (instead on suppressing the deprecation warning).

Also adding comments to better explain when stuff will be fixed.

Also adding comments about deprecated ReadOnlyWindowStore methods, that we keep for WindowStore though (to avoid method removal because they are deprecated in parent interface).

Some additional side cleanup

@mjsax mjsax added the streams label Feb 19, 2019
@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Feb 19, 2019

Call for review @guozhangwang @bbejeck @vvcephei @ableegoldman

Copy link
Copy Markdown
Member

@ijuma ijuma Feb 19, 2019

Choose a reason for hiding this comment

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

Who defines this string?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

IntelliJ.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The naming convention is a bit broken (e.g it starts with a capital). Generally, it's a bit odd to be adding IDE specific values that are not standardized. For example, would we do the same for Eclipse, Atom, Visual Studio.net, etc.?

Copy link
Copy Markdown
Member Author

@mjsax mjsax Feb 19, 2019

Choose a reason for hiding this comment

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

I guess that's fair -- nobody complained so far -- we use multiple IntelliJ related suppression -- there is no guideline -- happy to define one -- if we don't want to use IntelliJ specific one, we should remove all of them.

\cc @guozhangwang @bbejeck @vvcephei @ableegoldman

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Fair point, I don't have an issue with it annotation itself, but maybe we are better off with not using an IDE specific value. Just my 2 cents though, I'll go with the majority on this one.

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.

sgtm.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@guozhangwang What does "sgtm" mean in this context? Keep the annotation or remove it?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ping @mjsax @guozhangwang this is ready for merging pending resolving this last comment regarding the annotations.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

It's still unclear to me how to proceed:

  1. remove IntelliJ suppressions?
    1a. define guidelines that only Java annotation should be use?
  2. keep the annotations?
    2a. allow for other annotations of other IDEs?

\cc @ijuma @guozhangwang

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.

@mjsax my sgtm refers to 1 + 1.a above (not a strong preference though) :) I've also synced with @ijuma just now, and he's fine with 2 if we makes sure 2.a is done and documented clearly.

So I'd suggest making a call yourself given neither of us having a strong preference and proceed.

Copy link
Copy Markdown
Contributor

@vvcephei vvcephei left a comment

Choose a reason for hiding this comment

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

Hi @mjsax , thanks for this cleanup!

I just had a couple of questions about "weaker access" suppressions, but overall, this really helps to unify the way we handle deprecations.

Thanks,
-John

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.

It looks like this field is never used outside of this class, which also implies that its value is never read. Should we just delete it?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

The NoOpProcessorContext is contained in test package and thus is built to be used in multiple tests. Thus it should be generic IMHO, even if we don't use all available "features". Thoughts?

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.

I just meant that the forwardedValues are being captured but never referenced. Therefore, we don't need to capture them. No need to maintain features in test support classes that no tests use.

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.

It looks like this field is only referenced in the constructor. Should we make it private?

Copy link
Copy Markdown
Member

@bbejeck bbejeck left a comment

Choose a reason for hiding this comment

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

Thanks for this @mjsax, LGTM. Waiting for jenkins to finish for merging.

@mjsax mjsax force-pushed the minor-deprecation-annotation-cleanup branch from 876868c to 9b2f390 Compare March 6, 2019 21:04
* @see org.apache.kafka.streams.kstream.SessionWindows
* @see org.apache.kafka.streams.processor.TimestampExtractor
*/
@InterfaceStability.Unstable
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

@guozhangwang This is a new cleanup on the side.

@mjsax
Copy link
Copy Markdown
Member Author

mjsax commented Mar 7, 2019

Test results not available any longer. Java11 failed. Java8 passed.

Retest this please.

@guozhangwang
Copy link
Copy Markdown
Contributor

LGTM. Thanks @mjsax !

@bbejeck bbejeck merged commit 3619d2f into apache:trunk Mar 8, 2019
@bbejeck
Copy link
Copy Markdown
Member

bbejeck commented Mar 8, 2019

Merged #6290 into trunk

@mjsax mjsax deleted the minor-deprecation-annotation-cleanup branch March 9, 2019 03:38
jarekr pushed a commit to confluentinc/kafka that referenced this pull request Apr 18, 2019
* warn-apache-kafka/trunk: (41 commits)
  MINOR: Avoid double null check in KStream#transform() (apache#6429)
  KAFKA-7944: Improve Suppress test coverage (apache#6382)
  KAFKA-3522: add missing guards for TimestampedXxxStore (apache#6356)
  MINOR: Change Trogdor agent's cleanup executor to a cached thread pool (apache#6309)
  KAFKA-7976; Update config before notifying controller of unclean leader update (apache#6426)
  KAFKA-7801: TopicCommand should not be able to alter transaction topic partition count
  KAFKA-8091; Wait for processor shutdown before testing removed listeners (apache#6425)
  MINOR: Update delete topics zk path in assertion error messages
  KAFKA-7939: Fix timing issue in KafkaAdminClientTest.testCreateTopicsRetryBackoff
  KAFKA-7922: Return authorized operations in Metadata request response (KIP-430 Part-2)
  MINOR: Print usage when parse fails during console producer
  MINOR: fix Scala compiler warning (apache#6417)
  KAFKA-7288; Fix check in SelectorTest to wait for no buffered bytes (apache#6415)
  KAFKA-8065: restore original input record timestamp in forward() (apache#6393)
  MINOR: cleanup deprectaion annotations (apache#6290)
  KAFKA-3522: Add TimestampedWindowStore builder/runtime classes (apache#6173)
  KAFKA-8069; Fix early expiration of offsets due to invalid loading of expire timestamp (apache#6401)
  KAFKA-8070: Increase consumer startup timeout in system tests (apache#6405)
  KAFKA-8040: Streams handle initTransactions timeout (apache#6372)
  KAFKA-7980 - Fix timing issue in SocketServerTest.testConnectionRateLimit (apache#6391)
  ...
pengxiaolong pushed a commit to pengxiaolong/kafka that referenced this pull request Jun 14, 2019
If deprecated interface methods are inherited, the @Deprication tag should be used (instead on suppressing the deprecation warning).

Reviewers:  Guozhang Wang <wangguoz@gmail.com>,  John Roesler <john@confluent.io>,  Bill Bejeck <bbejeck@gmail.com>
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.

5 participants