This is an automated email from the ASF dual-hosted git repository.

srichter pushed a commit to branch release-1.7
in repository https://gitbox.apache.org/repos/asf/flink.git


The following commit(s) were added to refs/heads/release-1.7 by this push:
     new 18c1579  [FLINK-10793][ttl] Change visibility of TtlValue and 
TtlSerializer to public for external tools
18c1579 is described below

commit 18c157970edefececbd040c438ae25cc44d47c42
Author: Stefan Richter <s.rich...@data-artisans.com>
AuthorDate: Mon Nov 5 11:39:51 2018 +0100

    [FLINK-10793][ttl] Change visibility of TtlValue and TtlSerializer to 
public for external tools
    
    This closes #7021.
---
 .../org/apache/flink/runtime/state/ttl/TtlStateFactory.java    | 10 ++++++----
 .../main/java/org/apache/flink/runtime/state/ttl/TtlValue.java | 10 +++++-----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlStateFactory.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlStateFactory.java
index 45f4e3b..0a881c7 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlStateFactory.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlStateFactory.java
@@ -188,15 +188,17 @@ public class TtlStateFactory<N, SV, S extends State, IS 
extends S> {
                }
        }
 
-       /** Serializer for user state value with TTL. */
-       private static class TtlSerializer<T> extends 
CompositeSerializer<TtlValue<T>> {
+       /**
+        * Serializer for user state value with TTL. Visibility is public for 
usage with external tools.
+        */
+       public static class TtlSerializer<T> extends 
CompositeSerializer<TtlValue<T>> {
                private static final long serialVersionUID = 
131020282727167064L;
 
-               TtlSerializer(TypeSerializer<T> userValueSerializer) {
+               public TtlSerializer(TypeSerializer<T> userValueSerializer) {
                        super(true, LongSerializer.INSTANCE, 
userValueSerializer);
                }
 
-               TtlSerializer(PrecomputedParameters precomputed, 
TypeSerializer<?> ... fieldSerializers) {
+               public TtlSerializer(PrecomputedParameters precomputed, 
TypeSerializer<?> ... fieldSerializers) {
                        super(precomputed, fieldSerializers);
                }
 
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlValue.java 
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlValue.java
index 48435d5..dba06d3 100644
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlValue.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/state/ttl/TtlValue.java
@@ -23,28 +23,28 @@ import javax.annotation.Nullable;
 import java.io.Serializable;
 
 /**
- * This class wraps user value of state with TTL.
+ * This class wraps user value of state with TTL. Visibility is public for 
usage with external tools.
  *
  * @param <T> Type of the user value of state with TTL
  */
-class TtlValue<T> implements Serializable {
+public class TtlValue<T> implements Serializable {
        private static final long serialVersionUID = 5221129704201125020L;
 
        @Nullable
        private final T userValue;
        private final long lastAccessTimestamp;
 
-       TtlValue(@Nullable T userValue, long lastAccessTimestamp) {
+       public TtlValue(@Nullable T userValue, long lastAccessTimestamp) {
                this.userValue = userValue;
                this.lastAccessTimestamp = lastAccessTimestamp;
        }
 
        @Nullable
-       T getUserValue() {
+       public T getUserValue() {
                return userValue;
        }
 
-       long getLastAccessTimestamp() {
+       public long getLastAccessTimestamp() {
                return lastAccessTimestamp;
        }
 }

Reply via email to