Skip to content
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

Support dynamic partition and ad-hoc cep runtime #28

Merged
merged 11 commits into from
Jan 16, 2019

Conversation

wujinhu
Copy link
Contributor

@wujinhu wujinhu commented Jan 15, 2019

Add dynamic partition for dynamic added rules

Related Issue: #19 #2

@wujinhu
Copy link
Contributor Author

wujinhu commented Jan 15, 2019

@haoch Please help to review this PR, thanks

@@ -298,37 +324,42 @@ public ExecutionSiddhiStream(DataStream<Tuple2<String, Object>> dataStream, Stri
* @param <T> Output type
* @return Return output stream as POJO class.
*/
public <T> DataStream<T> returns(String outStreamId, Class<T> outType) {
public <T> DataStream<Tuple2<String, T>> returns(String outStreamId, Class<T> outType) {
Copy link
Owner

Choose a reason for hiding this comment

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

Please keep DataStream<T> instead of DataStream<Tuple2<String, T>> for backward compatibility and the String key is verbose as well.

}

public DataStream<Row> returnAsRow(String outStreamId) {
return this.returnsInternal(outStreamId, TypeExtractor.createTypeInfo(Row.class));
public DataStream<Tuple2<String, Row>> returnAsRow(String outStreamId) {
Copy link
Owner

Choose a reason for hiding this comment

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

Please keep DataStream<T> instead of DataStream<Tuple2<String, T>> for backward compatibility

@@ -284,12 +304,18 @@ public ExecutionSiddhiStream(DataStream<Tuple2<String, Object>> dataStream, Stri
* @see java.util.LinkedHashMap
*/
public DataStream<Map<String, Object>> returnAsMap(String outStreamId) {
Copy link
Owner

Choose a reason for hiding this comment

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

Same

}

/**
* @param outStreamId OutStreamId
* @param <T> Output type
* @return Return output stream as POJO class.
*/
public <T> DataStream<T> returns(String outStreamId, TypeInformation<T> typeInformation) {
return returnsInternal(outStreamId, typeInformation);
public <T> DataStream<Tuple2<String, T>> returns(String outStreamId, TypeInformation<T> typeInformation) {
Copy link
Owner

Choose a reason for hiding this comment

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

Please keep DataStream<T> instead of DataStream<Tuple2<String, T>> for backward compatibility

@haoch
Copy link
Owner

haoch commented Jan 15, 2019

@wujinhu Please keep the original API for backward compasibility and add some new API for multiple stream output.

@wujinhu
Copy link
Contributor Author

wujinhu commented Jan 16, 2019

@haoch OK, I have brought interfaces back and added new interfaces.

@haoch
Copy link
Owner

haoch commented Jan 16, 2019

  • DataStream returnsX(String outputStream)
  • DataStream<Tuple<String, T>> returnsX(List outputStream)

@haoch
Copy link
Owner

haoch commented Jan 16, 2019

LGTM @wujinhu. Do you think it's ready to merge now?

@haoch haoch changed the title add dynamic partition Support dynamic partition and ad-hoc cep runtime Jan 16, 2019
@haoch haoch merged commit 0b9b83e into haoch:master Jan 16, 2019
@pranjal0811 pranjal0811 mentioned this pull request Sep 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants