Return-Path: X-Original-To: apmail-apex-dev-archive@minotaur.apache.org Delivered-To: apmail-apex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 114081894B for ; Tue, 15 Mar 2016 13:47:49 +0000 (UTC) Received: (qmail 22398 invoked by uid 500); 15 Mar 2016 13:47:49 -0000 Delivered-To: apmail-apex-dev-archive@apex.apache.org Received: (qmail 22282 invoked by uid 500); 15 Mar 2016 13:47:48 -0000 Mailing-List: contact dev-help@apex.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@apex.incubator.apache.org Delivered-To: mailing list dev@apex.incubator.apache.org Received: (qmail 22269 invoked by uid 99); 15 Mar 2016 13:47:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Mar 2016 13:47:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 45D41C284E for ; Tue, 15 Mar 2016 13:47:46 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=datatorrent-com.20150623.gappssmtp.com Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id iapRvtjE5eXk for ; Tue, 15 Mar 2016 13:47:45 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with ESMTPS id E12465F572 for ; Tue, 15 Mar 2016 13:47:44 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id m7so17290765obh.3 for ; Tue, 15 Mar 2016 06:47:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=datatorrent-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to; bh=HbikssYzIklPFOEVW7//EY3zYT+ALwSi8tcyPo3cbMQ=; b=ARLmsJUoBh5BxffIt9/Ybe1JFr8a4unBTm9ufN+R/q0/euOCpr0zrTZpVOKDZH9CyV ChgBjEp/PfpQaVNXNi+3axe+zSNzpS/e92CJZPiM2byeNclpQLJzWyczWrW6wEjjyRoP P1w5WERnXxeZsIpmAf5llLcgYG1jBDvV1LeGKNHxou4LswOH46azhBsTc7xuWo1CemjL dav9W3F58ljUp0LRqKptE5yFsIWQP76dDds2kR/idLwZA9mP5MjF+sAV4f1Op/A3ZWdq x8C0qqeSN/7BtNYpW+eaStjmlrISbJzbCDiZW65yVjrjRAXwN1FVaWxXfE36+eQDex9M SCOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to; bh=HbikssYzIklPFOEVW7//EY3zYT+ALwSi8tcyPo3cbMQ=; b=BhZiZvdnAJm7DqT+Tj0QgCXBIHCbr7DiylLyvgJ7J1Nd7shGCKCjh+LWjpk7out30G kkJ5yrSt3DtwC3emw+aJjSbTDu5OBrXfF+IZXhAaiuOKSkoIijOcXRwnodLWxHith0cw i52D3vKsxYd9h773DMRiiFH8hT7XcelreCUk6ba1dYzebQZ318k9IB9cKEe6Vfbecbua pEftWgpZM3FmlBPlkrmK+N1EPoJiBdjPlR98z1OUNl8pFCmAaNCm7a7MHwPO5d8TkwUs AcYZeFUM987w/XNCytBcNnaY40g3MzThg9RWDS82gl3tCVfY5qHFtRWMDn1L8IUHgoBX pYmQ== X-Gm-Message-State: AD7BkJKhk5rh9dMxqLm2Lj4uJm7c8jrMmhQo8XRDRugCEDnSJrTWFR7+oTShACgNhXrgAmadFetkg3JI81DtagRb MIME-Version: 1.0 X-Received: by 10.60.246.72 with SMTP id xu8mr18591889oec.71.1458049664199; Tue, 15 Mar 2016 06:47:44 -0700 (PDT) Received: by 10.157.7.193 with HTTP; Tue, 15 Mar 2016 06:47:44 -0700 (PDT) In-Reply-To: References: Date: Tue, 15 Mar 2016 19:17:44 +0530 Message-ID: Subject: Re: Adding Enrichment operator to malhar From: Mohit Jotwani To: dev@apex.incubator.apache.org Content-Type: multipart/alternative; boundary=001a1136993a4cc583052e16a4e5 --001a1136993a4cc583052e16a4e5 Content-Type: text/plain; charset=UTF-8 This is one of the most important features required within a pipeline. Will it allow other store plugins (for reference lookup) to be added to the operator? +1 Regards, Mohit On Tue, Mar 15, 2016 at 6:57 PM, Chinmay Kolhatkar wrote: > Hello Community, > > We want to add Enrichment operator to malhar library. > > Here are some initial details about it: > > UseCase: > ================= > Data enrichment is an extremely common and important step in almost ALL > batch and stream processing flows. > Streaming use cases deal with log data which often lacks context and > metadata. The metadata is required for all additional analytical processing > This operator allows one to enrich stream data with data from external > source. > > Functionality: > ================= > 1. Take input as POJO and emit enriched POJO as per the configuration. > 2. The external store can be configurable and will be a plugin model. > 3. Currently support for JDBC, Hbase and File based format store will be > added. > 4. Operator will perform a reference lookup to these external databases to > enrich the incoming tuple. > > Design: > ================= > 1. As mentioned above stores (viz. Database Loaders) will be plugin based > machanism. > 2. To make the loaders pluggable they'll follow a common interface as > follows: > public interface DBLoader extends > com.datatorrent.lib.db.cache.CacheManager.Backup > { > public void setFields(List lookupFields,List > includeFields); > public void setFieldInfo(List fieldInfos) > } > 3. All the above mentioned loaders (JDBC, Hbase, file etc) will implement > above interface and Enrichment Operator will use object of this interface > to query missing fields to be enriched. > 4. Both input and output ports of Enrichment Operator will need to be set > with TUPLE_CLASS Attribute for the operator to know of upstream and > downstream. > This means, input schema can be seperate from output schema. > 5. Enrichment operator will use PojoUtils to create getters and setters > which will be used to dynamically generate the new enriched object on the > fly. > 6. User need to configure enrichmentMap for any change in > columnName/inputFieldName to outputField. > > Please provide your valuable feedback on above. > > Thanks in advance, > Chinmay. > --001a1136993a4cc583052e16a4e5--