-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[STORM-3685] Detect and prevent cycles when Topology is submitted. #3322
Merged
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ffcf116
[STORM-3685] Detect and prevent cycles when Topology is submitted.
0139cbf
[STORM-3685] Warn instead of rejecting Topology with cycles.
91f97dc
[STORM-3685] Exclude diamonds and add a complex cycle(s) test case.
4117a14
[STORM-3685] Fix NPE in a new test and add randomized 100 randomized …
4a29dac
[STORM-3685] Missing spouts not signaled as error. Randomize spout/bo…
cc7a66d
[STORM-3685] Add new method StormCommon.validateCycleFree() and use i…
77e79fc
[STORM-3685] Remove unused imports and unused private static method; …
c34bf1b
[STORM-3685] Move validateCycleFree() to Utils and throw WrappedInval…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this is not the right place to detect cycles. We should probably put it in another function, like
StormCommon.validateBasic
https://git.vzbuilders.com/storm/storm/blob/master/storm-client/src/jvm/org/apache/storm/daemon/StormCommon.java#L156
or create a new method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created new method StormCommon.validateCycleFree
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moving it to Utils is also okay, like
Utils.validateTopologyBlobStoreMap
Utils.validateTopologyName
etc.
Probably makes more sense since
findComponentCycles
is implemented inside Utils.And we could make
Utils.findComponentCycles
"@VisibleForTesting". So the public method will be onlyUtils. validateCycleFree
and the internal implementation can be changed if we'd like in the future.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bipinprasad
Sorry for not being clear at the first comment. What do you think about moving it to Utils?^ Trying to not expose too many public methods. Also StormCommon is
org.apache.storm.daemon.StormCommon
. StormSubmitter is completely on client side. I feel like Utils is a better place for this.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. Will switch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Moved from StormCommons to Utils.