You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tr...@apache.org on 2018/03/14 08:40:44 UTC

[2/3] flink git commit: [FLINK-7521][flip6] Remove RestServerEndpoint#MAX_REQUEST_SIZE_BYTES

[FLINK-7521][flip6] Remove RestServerEndpoint#MAX_REQUEST_SIZE_BYTES


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/9905700a
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/9905700a
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/9905700a

Branch: refs/heads/master
Commit: 9905700ad3f461d93862eb469ccda1682351579f
Parents: 6f46d6d
Author: gyao <ga...@data-artisans.com>
Authored: Mon Mar 12 15:44:27 2018 +0100
Committer: Till Rohrmann <tr...@apache.org>
Committed: Wed Mar 14 09:37:51 2018 +0100

----------------------------------------------------------------------
 .../org/apache/flink/runtime/rest/RestServerEndpoint.java   | 1 -
 .../runtime/rest/messages/job/JobSubmitRequestBody.java     | 9 +--------
 2 files changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/9905700a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java
index 42af4c6..8b39250 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/RestServerEndpoint.java
@@ -69,7 +69,6 @@ import java.util.concurrent.TimeoutException;
  */
 public abstract class RestServerEndpoint {
 
-	public static final int MAX_REQUEST_SIZE_BYTES = 1024 * 1024 * 10;
 	protected final Logger log = LoggerFactory.getLogger(getClass());
 
 	private final Object lock = new Object();

http://git-wip-us.apache.org/repos/asf/flink/blob/9905700a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/JobSubmitRequestBody.java
----------------------------------------------------------------------
diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/JobSubmitRequestBody.java b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/JobSubmitRequestBody.java
index c472ff1..3f550f0 100644
--- a/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/JobSubmitRequestBody.java
+++ b/flink-runtime/src/main/java/org/apache/flink/runtime/rest/messages/job/JobSubmitRequestBody.java
@@ -19,7 +19,6 @@
 package org.apache.flink.runtime.rest.messages.job;
 
 import org.apache.flink.runtime.jobgraph.JobGraph;
-import org.apache.flink.runtime.rest.RestServerEndpoint;
 import org.apache.flink.runtime.rest.messages.RequestBody;
 import org.apache.flink.util.Preconditions;
 
@@ -52,13 +51,7 @@ public final class JobSubmitRequestBody implements RequestBody {
 
 	@JsonCreator
 	public JobSubmitRequestBody(
-		@JsonProperty(FIELD_NAME_SERIALIZED_JOB_GRAPH) byte[] serializedJobGraph) {
-
-		// check that job graph can be read completely by the HttpObjectAggregator on the server
-		// we subtract 1024 bytes to account for http headers and such.
-		if (serializedJobGraph.length > RestServerEndpoint.MAX_REQUEST_SIZE_BYTES - 1024) {
-			throw new IllegalArgumentException("Serialized job graph exceeded max request size.");
-		}
+			@JsonProperty(FIELD_NAME_SERIALIZED_JOB_GRAPH) byte[] serializedJobGraph) {
 		this.serializedJobGraph = Preconditions.checkNotNull(serializedJobGraph);
 	}