Repository: flink
Updated Branches:
  refs/heads/master ea64921f8 -> 65ee28c34


[FLINK-4011] Keep UserCodeClassLoader in archived ExecutionGraphs

This closes #2065


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

Branch: refs/heads/master
Commit: 65ee28c3427b50f8b33b0d77de5e6c6982233c22
Parents: ea64921
Author: Robert Metzger <[email protected]>
Authored: Thu Jun 2 16:08:07 2016 +0200
Committer: Robert Metzger <[email protected]>
Committed: Wed Jun 8 11:36:41 2016 +0200

----------------------------------------------------------------------
 .../java/org/apache/flink/util/SerializedValue.java    |  2 +-
 .../flink/runtime/executiongraph/ExecutionGraph.java   |  1 -
 .../org/apache/flink/test/web/WebFrontendITCase.java   | 13 +++++++++++++
 3 files changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/65ee28c3/flink-core/src/main/java/org/apache/flink/util/SerializedValue.java
----------------------------------------------------------------------
diff --git 
a/flink-core/src/main/java/org/apache/flink/util/SerializedValue.java 
b/flink-core/src/main/java/org/apache/flink/util/SerializedValue.java
index 7bc0f09..4612c91 100644
--- a/flink-core/src/main/java/org/apache/flink/util/SerializedValue.java
+++ b/flink-core/src/main/java/org/apache/flink/util/SerializedValue.java
@@ -52,7 +52,7 @@ public class SerializedValue<T> implements 
java.io.Serializable {
        @SuppressWarnings("unchecked")
        public T deserializeValue(ClassLoader loader) throws IOException, 
ClassNotFoundException {
                if (loader == null) {
-                       throw new NullPointerException();
+                       throw new NullPointerException("No classloader has been 
passed");
                }
 
                return serializedData == null ? null : (T) 
InstantiationUtil.deserializeObject(serializedData, loader);

http://git-wip-us.apache.org/repos/asf/flink/blob/65ee28c3/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
----------------------------------------------------------------------
diff --git 
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
 
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
index 5dae785..d19f25d 100755
--- 
a/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
+++ 
b/flink-runtime/src/main/java/org/apache/flink/runtime/executiongraph/ExecutionGraph.java
@@ -943,7 +943,6 @@ public class ExecutionGraph implements Serializable {
                }
 
                // clear the non-serializable fields
-               userClassLoader = null;
                scheduler = null;
                checkpointCoordinator = null;
                executionContext = null;

http://git-wip-us.apache.org/repos/asf/flink/blob/65ee28c3/flink-tests/src/test/java/org/apache/flink/test/web/WebFrontendITCase.java
----------------------------------------------------------------------
diff --git 
a/flink-tests/src/test/java/org/apache/flink/test/web/WebFrontendITCase.java 
b/flink-tests/src/test/java/org/apache/flink/test/web/WebFrontendITCase.java
index 9cc90a1..032c8fe 100644
--- a/flink-tests/src/test/java/org/apache/flink/test/web/WebFrontendITCase.java
+++ b/flink-tests/src/test/java/org/apache/flink/test/web/WebFrontendITCase.java
@@ -238,6 +238,19 @@ public class WebFrontendITCase {
 
                        Thread.sleep(20);
                }
+
+               // ensure we can access job details when its finished 
(FLINK-4011)
+               try (HttpTestClient client = new HttpTestClient("localhost", 
port)) {
+                       FiniteDuration timeout = new FiniteDuration(30, 
TimeUnit.SECONDS);
+                       client.sendGetRequest("/jobs/" + jid + "/config", 
timeout);
+                       HttpTestClient.SimpleHttpResponse response = 
client.getNextResponse(timeout);
+
+                       assertEquals(HttpResponseStatus.OK, 
response.getStatus());
+                       assertEquals(response.getType(), 
MimeTypes.getMimeTypeForExtension("json"));
+                       assertEquals("{\"jid\":\""+jid+"\",\"name\":\"Stoppable 
streaming test job\"," +
+                                       
"\"execution-config\":{\"execution-mode\":\"PIPELINED\",\"restart-strategy\":\"default\","
 +
+                                       
"\"job-parallelism\":-1,\"object-reuse-mode\":false}}", response.getContent());
+               }
        }
 
        @Test

Reply via email to