Seth Wiesman created FLINK-13541:
------------------------------------

             Summary: State Processor Api sets the wrong key selector when 
writing savepoints
                 Key: FLINK-13541
                 URL: https://issues.apache.org/jira/browse/FLINK-13541
             Project: Flink
          Issue Type: Bug
          Components: API / DataStream, Runtime / State Backends
            Reporter: Seth Wiesman
             Fix For: 1.9.0, 1.10.0


The state processor api is setting the wrong key selector for its StreamConfig 
when writing savepoints. It uses two key selectors internally that happen to 
output the same value for integer keys but not in general. 


{noformat}
Caused by: java.lang.RuntimeException: Exception occurred while setting the 
current key context.
        at 
org.apache.flink.streaming.api.operators.AbstractStreamOperator.setCurrentKey(AbstractStreamOperator.java:641)
        at 
org.apache.flink.streaming.api.operators.AbstractStreamOperator.setKeyContextElement(AbstractStreamOperator.java:627)
        at 
org.apache.flink.streaming.api.operators.AbstractStreamOperator.setKeyContextElement1(AbstractStreamOperator.java:615)
        at 
org.apache.flink.state.api.output.BoundedStreamTask.performDefaultAction(BoundedStreamTask.java:83)
        at 
org.apache.flink.streaming.runtime.tasks.mailbox.execution.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:140)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:378)
        at 
org.apache.flink.state.api.output.BoundedOneInputStreamTaskRunner.mapPartition(BoundedOneInputStreamTaskRunner.java:76)
        at 
org.apache.flink.runtime.operators.MapPartitionDriver.run(MapPartitionDriver.java:103)
        at org.apache.flink.runtime.operators.BatchTask.run(BatchTask.java:504)
        at 
org.apache.flink.runtime.operators.BatchTask.invoke(BatchTask.java:369)
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:688)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:518)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassCastException: java.lang.Integer cannot be cast to 
java.lang.String
        at 
org.apache.flink.api.common.typeutils.base.StringSerializer.serialize(StringSerializer.java:33)
        at 
org.apache.flink.contrib.streaming.state.RocksDBSerializedCompositeKeyBuilder.serializeKeyGroupAndKey(RocksDBSerializedCompositeKeyBuilder.java:159)
        at 
org.apache.flink.contrib.streaming.state.RocksDBSerializedCompositeKeyBuilder.setKeyAndKeyGroup(RocksDBSerializedCompositeKeyBuilder.java:96)
        at 
org.apache.flink.contrib.streaming.state.RocksDBKeyedStateBackend.setCurrentKey(RocksDBKeyedStateBackend.java:303)
        at 
org.apache.flink.streaming.api.operators.AbstractStreamOperator.setCurrentKey(AbstractStreamOperator.java:639)
        ... 12 more

{noformat}




--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Reply via email to