Return-Path: X-Original-To: apmail-camel-issues-archive@minotaur.apache.org Delivered-To: apmail-camel-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 28F721979C for ; Fri, 29 Apr 2016 02:46:14 +0000 (UTC) Received: (qmail 43568 invoked by uid 500); 29 Apr 2016 02:46:13 -0000 Delivered-To: apmail-camel-issues-archive@camel.apache.org Received: (qmail 43393 invoked by uid 500); 29 Apr 2016 02:46:13 -0000 Mailing-List: contact issues-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list issues@camel.apache.org Received: (qmail 42916 invoked by uid 99); 29 Apr 2016 02:46:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Apr 2016 02:46:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0B2A72C1F54 for ; Fri, 29 Apr 2016 02:46:13 +0000 (UTC) Date: Fri, 29 Apr 2016 02:46:13 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@camel.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CAMEL-9869) Create Apache Flink Component 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/CAMEL-9869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15263442#comment-15263442 ] ASF GitHub Bot commented on CAMEL-9869: --------------------------------------- GitHub user sbcd90 opened a pull request: https://github.com/apache/camel/pull/969 [CAMEL-9869] Create Apache Flink Component @davsclaus Created the .adoc file. Please review. You can merge this pull request into a Git repository by running: $ git pull https://github.com/sbcd90/camel CAMEL-9869 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/camel/pull/969.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #969 ---- commit d0eb5e7295242a8cc59143a20a1bd7580e621957 Author: Subhobrata Dey Date: 2016-04-29T02:40:04Z [CAMEL-9869] Create Apache Flink Component ---- > Create Apache Flink Component > ----------------------------- > > Key: CAMEL-9869 > URL: https://issues.apache.org/jira/browse/CAMEL-9869 > Project: Camel > Issue Type: New Feature > Components: camel-flink > Reporter: Subhobrata Dey > Assignee: Claus Ibsen > Fix For: 2.18.0 > > > Hello, > I have created an Apache Flink component for Camel which makes it easier to use Flink for analytics. One can use DataSet callbacks with Spring beans/OSGI services. > Using Spring's application context, it can be accessed like > {noformat} > @Bean > public DataSetCallback countLinesContaining() { > return new DataSetCallback() { > public Long onDataSet(DataSet dataSet, Object... objects) { > try { > dataSet.print(); > return new Long(0); > } catch (Exception e) { > return new Long(-1); > } > } > }; > } > @Bean > public DataSet myDataSet() { > final ExecutionEnvironment env = ExecutionEnvironment.getExecutionEnvironment(); > DataSet text = env.fromElements( > "Who's there?", > "I think I hear them. Stand ho! Who's there?"); > return text; > } > {noformat} > The results can be accessed like > {noformat} > Long count = template.requestBody("flink:dataSet?dataSet=#myDataSet&dataSetCallback=#countLinesContaining", pattern, Long.class); > {noformat} > Please review & accept my contribution. -- This message was sent by Atlassian JIRA (v6.3.4#6332)