This repository has been archived by the owner on Mar 3, 2023. It is now read-only.
[Java Streamlet API] Extend validations #3095
Merged
nlu90
merged 2 commits into
apache:master
from
erenavsarogullari:HeronPR_StreamletAPI_Validation
Nov 5, 2018
Merged
[Java Streamlet API] Extend validations #3095
nlu90
merged 2 commits into
apache:master
from
erenavsarogullari:HeronPR_StreamletAPI_Validation
Nov 5, 2018
Conversation
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
nwangtw
reviewed
Oct 29, 2018
@@ -44,6 +46,7 @@ public BuilderImpl() { | |||
|
|||
@Override | |||
public <R> Streamlet<R> newSource(SerializableSupplier<R> supplier) { | |||
Preconditions.checkNotNull(supplier, "supplier must not be null."); |
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.
why use Preconditions? require() is not enough?
We are hoping to get rid of guava library since it is too big. :(
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.
Yes, require
can be used by moving from StreamletImpl
to StreamletUtils
as the current patch
@@ -216,7 +216,7 @@ protected StreamletImpl() { | |||
|
|||
public void build(TopologyBuilder bldr, Set<String> stageNames) { | |||
if (built) { | |||
throw new RuntimeException("Logic Error While building " + getName()); | |||
throw new RuntimeException("Logic Error While building stage: " + getName()); |
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.
why "stage"?
erenavsarogullari
force-pushed
the
HeronPR_StreamletAPI_Validation
branch
from
November 1, 2018 23:13
1b81e87
to
4d91ba6
Compare
nwangtw
approved these changes
Nov 1, 2018
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.
lgtm~
huijunwu
approved these changes
Nov 2, 2018
nicknezis
pushed a commit
that referenced
this pull request
Sep 14, 2020
* Add validations to Streamlet API * Review comments are addressed.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR aims to add more validations
BuilderImpl
level to fail fast with meaningful error messageStreamlet
clone
function should accept asnumClones > 0