Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A18AF200D37 for ; Thu, 9 Nov 2017 15:01:25 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id A06CC160C02; Thu, 9 Nov 2017 14:01:25 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BF33B1609E5 for ; Thu, 9 Nov 2017 15:01:24 +0100 (CET) Received: (qmail 32842 invoked by uid 500); 9 Nov 2017 14:01:23 -0000 Mailing-List: contact user-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list user@flink.apache.org Received: (qmail 32832 invoked by uid 99); 9 Nov 2017 14:01:23 -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; Thu, 09 Nov 2017 14:01:23 +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 D626E1807A9 for ; Thu, 9 Nov 2017 14:01:22 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.979 X-Spam-Level: * X-Spam-Status: No, score=1.979 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=data-artisans-com.20150623.gappssmtp.com Received: from mx1-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 5t35GLnz-w7k for ; Thu, 9 Nov 2017 14:01:21 +0000 (UTC) Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 2966A5FD47 for ; Thu, 9 Nov 2017 14:01:21 +0000 (UTC) Received: by mail-wm0-f48.google.com with SMTP id b9so17950360wmh.0 for ; Thu, 09 Nov 2017 06:01:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=data-artisans-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=F39jgKtrx3+5K0KupVkwz0JsvUgrWyW7W+5aD6tqnCo=; b=utdzMqH6u7dvcbeBBkDYqH57AB1h7WJ+5piiyVE+SWITORq8AK1zQiq4Jr3r0DdXEH 8M8uxpwkL2DnvVuRuD1+G3rKUbC2OL1YdxKuo3a4+GfhrNnKOOq87QtFzilOD05+/oNc H2s+qvKxrH9Jq7MGrCjffnJA/we0fVQbU2Mf+gNzZXvIdxnRrMRMgBm4HSszVcYvwwHO 4YiOFIyqyQ31ibyh6+oxqj8HBSUoNxXyw0gHF7EG4kR1uU/vlC8HT05xQBCnxsxx01oN XdFT6RKuI9G3g88jBAYYU9zTPLuJLqZ0dalZO5g8NCaVEQMKoVH0Jz6VR+4lF9hZR4rf Ikig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=F39jgKtrx3+5K0KupVkwz0JsvUgrWyW7W+5aD6tqnCo=; b=SkzHIeurzx9qHxCmtTiwLvqparwgJ9YJDr1r3hLGKfnLtOK8HPAE7fJSZScbHmdKxn LVPN16pAJHH78RaqEDZ98Dctu+vCJrDc3b3RQCFOFu3GLl/RQPk1dvpB4W8Sdu9l5TZ8 O+ZdLNkXx/cFp2XtyClQ+j2touS3aIch7fU9zuwFO7iDvRLoGszV80GLyd+7F8GH/PDk glLyZjFxTwoUf/2ddR4eTn7v/gPi+GcFNUyQGFnGw1gXLThdn2nFt/q4xEtHWc+WK48E 6xkiyyotaRLHjQN/HLVwoELWoWDRVp+Vgi4aM3Mfkz0MPSK9Tzw9dqx58ONF0mi4GOKv PnzQ== X-Gm-Message-State: AJaThX4f+cwt5kSUCw6r9GW6gwJYa91UBAGgsDjLWTVrxNgvsoW6vGd+ VfpZyEo2M9k8xLHZc/ynDgTH5w== X-Google-Smtp-Source: ABhQp+RumfsSAI0+cWQ0M6nGfA30RjHtv1eAFlwrQmXJzcf7bFEe/V3kZ3a8dV1FxTdvje+oQaxX8w== X-Received: by 10.80.153.197 with SMTP id n5mr740996edb.281.1510236079974; Thu, 09 Nov 2017 06:01:19 -0800 (PST) Received: from [192.168.178.65] (ip-2-205-80-95.web.vodafone.de. [2.205.80.95]) by smtp.gmail.com with ESMTPSA id f39sm6476504edf.83.2017.11.09.06.01.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 09 Nov 2017 06:01:19 -0800 (PST) From: Kostas Kloudas Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_F1F89931-C9A4-4597-B3AF-FB367FF62518" Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: When using Flink for CEP, can the data in Cassandra database be used for state Date: Thu, 9 Nov 2017 15:01:17 +0100 In-Reply-To: Cc: user@flink.apache.org To: shyla deshpande References: X-Mailer: Apple Mail (2.3273) archived-at: Thu, 09 Nov 2017 14:01:25 -0000 --Apple-Mail=_F1F89931-C9A4-4597-B3AF-FB367FF62518 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hi Shyla, Happy to hear that you are experimenting with CEP! For enriching your input stream with data from Cassandra (or whichever = external storage system) you could use: * either the AsyncIO functionality offered by Flink = (https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/as= yncio.html = ) * or, iff all your database fits in memory, you could write a = ProcessFunction = (https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev/stream/pr= ocess_function.html = ) which loads the database in memory in the open() = method, and then uses the data accordingly. Afterwards, you can use the resulting (enriched) DataStream to feed it = into CEP for further processing. Hope this helps! Kostas > On Nov 9, 2017, at 12:08 AM, shyla deshpande = wrote: >=20 > Hello all, >=20 > I am new to Flink. >=20 > We have our data in Cassandra database. We have a use case for CEP.=20 > I am checking out if Flink fits well for us. =20 >=20 > When processing the event data, I may want to pull data for the = cassandra database like the user profile and join with the event data. >=20 > Is there a way to do that? I appreciate your help.=20 >=20 > Thanks --Apple-Mail=_F1F89931-C9A4-4597-B3AF-FB367FF62518 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii Hi Shyla,

Happy to hear that you are experimenting with CEP!

For enriching your input = stream with data from Cassandra (or whichever external storage system) = you could use:
* or, iff= all your database fits in memory, you could write a ProcessFunction (https://ci.apache.org/projects/flink/flink-docs-release-1.3/dev= /stream/process_function.html) which loads the database in memory in = the open() method, and then uses the data accordingly.

Afterwards, you can use = the resulting (enriched) DataStream to feed it into CEP for further = processing.

Hope= this helps!
Kostas

On = Nov 9, 2017, at 12:08 AM, shyla deshpande <deshpandeshyla@gmail.com> wrote:

Hello all,

I am new to Flink.

We have our data in Cassandra database. = We have a use case for CEP. 
I am checking out if = Flink fits well for us.  

When processing the event data, I may = want to pull data for the cassandra database like the user profile and = join with the event data.

Is there a way to do that?  I appreciate your = help. 

Thanks

= --Apple-Mail=_F1F89931-C9A4-4597-B3AF-FB367FF62518--