ruanwenjun commented on a change in pull request #1530:
URL:
https://github.com/apache/incubator-seatunnel/pull/1530#discussion_r831031966
##########
File path:
seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-fake/src/main/java/org/apache/seatunnel/flink/source/FakeSource.java
##########
@@ -52,19 +52,18 @@ public CheckResult checkConfig() {
return CheckResult.success();
}
- @Override
- public void prepare(FlinkEnvironment prepareEnv) {
-
- }
-
@Override
public DataSet<Row> getData(FlinkEnvironment env) {
Random random = new Random();
return env.getBatchTableEnvironment().toDataSet(
- env.getBatchTableEnvironment().fromValues(
- DataTypes.ROW(DataTypes.FIELD("name",
DataTypes.STRING()),
- DataTypes.FIELD("age", DataTypes.INT())),
- Arrays.stream(NAME_ARRAY).map(n -> Row.of(n,
random.nextInt(AGE_LIMIT)))
- .collect(Collectors.toList())), Row.class);
+ env.getBatchTableEnvironment().fromValues(
+ DataTypes.ROW(DataTypes.FIELD("name", DataTypes.STRING()),
+ DataTypes.FIELD("age", DataTypes.INT())),
+ Arrays.stream(NAME_ARRAY).map(n -> Row.of(n,
random.nextInt(AGE_LIMIT)))
+ .collect(Collectors.toList())), Row.class);
+ }
+
+ public void close() throws Exception {
+ System.out.println("FakeSource close");
Review comment:
Thanks for your review, done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]