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 67B3511490 for ; Mon, 22 Sep 2014 22:12:33 +0000 (UTC) Received: (qmail 59156 invoked by uid 500); 22 Sep 2014 22:12:33 -0000 Delivered-To: apmail-flink-commits-archive@flink.apache.org Received: (qmail 59133 invoked by uid 500); 22 Sep 2014 22:12:33 -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 59124 invoked by uid 99); 22 Sep 2014 22:12:33 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 22:12:33 +0000 X-ASF-Spam-Status: No, hits=-2000.8 required=5.0 tests=ALL_TRUSTED,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; Mon, 22 Sep 2014 22:12:10 +0000 Received: (qmail 58145 invoked by uid 99); 22 Sep 2014 22:12:07 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Sep 2014 22:12:07 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id F3E878A6090; Mon, 22 Sep 2014 22:12:06 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sewen@apache.org To: commits@flink.incubator.apache.org Message-Id: <29a0ec94ca9a4f0aaf8b1d4903699208@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: Add a FAQ entry about serializability errors Date: Mon, 22 Sep 2014 22:12:06 +0000 (UTC) X-Virus-Checked: Checked by ClamAV on apache.org Repository: incubator-flink Updated Branches: refs/heads/master 1e137be52 -> 8d8372167 Add a FAQ entry about serializability errors Project: http://git-wip-us.apache.org/repos/asf/incubator-flink/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-flink/commit/8d837216 Tree: http://git-wip-us.apache.org/repos/asf/incubator-flink/tree/8d837216 Diff: http://git-wip-us.apache.org/repos/asf/incubator-flink/diff/8d837216 Branch: refs/heads/master Commit: 8d8372167bf5e3a7a23cf7e8462bec676ef81d9a Parents: 1e137be Author: Stephan Ewen Authored: Tue Sep 23 00:10:58 2014 +0200 Committer: Stephan Ewen Committed: Tue Sep 23 00:10:58 2014 +0200 ---------------------------------------------------------------------- docs/faq.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-flink/blob/8d837216/docs/faq.md ---------------------------------------------------------------------- diff --git a/docs/faq.md b/docs/faq.md index 1008499..2480a4e 100644 --- a/docs/faq.md +++ b/docs/faq.md @@ -46,7 +46,7 @@ changes of all operators as the program progresses through the operations. ### How can I figure out why a program failed? -- Thw JobManager web frontend (by default on port 8081) displays the exceptions +- The JobManager web frontend (by default on port 8081) displays the exceptions of failed tasks. - If you run the program from the command-line, task exceptions are printed to the standard error stream and shown on the console. @@ -69,6 +69,20 @@ execution. ## Errors +### Why am I getting a "NonSerializableException" ? + +All functions in Flink must be serializable, as defined by [java.io.Serializable](http://docs.oracle.com/javase/7/docs/api/java/io/Serializable.html). +Since all function interfaces are serializable, the exception means that one +of the fields used in your function is not serializable. + +In particular, if your function is an inner class, or anonymous inner class, +it contains a hidden reference to the enclosing class (usually called `this$0`, if you look +at the function in the debugger). If the enclosing class is not serializable, this is probably +the source of the error. Solutions are to +- make the function a standalone class, or a static inner class (no more reference to the enclosing class) +- make the enclosing class serializable +- use a Java 8 lambda function. + ### I get an error message saying that not enough buffers are available. How do I fix this? If you run Flink in a massively parallel setting (100+ parallel threads),