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 D54ED17F07 for ; Mon, 28 Sep 2015 14:29:52 +0000 (UTC) Received: (qmail 49469 invoked by uid 500); 28 Sep 2015 14:29:52 -0000 Delivered-To: apmail-apex-dev-archive@apex.apache.org Received: (qmail 49408 invoked by uid 500); 28 Sep 2015 14:29:52 -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 49397 invoked by uid 99); 28 Sep 2015 14:29:52 -0000 Received: from Unknown (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 28 Sep 2015 14:29:52 +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 02C3A1809B9 for ; Mon, 28 Sep 2015 14:29:52 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.28 X-Spam-Level: ** X-Spam-Status: No, score=2.28 tagged_above=-999 required=6.31 tests=[HTML_MESSAGE=3, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Received: from mx1-us-west.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id BjFYg-xZcQqw for ; Mon, 28 Sep 2015 14:29:46 +0000 (UTC) Received: from mail-yk0-f179.google.com (mail-yk0-f179.google.com [209.85.160.179]) by mx1-us-west.apache.org (ASF Mail Server at mx1-us-west.apache.org) with ESMTPS id D07FF20592 for ; Mon, 28 Sep 2015 14:29:45 +0000 (UTC) Received: by ykdt18 with SMTP id t18so182327260ykd.3 for ; Mon, 28 Sep 2015 07:29:39 -0700 (PDT) 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 :content-type; bh=VeRjj3Y7v67kc7kpGGqTc7+xcaZgt0y+VhGj8pmVsSg=; b=BIgLc3qlkt6oPvYhXNnN9OjqgHUuzKDXcxOt8yTeksthMNpPTiOD7XomYdjZWFQqLU 9qbph3sAtK+BOxgE3dBwz2bux5ooMxBIJCvREnj3lojOIZex0Ra8bScAFOkaPFszRCca bjbGpd1lSJBVIWRVVMKOoR1gk6SfsLqgAug3AiUiG4E4pvIjf/+IUKYn5kNYD+syhy7k ht6run9Y7mIxGoyd/RCWligNnfLuNhBZiPTnwCwgqMIdTSI2ocHi5t2fDRnUCXUeyRC9 NF6gjBo7a1O1KyVoQdu7A1uKSoTDnMgmC/+EjzX6xNpQ6uUFIjTRP8NvDktcl5xjraVU YlEw== X-Gm-Message-State: ALoCoQl1O1cfrAMtdrpzRkd/oqQksKnEvU0jSh8KlWK2qtrgPs3ZDDIFsuCAPzgqA4Ts7hIyBngJ MIME-Version: 1.0 X-Received: by 10.13.229.68 with SMTP id o65mr16558689ywe.62.1443450579420; Mon, 28 Sep 2015 07:29:39 -0700 (PDT) Received: by 10.37.208.77 with HTTP; Mon, 28 Sep 2015 07:29:39 -0700 (PDT) Date: Mon, 28 Sep 2015 19:59:39 +0530 Message-ID: Subject: Writing Streaming application in Scala. From: Tushar Gosavi To: dev@apex.incubator.apache.org Content-Type: multipart/alternative; boundary=94eb2c0809ec09bb4b0520cf87c6 --94eb2c0809ec09bb4b0520cf87c6 Content-Type: text/plain; charset=UTF-8 Hi All, I am trying to see how we can write a Streaming Application using Scala language, as Scala targets JVM and has good interoperability with Java. I am able to port simple pi demo in Scala along with the operators. Please take a look at PR#40 (https://github.com/apache/incubator-apex-malhar/pull/40) for this work, and provide feedback. Created following operators in Scala - RandomItemGenerator : Generate random points in 2d space. - PiCalculator : Calculates value of pi - ConsoleOutOperator : Write value of tuple on stdout, I could not use the Java operator available in Malhar, because scala does more strong type checking. (I need to look into this more) And use these operators to write a simple streaming application. The following functionality is working - Scala Operators recovers correctly from the crash. - Scala supports generating setters/getters using @BeanProperty annotation, and these properties become accessible through config file and we can set them dynamically through dtcli. - get-operator-properties is working. Thanks, -Tushar. --94eb2c0809ec09bb4b0520cf87c6--