Github user kl0u commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4919#discussion_r147678569
  
    --- Diff: 
flink-streaming-java/src/main/java/org/apache/flink/streaming/api/functions/sink/TwoPhaseCommitSinkFunction.java
 ---
    @@ -79,19 +92,18 @@
         * TwoPhaseCommitSinkFunction(TypeInformation.of(new 
TypeHint<State<TXN, CONTEXT>>() {}));
         * }
         * </pre>
    -    * @param stateTypeInformation {@link TypeInformation} for POJO holding 
state of opened transactions.
    -    */
    -   public TwoPhaseCommitSinkFunction(TypeInformation<State<TXN, CONTEXT>> 
stateTypeInformation) {
    -           this(new ListStateDescriptor<State<TXN, CONTEXT>>("state", 
stateTypeInformation));
    -   }
    -
    -   /**
    -    * Instantiate {@link TwoPhaseCommitSinkFunction} with custom state 
descriptors.
         *
    -    * @param stateDescriptor descriptor for transactions POJO.
    +    * @param transactionSerializer {@link TypeSerializer} for the 
transaction type of this sink
    +    * @param contextSerializer {@link TypeSerializer} for the context type 
of this sink
         */
    -   public TwoPhaseCommitSinkFunction(ListStateDescriptor<State<TXN, 
CONTEXT>> stateDescriptor) {
    -           this.stateDescriptor = requireNonNull(stateDescriptor, 
"stateDescriptor is null");
    +   public TwoPhaseCommitSinkFunction(
    --- End diff --
    
    I know this is not part of this PR, but lines 81, 82, 84 should be 
`transient`.


---

Reply via email to