You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.
MapSourceAndSinks.mapWithUpdating generates java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap') at com.hazelcast.jet.impl.execution.TaskletExecutionService$BlockingWorker.run(TaskletExecutionService.java:250)
#202
Open
sebvige opened this issue
Jun 30, 2019
· 5 comments
Please share the entire code of the pipeline. Is the type parameter of the source (at drawFrom) correct, does it correspond to the actual type of data in the source?
I suspect that the sink map already contains items with Integer type. The sink map has to be of type <Integer, String> and all items in it have to match the signature. If you share the stack trace of the exception I could confirm.
Here is the stack trace :
------------Map with Updating ----------------
25:31,512 [192.168.1.17]:5704 [jet] [3.1.1-SNAPSHOT] class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.String (java.lang.Integer and java.lang.String are in module java.base of loader 'bootstrap')
at com.hazelcast.jet.function.BiFunctionEx.apply(BiFunctionEx.java:43)
at com.hazelcast.jet.impl.connector.HazelcastWriters$ApplyFnEntryProcessor.handle(HazelcastWriters.java:647)
at com.hazelcast.jet.impl.connector.HazelcastWriters$ApplyFnEntryProcessor.process(HazelcastWriters.java:639)
at com.hazelcast.map.impl.operation.EntryOperator.process(EntryOperator.java:318)
at com.hazelcast.map.impl.operation.EntryOperator.operateOnKeyValueInternal(EntryOperator.java:181)
at com.hazelcast.map.impl.operation.EntryOperator.operateOnKey(EntryOperator.java:166)
at com.hazelcast.map.impl.operation.MultipleEntryOperation.run(MultipleEntryOperation.java:76)
at com.hazelcast.spi.Operation.call(Operation.java:170)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.call(OperationRunnerImpl.java:210)
at com.hazelcast.spi.impl.operationservice.impl.OperationRunnerImpl.run(OperationRunnerImpl.java:199)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:147)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:177)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.process(OperationThread.java:131)
at com.hazelcast.spi.impl.operationexecutor.impl.OperationThread.run(OperationThread.java:110)
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at com.hazelcast.jet.function.BiFunctionEx.apply(BiFunctionEx.java:41)
at com.hazelcast.jet.impl.connector.HazelcastWriters$ApplyFnEntryProcessor.handle(HazelcastWriters.java:647)
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Running the mapWithUpdating "as is " generates the exception described above.
Changing String.valueOf(e.getValue()) to e.getValue()
and
? oldValue +"--even"
: oldValue +"--odd"
to
? oldValue
: oldValue
makes the code running ok but with no parsing and suffixing
The text was updated successfully, but these errors were encountered: