From 6650d74588d326121f9e5925c5e845ece691dc68 Mon Sep 17 00:00:00 2001 From: hequn8128 Date: Wed, 19 Dec 2018 11:26:52 +0800 Subject: [PATCH] [FLINK-11197][tests] Improve migration test comments about how to generate snapshots --- .../connectors/fs/bucketing/BucketingSinkMigrationTest.java | 1 + .../connectors/kafka/FlinkKafkaConsumerBaseMigrationTest.java | 1 + .../connectors/kinesis/FlinkKinesisConsumerMigrationTest.java | 1 + .../flink/hdfstests/ContinuousFileProcessingMigrationTest.java | 1 + .../java/org/apache/flink/cep/operator/CEPMigrationTest.java | 1 + .../runtime/operators/windowing/WindowOperatorMigrationTest.java | 1 + .../utils/LegacyStatefulJobSavepointMigrationITCase.java | 1 + .../checkpointing/utils/StatefulJobSavepointMigrationITCase.java | 1 + .../utils/StatefulJobWBroadcastStateMigrationITCase.java | 1 + .../test/migration/TypeSerializerSnapshotMigrationITCase.java | 1 + .../scala/migration/StatefulJobSavepointMigrationITCase.scala | 1 + .../migration/StatefulJobWBroadcastStateMigrationITCase.scala | 1 + 12 files changed, 12 insertions(+) diff --git a/flink-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSinkMigrationTest.java b/flink-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSinkMigrationTest.java index fb0796aec6c..44be702bccd 100644 --- a/flink-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSinkMigrationTest.java +++ b/flink-connectors/flink-connector-filesystem/src/test/java/org/apache/flink/streaming/connectors/fs/bucketing/BucketingSinkMigrationTest.java @@ -69,6 +69,7 @@ public class BucketingSinkMigrationTest { /** * TODO change this to the corresponding savepoint version to be written (e.g. {@link MigrationVersion#v1_3} for 1.3) * TODO and remove all @Ignore annotations on write*Snapshot() methods to generate savepoints + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = null; diff --git a/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseMigrationTest.java b/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseMigrationTest.java index decb5cfebe3..be468a0237c 100644 --- a/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseMigrationTest.java +++ b/flink-connectors/flink-connector-kafka-base/src/test/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBaseMigrationTest.java @@ -79,6 +79,7 @@ public class FlinkKafkaConsumerBaseMigrationTest { /** * TODO change this to the corresponding savepoint version to be written (e.g. {@link MigrationVersion#v1_3} for 1.3) * TODO and remove all @Ignore annotations on write*Snapshot() methods to generate savepoints + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = null; diff --git a/flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumerMigrationTest.java b/flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumerMigrationTest.java index 9a6d2d66a6f..e21a880100c 100644 --- a/flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumerMigrationTest.java +++ b/flink-connectors/flink-connector-kinesis/src/test/java/org/apache/flink/streaming/connectors/kinesis/FlinkKinesisConsumerMigrationTest.java @@ -76,6 +76,7 @@ public class FlinkKinesisConsumerMigrationTest { /** * TODO change this to the corresponding savepoint version to be written (e.g. {@link MigrationVersion#v1_3} for 1.3) * TODO and remove all @Ignore annotations on the writeSnapshot() method to generate savepoints + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = null; diff --git a/flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingMigrationTest.java b/flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingMigrationTest.java index 1161368f073..7f7e0c50dc3 100644 --- a/flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingMigrationTest.java +++ b/flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingMigrationTest.java @@ -87,6 +87,7 @@ public class ContinuousFileProcessingMigrationTest { /** * TODO change this to the corresponding savepoint version to be written (e.g. {@link MigrationVersion#v1_3} for 1.3) * TODO and remove all @Ignore annotations on write*Snapshot() methods to generate savepoints + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = null; diff --git a/flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPMigrationTest.java b/flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPMigrationTest.java index 51c4ad0c1e1..061a3c655a6 100644 --- a/flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPMigrationTest.java +++ b/flink-libraries/flink-cep/src/test/java/org/apache/flink/cep/operator/CEPMigrationTest.java @@ -64,6 +64,7 @@ public class CEPMigrationTest { /** * TODO change this to the corresponding savepoint version to be written (e.g. {@link MigrationVersion#v1_3} for 1.3) * TODO and remove all @Ignore annotations on write*Snapshot() methods to generate savepoints + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = null; diff --git a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperatorMigrationTest.java b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperatorMigrationTest.java index c27d6418ae4..0168a7b81be 100644 --- a/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperatorMigrationTest.java +++ b/flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/operators/windowing/WindowOperatorMigrationTest.java @@ -100,6 +100,7 @@ public class WindowOperatorMigrationTest { /** * TODO change this to the corresponding savepoint version to be written (e.g. {@link MigrationVersion#v1_3} for 1.3) * TODO and remove all @Ignore annotations on write*Snapshot() methods to generate savepoints + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = null; diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/LegacyStatefulJobSavepointMigrationITCase.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/LegacyStatefulJobSavepointMigrationITCase.java index eee13500e3c..641689a5ae8 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/LegacyStatefulJobSavepointMigrationITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/LegacyStatefulJobSavepointMigrationITCase.java @@ -82,6 +82,7 @@ public class LegacyStatefulJobSavepointMigrationITCase extends SavepointMigratio * TODO to generate savepoints for a specific Flink version / backend type, * TODO change these values accordingly, e.g. to generate for 1.3 with RocksDB, * TODO set as (MigrationVersion.v1_3, StateBackendLoader.ROCKSDB_STATE_BACKEND_NAME) + * TODO Note: You should generate the savepoint based on the release branch instead of the master. */ private final MigrationVersion flinkGenerateSavepointVersion = MigrationVersion.v1_4; private final String flinkGenerateSavepointBackendType = StateBackendLoader.ROCKSDB_STATE_BACKEND_NAME; diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobSavepointMigrationITCase.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobSavepointMigrationITCase.java index 4f3d274a381..e3bc43b749d 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobSavepointMigrationITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobSavepointMigrationITCase.java @@ -72,6 +72,7 @@ public class StatefulJobSavepointMigrationITCase extends SavepointMigrationTestB } // TODO change this to PERFORM_SAVEPOINT to regenerate binary savepoints + // TODO Note: You should generate the savepoint based on the release branch instead of the master. private final ExecutionMode executionMode = ExecutionMode.VERIFY_SAVEPOINT; @Parameterized.Parameters(name = "Migrate Savepoint / Backend: {0}") diff --git a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobWBroadcastStateMigrationITCase.java b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobWBroadcastStateMigrationITCase.java index da63b9b3096..456c34f9a1d 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobWBroadcastStateMigrationITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/checkpointing/utils/StatefulJobWBroadcastStateMigrationITCase.java @@ -56,6 +56,7 @@ public class StatefulJobWBroadcastStateMigrationITCase extends SavepointMigratio private static final int NUM_SOURCE_ELEMENTS = 4; // TODO change this to PERFORM_SAVEPOINT to regenerate binary savepoints + // TODO Note: You should generate the savepoint based on the release branch instead of the master. private final StatefulJobSavepointMigrationITCase.ExecutionMode executionMode = StatefulJobSavepointMigrationITCase.ExecutionMode.VERIFY_SAVEPOINT; diff --git a/flink-tests/src/test/java/org/apache/flink/test/migration/TypeSerializerSnapshotMigrationITCase.java b/flink-tests/src/test/java/org/apache/flink/test/migration/TypeSerializerSnapshotMigrationITCase.java index ac318722979..377cea09ff4 100644 --- a/flink-tests/src/test/java/org/apache/flink/test/migration/TypeSerializerSnapshotMigrationITCase.java +++ b/flink-tests/src/test/java/org/apache/flink/test/migration/TypeSerializerSnapshotMigrationITCase.java @@ -73,6 +73,7 @@ public class TypeSerializerSnapshotMigrationITCase extends SavepointMigrationTes } // TODO change this to PERFORM_SAVEPOINT to regenerate binary savepoints + // TODO Note: You should generate the savepoint based on the release branch instead of the master. private final ExecutionMode executionMode = ExecutionMode.VERIFY_SAVEPOINT; @Parameterized.Parameters(name = "Migrate Savepoint / Backend: {0}") diff --git a/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobSavepointMigrationITCase.scala b/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobSavepointMigrationITCase.scala index 42db4e47264..71514771454 100644 --- a/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobSavepointMigrationITCase.scala +++ b/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobSavepointMigrationITCase.scala @@ -66,6 +66,7 @@ object StatefulJobSavepointMigrationITCase { // TODO to generate savepoints for a specific Flink version / backend type, // TODO change these values accordingly, e.g. to generate for 1.3 with RocksDB, // TODO set as (MigrationVersion.v1_3, StateBackendLoader.ROCKSDB_STATE_BACKEND_NAME) + // TODO Note: You should generate the savepoint based on the release branch instead of the master. val GENERATE_SAVEPOINT_VER: MigrationVersion = MigrationVersion.v1_4 val GENERATE_SAVEPOINT_BACKEND_TYPE: String = StateBackendLoader.ROCKSDB_STATE_BACKEND_NAME diff --git a/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobWBroadcastStateMigrationITCase.scala b/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobWBroadcastStateMigrationITCase.scala index 4d9af6fca3f..e790a72833f 100644 --- a/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobWBroadcastStateMigrationITCase.scala +++ b/flink-tests/src/test/scala/org/apache/flink/api/scala/migration/StatefulJobWBroadcastStateMigrationITCase.scala @@ -64,6 +64,7 @@ object StatefulJobWBroadcastStateMigrationITCase { // TODO to generate savepoints for a specific Flink version / backend type, // TODO change these values accordingly, e.g. to generate for 1.3 with RocksDB, // TODO set as (MigrationVersion.v1_3, StateBackendLoader.ROCKSDB_STATE_BACKEND_NAME) + // TODO Note: You should generate the savepoint based on the release branch instead of the master. val GENERATE_SAVEPOINT_VER: MigrationVersion = MigrationVersion.v1_7 val GENERATE_SAVEPOINT_BACKEND_TYPE: String = StateBackendLoader.MEMORY_STATE_BACKEND_NAME -- GitLab