You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/04/16 03:35:19 UTC

[GitHub] [incubator-seatunnel] BenJFan commented on issue #1702: [Bug] [Connector] Use Console sink will submit two job in flink cluster

BenJFan commented on issue #1702:
URL: https://github.com/apache/incubator-seatunnel/issues/1702#issuecomment-1100525181

   > @BenJFan I find this may be caused by we have added two `DataSink` in `ConsoleSink`?
   > 
   > https://github.com/apache/incubator-seatunnel/blob/3a4ef4c60d8397fbf7ee7b16a06494072d3f0245/seatunnel-connectors/seatunnel-connectors-flink/seatunnel-connector-flink-console/src/main/java/org/apache/seatunnel/flink/console/sink/ConsoleSink.java#L47-L54
   > 
   > After change to below code, this bug has been fixed.
   > 
   > ```java
   >    @Override
   >     public DataSink<Row> outputBatch(FlinkEnvironment env, DataSet<Row> rowDataSet) {
   >         return rowDataSet.output(this);
   >     }
   > 
   >    @SuppressWarnings("RegexpSingleline")
   >     @Override
   >     public void writeRecord(Row record) {
   >         if (limit <= 0) {
   >             return;
   >         }
   >         System.out.println(record.toString());
   >         limit--;
   >     }
   > ```
   
   This method will make record print on TaskManager, not client side.


-- 
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: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org