[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/8169ff5d
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/8169ff5d
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/8169ff5d

Branch: refs/heads/release-1.5
Commit: 8169ff5d471c2af342cd38d132c383262be798b2
Parents: 3d0abd2
Author: gyao <[email protected]>
Authored: Mon Mar 12 15:44:27 2018 +0100
Committer: Till Rohrmann <[email protected]>
Committed: Tue Mar 13 19:00:32 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/8169ff5d/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/8169ff5d/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);
        }
 

Reply via email to