xintongsong commented on code in PR #23026: URL: https://github.com/apache/flink/pull/23026#discussion_r1283896762
########## flink-examples/flink-examples-batch/src/main/java/org/apache/flink/examples/java/clustering/KMeans.java: ########## @@ -77,12 +80,23 @@ * <li>Broadcast variables in bulk iterations * <li>Custom Java objects (POJOs) * </ul> + * + * <p>Note: All Flink DataSet APIs are deprecated since Flink 1.18 and will be removed in a future + * Flink major version. You can still build your application in DataSet, but you should move to + * either the DataStream and/or Table API. This class is retained for testing purposes. */ @SuppressWarnings("serial") public class KMeans { + private static final Logger LOGGER = LoggerFactory.getLogger(KMeans.class); + public static void main(String[] args) throws Exception { + LOGGER.warn( + "All Flink DataSet APIs are deprecated since Flink 1.18 and will be removed in a future" + + " Flink major version. You can still build your application in DataSet, but you should move to" + + " either the DataStream and/or Table API. This class is retained for testing purposes."); Review Comment: Can we deduplicate the warning message somewhere? ########## flink-core/src/main/java/org/apache/flink/api/common/ExecutionConfig.java: ########## @@ -544,6 +544,13 @@ public ExecutionConfig setExecutionRetryDelay(long executionRetryDelay) { * <p>The default execution mode is {@link ExecutionMode#PIPELINED}. * * @param executionMode The execution mode to use. + * @deprecated The {@link ExecutionMode} is deprecated because it's only used in DataSet APIs. + * All Flink DataSet APIs are deprecated since Flink 1.18 and will be removed in a future + * Flink major version. You can still build your application in DataSet, but you should move + * to either the DataStream and/or Table API. + * @see <a href="https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=158866741"> + * FLIP-131: Consolidate the user-facing Dataflow SDKs/APIs (and deprecate the DataSet + * API</a> */ public void setExecutionMode(ExecutionMode executionMode) { Review Comment: Annotation is missing. -- 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: issues-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org