Return-Path: X-Original-To: apmail-flink-dev-archive@www.apache.org Delivered-To: apmail-flink-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5A4EF172BA for ; Thu, 2 Apr 2015 15:33:47 +0000 (UTC) Received: (qmail 21988 invoked by uid 500); 2 Apr 2015 15:33:47 -0000 Delivered-To: apmail-flink-dev-archive@flink.apache.org Received: (qmail 21931 invoked by uid 500); 2 Apr 2015 15:33:47 -0000 Mailing-List: contact dev-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 dev@flink.apache.org Received: (qmail 21919 invoked by uid 99); 2 Apr 2015 15:33:46 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 15:33:46 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of neutatz@googlemail.com designates 209.85.212.182 as permitted sender) Received: from [209.85.212.182] (HELO mail-wi0-f182.google.com) (209.85.212.182) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Apr 2015 15:33:22 +0000 Received: by wiaa2 with SMTP id a2so109789439wia.0 for ; Thu, 02 Apr 2015 08:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=geQqfo2kkA1/kMUN+zBXF61Yc9oUX/kN6gF8AMEj9/g=; b=dJOjupYe6QpSLDbpzTBoiTD07iIVBc9nygRw0kZvPT8dClcSUj2KVj41wGnvcqbmRP iPAHHa2z+7DIKav71NPIaMRNhOp8elqYL8/mguwmXR4zgfbfosqU9/Fbq+2dszsnJTqX PheTQItBLIDMOqb+sKu9lD22rCjq02a6RwpVWlcpJiF1iLsaMC4hpmv9pFd75Z27ET+q +fVssvYnJU+q806i1VrSuiF1HUeif7G1Fh+AHinTz1L9Y+Jd+xvWCx7TlmzJAcl2kUuz h1hr+oR6EL96iO423sAZmgq0Tx3pZ1Xo9BA1z+yOSfNKkAdzuYMoHNR/Db3QiCLx7sGI l4lQ== MIME-Version: 1.0 X-Received: by 10.180.74.112 with SMTP id s16mr25376280wiv.73.1427988800798; Thu, 02 Apr 2015 08:33:20 -0700 (PDT) Received: by 10.27.173.78 with HTTP; Thu, 2 Apr 2015 08:33:20 -0700 (PDT) Date: Thu, 2 Apr 2015 17:33:20 +0200 Message-ID: Subject: Should collect() and count() be treated as data sinks? From: Felix Neutatz To: dev@flink.apache.org Content-Type: multipart/alternative; boundary=f46d043c82563703720512bf8d20 X-Virus-Checked: Checked by ClamAV on apache.org --f46d043c82563703720512bf8d20 Content-Type: text/plain; charset=UTF-8 Hi, I have run the following program: final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); List l = Arrays.asList(new Tuple1(1L)); TypeInformation t = TypeInfoParser.parse("Tuple1"); DataSet> data = env.fromCollection(l, t); long value = data.count(); System.out.println(value); env.execute("example"); Since there is no "real" data sink, I get the following: Exception in thread "main" java.lang.RuntimeException: No data sinks have been created yet. A program needs at least one sink that consumes data. Examples are writing the data set or printing it. In my opinion, we should handle count() and collect() like print(). What do you think? Best regards, Felix --f46d043c82563703720512bf8d20--