[ 
https://issues.apache.org/jira/browse/FLINK-9470?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16493667#comment-16493667
 ] 

ASF GitHub Bot commented on FLINK-9470:
---------------------------------------

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

    https://github.com/apache/flink/pull/6097#discussion_r191460316
  
    --- Diff: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/KeyedProcessOperatorTest.java
 ---
    @@ -50,6 +52,30 @@
        @Rule
        public ExpectedException expectedException = ExpectedException.none();
     
    +   @Test
    +   public void testKeyQuerying() throws Exception {
    +
    +           KeyedProcessOperator<Integer, Tuple2<Integer, String>, String> 
operator =
    --- End diff --
    
    The `OneInputStreamOperatorTestHarness` is `AutoCloseable` so I would 
recommend to go with
    ```
    try(harness=...) {
        ...
    }
    ```
    And remove the explicit call to `harness.close()`. This is a nice practice 
to start enforcing in new tests as it cleans up any leaks in case of exceptions 
and stuff.


> Allow querying the key in KeyedProcessFunction
> ----------------------------------------------
>
>                 Key: FLINK-9470
>                 URL: https://issues.apache.org/jira/browse/FLINK-9470
>             Project: Flink
>          Issue Type: Improvement
>          Components: DataStream API
>            Reporter: Aljoscha Krettek
>            Assignee: Aljoscha Krettek
>            Priority: Major
>             Fix For: 1.6.0
>
>
> {{KeyedProcessFunction.OnTimerContext}} allows querying the key of the firing 
> timer while {{KeyedProcessFunction.Context}} does not allow querying the key 
> of the event we're currently processing.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to