Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E06F41795E for ; Mon, 22 Jun 2015 09:14:00 +0000 (UTC) Received: (qmail 36815 invoked by uid 500); 22 Jun 2015 09:14:00 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 36779 invoked by uid 500); 22 Jun 2015 09:14:00 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 36747 invoked by uid 99); 22 Jun 2015 09:14:00 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 22 Jun 2015 09:14:00 +0000 Date: Mon, 22 Jun 2015 09:14:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-2124) FromElementsFunction is not really Serializable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-2124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14595557#comment-14595557 ] ASF GitHub Bot commented on FLINK-2124: --------------------------------------- Github user jreiffers commented on a diff in the pull request: https://github.com/apache/flink/pull/848#discussion_r32916595 --- Diff: flink-staging/flink-streaming/flink-streaming-core/src/main/java/org/apache/flink/streaming/api/functions/source/FromElementsFunction.java --- @@ -17,37 +17,81 @@ package org.apache.flink.streaming.api.functions.source; -import java.util.Arrays; -import java.util.Collection; +import org.apache.flink.api.common.typeutils.TypeSerializer; +import org.apache.flink.core.memory.DataInputView; +import org.apache.flink.core.memory.InputViewDataInputStreamWrapper; +import org.apache.flink.core.memory.OutputViewDataOutputStreamWrapper; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; import java.util.Iterator; public class FromElementsFunction implements SourceFunction { private static final long serialVersionUID = 1L; - private Iterable iterable; + private final TypeSerializer serializer; + private final byte[] elements; private volatile boolean isRunning = true; - public FromElementsFunction(T... elements) { - this.iterable = Arrays.asList(elements); - } + public FromElementsFunction(TypeSerializer serializer, final T... elements) { + this(serializer, new Iterable() { --- End diff -- As it turns out, it actually doesn't... the more you know! > FromElementsFunction is not really Serializable > ----------------------------------------------- > > Key: FLINK-2124 > URL: https://issues.apache.org/jira/browse/FLINK-2124 > Project: Flink > Issue Type: Bug > Components: Streaming > Reporter: Aljoscha Krettek > Assignee: Johannes Reifferscheid > > The function stores an Iterable of T. T is not necessarily Serializable and and Iterable is also not necessarily Serializable. -- This message was sent by Atlassian JIRA (v6.3.4#6332)