Return-Path: X-Original-To: apmail-flink-commits-archive@minotaur.apache.org Delivered-To: apmail-flink-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C5126104A7 for ; Thu, 20 Nov 2014 16:55:29 +0000 (UTC) Received: (qmail 17260 invoked by uid 500); 20 Nov 2014 16:55:29 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 17232 invoked by uid 500); 20 Nov 2014 16:55:29 -0000 Mailing-List: contact commits-help@flink.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.incubator.apache.org Delivered-To: mailing list commits@flink.incubator.apache.org Received: (qmail 17223 invoked by uid 99); 20 Nov 2014 16:55:29 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 16:55:29 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 20 Nov 2014 16:55:28 +0000 Received: (qmail 14441 invoked by uid 99); 20 Nov 2014 16:53:53 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2014 16:53:53 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id EA897925AF4; Thu, 20 Nov 2014 16:53:52 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: fhueske@apache.org To: commits@flink.incubator.apache.org Message-Id: <8f8ca7d7af0746a9b32b77e545dd2a4a@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: incubator-flink git commit: [FLINK-1265] Fix user classloader bug for registerInputOutput() method Date: Thu, 20 Nov 2014 16:53:52 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-flink Updated Branches: refs/heads/master a77d75201 -> 4a74f3281 [FLINK-1265] Fix user classloader bug for registerInputOutput() method Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/4a74f328 Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/4a74f328 Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/4a74f328 Branch: refs/heads/master Commit: 4a74f3281bd04ed76b911d2038ea8e3d9c0b7963 Parents: a77d752 Author: Fabian Hueske Authored: Wed Nov 19 22:36:38 2014 +0100 Committer: Fabian Hueske Committed: Thu Nov 20 17:50:10 2014 +0100 ---------------------------------------------------------------------- .../flink/runtime/execution/RuntimeEnvironment.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/4a74f328/flink-runtime/src/main/java/org/apache/flink/runtime/execution/RuntimeEnvironment.java ---------------------------------------------------------------------- diff --git a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/RuntimeEnvironment.java b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/RuntimeEnvironment.java index 715bbd7..ce495d1 100644 --- a/flink-runtime/src/main/java/org/apache/flink/runtime/execution/RuntimeEnvironment.java +++ b/flink-runtime/src/main/java/org/apache/flink/runtime/execution/RuntimeEnvironment.java @@ -177,7 +177,16 @@ public class RuntimeEnvironment implements Environment, BufferProvider, LocalBuf this.taskConfiguration = tdd.getTaskConfiguration(); this.invokable.setEnvironment(this); - this.invokable.registerInputOutput(); + + // make sure that user classloader is available, because registerInputOutput might call usercode + { + Thread currentThread = Thread.currentThread(); + ClassLoader context = currentThread.getContextClassLoader(); + currentThread.setContextClassLoader(userCodeClassLoader); + this.invokable.registerInputOutput(); + + currentThread.setContextClassLoader(context); + } List inGates = tdd.getInputGates(); List outGates = tdd.getOutputGates();