This is an automated email from the ASF dual-hosted git repository. mapohl pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/flink.git
commit ed79a1fc31237b96768bc45dc44b5e4a72429bf4 Author: Matthias Pohl <matthias.p...@aiven.io> AuthorDate: Thu Jul 13 14:30:32 2023 +0200 [hotfix][api] Adds @PublicEvolving to StateTtlConfig inner classes to remove ArchUnit exclusions Signed-off-by: Matthias Pohl <matthias.p...@aiven.io> --- .../archunit-violations/5b9eed8a-5fb6-4373-98ac-3be2a71941b8 | 5 ----- .../archunit-violations/7602816f-5c01-4b7a-9e3e-235dfedec245 | 7 ------- .../java/org/apache/flink/api/common/state/StateTtlConfig.java | 7 +++++++ 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/5b9eed8a-5fb6-4373-98ac-3be2a71941b8 b/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/5b9eed8a-5fb6-4373-98ac-3be2a71941b8 index 6079bb488a7..8fa69ca0639 100644 --- a/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/5b9eed8a-5fb6-4373-98ac-3be2a71941b8 +++ b/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/5b9eed8a-5fb6-4373-98ac-3be2a71941b8 @@ -9,11 +9,6 @@ org.apache.flink.api.common.state.ListStateDescriptor.getType(): Returned leaf t org.apache.flink.api.common.state.MapStateDescriptor.getType(): Returned leaf type org.apache.flink.api.common.state.StateDescriptor$Type does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated org.apache.flink.api.common.state.ReducingStateDescriptor.getType(): Returned leaf type org.apache.flink.api.common.state.StateDescriptor$Type does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated org.apache.flink.api.common.state.StateDescriptor.getType(): Returned leaf type org.apache.flink.api.common.state.StateDescriptor$Type does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig.getCleanupStrategies(): Returned leaf type org.apache.flink.api.common.state.StateTtlConfig$CleanupStrategies does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig.getStateVisibility(): Returned leaf type org.apache.flink.api.common.state.StateTtlConfig$StateVisibility does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig.getTtlTimeCharacteristic(): Returned leaf type org.apache.flink.api.common.state.StateTtlConfig$TtlTimeCharacteristic does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig.getUpdateType(): Returned leaf type org.apache.flink.api.common.state.StateTtlConfig$UpdateType does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig.newBuilder(org.apache.flink.api.common.time.Time): Returned leaf type org.apache.flink.api.common.state.StateTtlConfig$Builder does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated org.apache.flink.api.common.state.ValueStateDescriptor.getType(): Returned leaf type org.apache.flink.api.common.state.StateDescriptor$Type does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated org.apache.flink.api.common.typeinfo.PrimitiveArrayTypeInfo.createComparator(boolean, org.apache.flink.api.common.ExecutionConfig): Returned leaf type org.apache.flink.api.common.typeutils.base.array.PrimitiveArrayComparator does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated org.apache.flink.api.common.typeutils.TypeComparator.putNormalizedKey(java.lang.Object, org.apache.flink.core.memory.MemorySegment, int, int): Argument leaf type org.apache.flink.core.memory.MemorySegment does not satisfy: reside outside of package 'org.apache.flink..' or reside in any package ['..shaded..'] or annotated with @Public or annotated with @PublicEvolving or annotated with @Deprecated diff --git a/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/7602816f-5c01-4b7a-9e3e-235dfedec245 b/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/7602816f-5c01-4b7a-9e3e-235dfedec245 index 99cb8f444e3..154f0160136 100644 --- a/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/7602816f-5c01-4b7a-9e3e-235dfedec245 +++ b/flink-architecture-tests/flink-architecture-tests-production/archunit-violations/7602816f-5c01-4b7a-9e3e-235dfedec245 @@ -37,13 +37,6 @@ org.apache.flink.api.common.operators.util.OperatorValidationUtils does not sati org.apache.flink.api.common.operators.util.SlotSharingGroupUtils does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated org.apache.flink.api.common.serialization.BulkWriter$Factory does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated org.apache.flink.api.common.state.StateDescriptor$Type does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$Builder does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$CleanupStrategies does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$IncrementalCleanupStrategy does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$RocksdbCompactFilterCleanupStrategy does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$StateVisibility does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$TtlTimeCharacteristic does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated -org.apache.flink.api.common.state.StateTtlConfig$UpdateType does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated org.apache.flink.api.common.typeutils.CompositeSerializer does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated org.apache.flink.api.common.typeutils.CompositeTypeSerializerUtil$IntermediateCompatibilityResult does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated org.apache.flink.api.common.typeutils.SingleThreadAccessCheckingTypeSerializer$SingleThreadAccessCheckingTypeSerializerSnapshot does not satisfy: annotated with @Internal or annotated with @Experimental or annotated with @PublicEvolving or annotated with @Public or annotated with @Deprecated diff --git a/flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java b/flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java index b062dd29f3e..26ef85f49e1 100644 --- a/flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java +++ b/flink-core/src/main/java/org/apache/flink/api/common/state/StateTtlConfig.java @@ -61,6 +61,7 @@ public class StateTtlConfig implements Serializable { /** * This option value configures when to update last access timestamp which prolongs state TTL. */ + @PublicEvolving public enum UpdateType { /** TTL is disabled. State does not expire. */ Disabled, @@ -74,6 +75,7 @@ public class StateTtlConfig implements Serializable { } /** This option configures whether expired user value can be returned or not. */ + @PublicEvolving public enum StateVisibility { /** Return expired user value if it is not cleaned up yet. */ ReturnExpiredIfNotCleanedUp, @@ -82,6 +84,7 @@ public class StateTtlConfig implements Serializable { } /** This option configures time scale to use for ttl. */ + @PublicEvolving public enum TtlTimeCharacteristic { /** * Processing time, see also <code> @@ -171,6 +174,7 @@ public class StateTtlConfig implements Serializable { } /** Builder for the {@link StateTtlConfig}. */ + @PublicEvolving public static class Builder { private UpdateType updateType = OnCreateAndWrite; @@ -393,6 +397,7 @@ public class StateTtlConfig implements Serializable { * cleaned up on explicit read access if found expired. Currently cleanup of state full snapshot * can be additionally activated. */ + @PublicEvolving public static class CleanupStrategies implements Serializable { private static final long serialVersionUID = -1617740467277313524L; @@ -452,6 +457,7 @@ public class StateTtlConfig implements Serializable { } /** Configuration of cleanup strategy while taking the full snapshot. */ + @PublicEvolving public static class IncrementalCleanupStrategy implements CleanupStrategies.CleanupStrategy { private static final long serialVersionUID = 3109278696501988780L; @@ -482,6 +488,7 @@ public class StateTtlConfig implements Serializable { } /** Configuration of cleanup strategy using custom compaction filter in RocksDB. */ + @PublicEvolving public static class RocksdbCompactFilterCleanupStrategy implements CleanupStrategies.CleanupStrategy { private static final long serialVersionUID = 3109278796506988980L;