Hi, all. Any ideas how to fix `UnsupportedOperatio...
# troubleshooting
m
Hi, all. Any ideas how to fix
UnsupportedOperationException
? The job starts, operator collects some stats and then the job dies, apparently on rescaling op:
Copy code
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] >>> Event | Info   | JOBSTATUSCHANGED | Job status changed from CREATED to RUNNING
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (102.400mb (107374184 bytes)) is less than its min value 192.000mb (201326592 bytes), min value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] >>> Status | Info   | STABLE         | The resource deployment is considered to be stable and won't be rolled back
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Resource fully reconciled, nothing to do...
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (102.400mb (107374184 bytes)) is less than its min value 192.000mb (201326592 bytes), min value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Stabilizing until 2024-04-26 19:22:43
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Creating config map autoscaler-f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (102.400mb (107374184 bytes)) is less than its min value 192.000mb (201326592 bytes), min value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (1.000gb (1073741840 bytes)) is greater than its max value 1024.000mb (1073741824 bytes), max value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Stabilizing until 2024-04-26 19:22:43
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Resource fully reconciled, nothing to do...
[ERROR][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Job f5179d479dc1921693ffeb3797345458 failed with error: java.util.concurrent.CompletionException: java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException: Cannot rescale the given pointwise partitioner.
Did you change the partitioner to forward or rescale?
It may also help to add an explicit shuffle().
   at org.apache.flink.util.concurrent.FutureUtils.lambda$switchExecutor$23(FutureUtils.java:1305)
   at java.base/java.util.concurrent.CompletableFuture.uniHandle(Unknown Source)
   at java.base/java.util.concurrent.CompletableFuture$UniHandle.tryFire(Unknown Source)
   at java.base/java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
   at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor.lambda$handleRunAsync$4(PekkoRpcActor.java:451)
   at org.apache.flink.runtime.concurrent.ClassLoadingUtils.runWithContextClassLoader(ClassLoadingUtils.java:68)
   at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor.handleRunAsync(PekkoRpcActor.java:451)
   at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor.handleRpcMessage(PekkoRpcActor.java:218)
   at org.apache.flink.runtime.rpc.pekko.FencedPekkoRpcActor.handleRpcMessage(FencedPekkoRpcActor.java:85)
   at org.apache.flink.runtime.rpc.pekko.PekkoRpcActor.handleMessage(PekkoRpcActor.java:168)
   at org.apache.pekko.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:33)
   at org.apache.pekko.japi.pf.UnitCaseStatement.apply(CaseStatements.scala:29)
   at scala.PartialFunction.applyOrElse(PartialFunction.scala:127)
   at scala.PartialFunction.applyOrElse$(PartialFunction.scala:126)
   at org.apache.pekko.japi.pf.UnitCaseStatement.applyOrElse(CaseStatements.scala:29)
   at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:175)
   at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
   at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
   at org.apache.pekko.actor.Actor.aroundReceive(Actor.scala:547)
   at org.apache.pekko.actor.Actor.aroundReceive$(Actor.scala:545)
   at org.apache.pekko.actor.AbstractActor.aroundReceive(AbstractActor.scala:229)
   at org.apache.pekko.actor.ActorCell.receiveMessage(ActorCell.scala:590)
   at org.apache.pekko.actor.ActorCell.invoke(ActorCell.scala:557)
   at org.apache.pekko.dispatch.Mailbox.processMailbox(Mailbox.scala:280)
   at org.apache.pekko.dispatch.Mailbox.run(Mailbox.scala:241)
   at org.apache.pekko.dispatch.Mailbox.exec(Mailbox.scala:253)
   at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
   at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(Unknown Source)
   at java.base/java.util.concurrent.ForkJoinPool.scan(Unknown Source)
   at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
   at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException: Cannot rescale the given pointwise partitioner.
Did you change the partitioner to forward or rescale?
It may also help to add an explicit shuffle().
   at org.apache.flink.runtime.scheduler.adaptive.BackgroundTask.lambda$new$0(BackgroundTask.java:59)
   at java.base/java.util.concurrent.CompletableFuture$UniApply.tryFire(Unknown Source)
   at java.base/java.util.concurrent.CompletableFuture$Completion.run(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
   at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
   at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsupportedOperationException: Cannot rescale the given pointwise partitioner.
Did you change the partitioner to forward or rescale?
It may also help to add an explicit shuffle().
   at org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper$6.getOldSubtasks(SubtaskStateMapper.java:180)
   at org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper.lambda$getNewToOldSubtasksMapping$0(SubtaskStateMapper.java:202)
   at java.base/java.util.stream.IntPipeline$1$1.accept(Unknown Source)
   at java.base/java.util.stream.Streams$RangeIntSpliterator.forEachRemaining(Unknown Source)
   at java.base/java.util.Spliterator$OfInt.forEachRemaining(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
   at java.base/java.util.stream.AbstractPipeline.evaluateToArrayNode(Unknown Source)
   at java.base/java.util.stream.ReferencePipeline.toArray(Unknown Source)
   at org.apache.flink.runtime.checkpoint.RescaleMappings.of(RescaleMappings.java:139)
   at org.apache.flink.runtime.io.network.api.writer.SubtaskStateMapper.getNewToOldSubtasksMapping(SubtaskStateMapper.java:198)
   at org.apache.flink.runtime.checkpoint.TaskStateAssignment.getInputMapping(TaskStateAssignment.java:410)
   at org.apache.flink.runtime.checkpoint.StateAssignmentOperation.reDistributeInputChannelStates(StateAssignmentOperation.java:440)
   at org.apache.flink.runtime.checkpoint.StateAssignmentOperation.assignAttemptState(StateAssignmentOperation.java:206)
   at org.apache.flink.runtime.checkpoint.StateAssignmentOperation.assignStates(StateAssignmentOperation.java:146)
   at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.restoreLatestCheckpointedStateInternal(CheckpointCoordinator.java:1822)
   at org.apache.flink.runtime.checkpoint.CheckpointCoordinator.restoreInitialCheckpointIfPresent(CheckpointCoordinator.java:1742)
   at org.apache.flink.runtime.scheduler.DefaultExecutionGraphFactory.createAndRestoreExecutionGraph(DefaultExecutionGraphFactory.java:210)
   at org.apache.flink.runtime.scheduler.adaptive.AdaptiveScheduler.createExecutionGraphAndRestoreState(AdaptiveScheduler.java:1239)
   at org.apache.flink.runtime.scheduler.adaptive.AdaptiveScheduler.lambda$createExecutionGraphAndRestoreStateAsync$27(AdaptiveScheduler.java:1229)
   at org.apache.flink.runtime.scheduler.adaptive.BackgroundTask.lambda$new$0(BackgroundTask.java:57)
   ... 5 more
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] >>> Event | Info   | JOBSTATUSCHANGED | Job status changed from RUNNING to FAILED
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (102.400mb (107374184 bytes)) is less than its min value 192.000mb (201326592 bytes), min value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (1.000gb (1073741840 bytes)) is greater than its max value 1024.000mb (1073741824 bytes), max value will be used instead
INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] >>> Status | Error  | FAILED         | {"type":"org.apache.flink.util.SerializedThrowable","message":"java.util.concurrent.CompletionException: java.util.concurrent.CompletionException: java.lang.UnsupportedOperationException: ...
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Resource fully reconciled, nothing to do...
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Cleaning up FlinkDeployment
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] >>> Event | Info   | CLEANUP        | Cleaning up FlinkDeployment
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (102.400mb (107374184 bytes)) is less than its min value 192.000mb (201326592 bytes), min value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] The derived from fraction jvm overhead memory (1.000gb (1073741840 bytes)) is greater than its max value 1024.000mb (1073741824 bytes), max value will be used instead
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Cleaning up autoscaling meta data
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Deleting cluster with Foreground propagation
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Scaling JobManager Deployment to zero with 300 seconds timeout...
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Completed Scaling JobManager Deployment to zero
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Deleting JobManager Deployment with 298 seconds timeout...
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Completed Deleting JobManager Deployment
[INFO ][flink/f-d7681d0f-c093-5d8a-b5f5-2b66b4547bf6] Deleting Kubernetes HA metadata
r
I also just ran into this issue (job failures post-attempted operator autoscaling). The job eventually ends up in a state that requires manual intervention/deployment:
Copy code
Caused by: java.lang.UnsupportedOperationException: Cannot rescale the given pointwise partitioner.
Did you change the partitioner to forward or rescale?
It may also help to add an explicit shuffle().
Did you ever find a solution to this @Maxim Senin? Or anyone have any ideas? Just recently updated to the 1.8 version of the operator and all of my other jobs seem to autoscale as expected.
m
Which branch of code are you using?
r
The job itself is running against 1.17 (which is unique about this specific job) running on the 1.8 version of the operator (non-session cluster).
m
I'm using 1.18.1 & operator 1.8 now and the issue appears to have gone away.
r
I’ve gone ahead and upgraded one of the jobs that was experiencing this issue to 1.18.1:
Copy code
Caused by: java.lang.UnsupportedOperationException: Cannot rescale the given pointwise partitioner.
Did you change the partitioner to forward or rescale?
It may also help to add an explicit shuffle().
And it seems to have addressed it, however now it’s occurring with another job that’s already running on 1.18.1. Does anyone have any ideas? As soon as the job attempts to autoscale, it crashes with the above issue and requires manual restoration. The job: • Uses High Availability • Uses Unaligned Checkpointing (every 60s) • Running on Flink 1.18.1 • Uses Flink Operator 1.8 • Adaptive Autoscaling is NOT in use
It seems related to this https://issues.apache.org/jira/browse/FLINK-33123 which explicitly mentions the use of the Adaptive Autoscaler, but maybe it affects both adaptive/non-adaptive scaling events.
👍 2