Return-Path: X-Original-To: apmail-flink-user-archive@minotaur.apache.org Delivered-To: apmail-flink-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 0351B19F59 for ; Mon, 11 Apr 2016 13:42:41 +0000 (UTC) Received: (qmail 33598 invoked by uid 500); 11 Apr 2016 13:42:40 -0000 Delivered-To: apmail-flink-user-archive@flink.apache.org Received: (qmail 33509 invoked by uid 500); 11 Apr 2016 13:42:40 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@flink.apache.org Delivered-To: mailing list user@flink.apache.org Received: (qmail 33499 invoked by uid 99); 11 Apr 2016 13:42:39 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 11 Apr 2016 13:42:39 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 72CC918021D for ; Mon, 11 Apr 2016 13:42:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id miV8xCLXjqT7 for ; Mon, 11 Apr 2016 13:42:38 +0000 (UTC) Received: from mail-qg0-f54.google.com (mail-qg0-f54.google.com [209.85.192.54]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id 8E9665F20E for ; Mon, 11 Apr 2016 13:42:38 +0000 (UTC) Received: by mail-qg0-f54.google.com with SMTP id f105so120353284qge.2 for ; Mon, 11 Apr 2016 06:42:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=HZYL60FRRvmg2lfFRfGGpoBnAacKac+iVtwjnKc/Ljw=; b=IBM8lvKd9a34Ewe2yOuMKP9qg32DirEzDHzcLOWao3aodjxBolz/vOIOtWoziltnHs mG9Jxg/ZWYvAax3V7fikv2LYm0vmJLLhzHjydjMcn5LlzbUfeIkjuP5CNNLNm0NgPk1b LepxjvqDQRiiE4Iob7QgHVsxlbTjmq21cQHclHWRVLHo4SjuF1gvV7xALeFqZgdpmjqZ sbo8nqbLQIP3VYEmiCZ+ZxrOlLc28+ia+kZkGnsNQrkrE3W8BZRsh/G4mBi/lHhaopqx POeP0vOoF8ZU77xyWb26Cn5xreqrttbyGifjX3sk3YD5zL0B84bCWsGevth6n6CEvB1c 5v8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=HZYL60FRRvmg2lfFRfGGpoBnAacKac+iVtwjnKc/Ljw=; b=WPRFARNk8ik9Q9lL+kzfzV3QtjIlxxleuRCNsNTkDBEGn6BeewCsQZA09vJHHIAiie SJWzbCFaIvDqxzGqJ6TTCF9Ti/7ByMasmUVRfGRqQePjuKJRSv3abDuDzxvWk1nqZ9St ODC3nU0zXJETvdqt2AI8p5l/j4sJbdCvuVCRPB45rz5LdISEBORf5cq8nKlJNEcsbPoy jHlb72xlPT4TqM63cnTSlgaR0qxaYbN38WhJE6MEtU3beqMHh9j7wEBB0yqbhdDuvkkq uVc+/HYtkWTKh414utGPjIfZdCvByDSM7cPxxBE+yd6JsrlcNbataBwWpub+O+1/YgYN 57Ug== X-Gm-Message-State: AD7BkJJFw0dlIDwjt8ett3ylxgq4DNSDhxCPx/qLGvAzIRpzXL//GT8uVFQ+ZakVC8C9A8H3LTG/ntcV6wzrCw== MIME-Version: 1.0 X-Received: by 10.140.234.151 with SMTP id f145mr30925962qhc.51.1460382157980; Mon, 11 Apr 2016 06:42:37 -0700 (PDT) Received: by 10.55.70.70 with HTTP; Mon, 11 Apr 2016 06:42:37 -0700 (PDT) Date: Mon, 11 Apr 2016 15:42:37 +0200 Message-ID: Subject: Getting elements from DataStream From: subash basnet To: user@flink.apache.org Content-Type: multipart/alternative; boundary=001a11c0fa7ec350cc053035b7f7 --001a11c0fa7ec350cc053035b7f7 Content-Type: text/plain; charset=UTF-8 Hello all, Getting certain number of elements from DataSet is possible as below: *DataSet centroids = newDataSet.map(new TupleCentroidConverter()).first(3);* How could I get elements as above in DataStream *DataStream centroids = newDataStream.map(new TupleCentroidConverter()).???* Best Regards, Subash Basnet --001a11c0fa7ec350cc053035b7f7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Hello all,

Getting certain number of el= ements from DataSet is possible as below:
DataSet<Centroid> cen= troids =3D newDataSet.map(new TupleCentroidConverter()).first(3);

How could I get elements as above in DataStr= eam
DataStream<Centroid> centroids =3D newDataStream.map= (new TupleCentroidConverter()).???


Best Regards,
Subash Basnet
--001a11c0fa7ec350cc053035b7f7--