-
Notifications
You must be signed in to change notification settings - Fork 171
/
__classNamePrefix__Program.java
38 lines (29 loc) · 1.13 KB
/
__classNamePrefix__Program.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.pe.processor.${packageName};
import ${package}.config.Config;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.streampipes.model.runtime.Event;
import org.apache.streampipes.wrapper.flink.FlinkDataProcessorRuntime;
import org.apache.streampipes.wrapper.flink.FlinkDeploymentConfig;
import java.io.Serializable;
public class ${classNamePrefix}Program extends
FlinkDataProcessorRuntime<${classNamePrefix}Parameters>
implements Serializable {
private static final long serialVersionUID = 1L;
public ${classNamePrefix}Program(${classNamePrefix}Parameters params, boolean debug) {
super(params, debug);
}
@Override
protected FlinkDeploymentConfig getDeploymentConfig() {
return new FlinkDeploymentConfig(Config.JAR_FILE,
Config.INSTANCE.getFlinkHost(), Config.INSTANCE.getFlinkPort());
}
@Override
protected DataStream<Event> getApplicationLogic(
DataStream<Event>... messageStream) {
return messageStream[0]
.flatMap(new ${classNamePrefix}());
}
}