This is an automated email from the ASF dual-hosted git repository.
sewen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 1ce777f [FLINK-14618][runtime] Provide the required akka framesize in
the oversized message exception
1ce777f is described below
commit 1ce777f328e064d0b36627e68f3d0d1d174d5414
Author: Jacob Sevart <[email protected]>
AuthorDate: Tue Nov 19 09:20:03 2019 -0800
[FLINK-14618][runtime] Provide the required akka framesize in the oversized
message exception
This closes #10257
---
.../org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java | 5 ++++-
.../runtime/rpc/akka/AkkaRpcActorOversizedResponseMessageTest.java | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git
a/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
b/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
index 15c5f88..44bfb3b 100644
---
a/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
+++
b/flink-runtime/src/main/java/org/apache/flink/runtime/rpc/akka/AkkaInvocationHandler.java
@@ -267,7 +267,10 @@ class AkkaInvocationHandler implements InvocationHandler,
AkkaBasedEndpoint, Rpc
args);
if (remoteRpcInvocation.getSize() >
maximumFramesize) {
- throw new IOException("The rpc
invocation size exceeds the maximum akka framesize.");
+ throw new IOException(
+ String.format(
+ "The rpc invocation
size %d exceeds the maximum akka framesize.",
+
remoteRpcInvocation.getSize()));
} else {
rpcInvocation = remoteRpcInvocation;
}
diff --git
a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorOversizedResponseMessageTest.java
b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorOversizedResponseMessageTest.java
index 119f37e..5e607bc 100644
---
a/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorOversizedResponseMessageTest.java
+++
b/flink-runtime/src/test/java/org/apache/flink/runtime/rpc/akka/AkkaRpcActorOversizedResponseMessageTest.java
@@ -84,6 +84,7 @@ public class AkkaRpcActorOversizedResponseMessageTest extends
TestLogger {
fail("Expected the RPC to fail.");
} catch (ExecutionException e) {
assertThat(ExceptionUtils.findThrowable(e,
AkkaRpcException.class).isPresent(), is(true));
+
assertThat(e.getCause().getMessage().contains(String.valueOf(FRAMESIZE)),
is(true));
}
}
@@ -107,6 +108,7 @@ public class AkkaRpcActorOversizedResponseMessageTest
extends TestLogger {
fail("Expected the RPC to fail.");
} catch (RpcException e) {
assertThat(ExceptionUtils.findThrowable(e,
AkkaRpcException.class).isPresent(), is(true));
+
assertThat(e.getCause().getMessage().contains(String.valueOf(FRAMESIZE)),
is(true));
}
}