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 B4866200B25 for ; Wed, 8 Jun 2016 21:04:25 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B374A160A0E; Wed, 8 Jun 2016 19:04: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 07CDC160A2E for ; Wed, 8 Jun 2016 21:04:24 +0200 (CEST) Received: (qmail 79463 invoked by uid 500); 8 Jun 2016 19:04:24 -0000 Mailing-List: contact dev-help@quarks.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@quarks.incubator.apache.org Delivered-To: mailing list dev@quarks.incubator.apache.org Received: (qmail 79452 invoked by uid 99); 8 Jun 2016 19:04:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 19:04:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id C03881A055B for ; Wed, 8 Jun 2016 19:04:23 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -5.446 X-Spam-Level: X-Spam-Status: No, score=-5.446 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-1.426] autolearn=disabled Received: from mx2-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id BFWTPwlgokzt for ; Wed, 8 Jun 2016 19:04:22 +0000 (UTC) Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx2-lw-us.apache.org (ASF Mail Server at mx2-lw-us.apache.org) with SMTP id 4E2365F23F for ; Wed, 8 Jun 2016 19:04:22 +0000 (UTC) Received: (qmail 78572 invoked by uid 99); 8 Jun 2016 19:04:21 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Jun 2016 19:04:21 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 385882C1F5C for ; Wed, 8 Jun 2016 19:04:21 +0000 (UTC) Date: Wed, 8 Jun 2016 19:04:21 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: dev@quarks.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (QUARKS-195) Metrics.{counter,rateMeter}() shouldn't use TStream.pipe() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 08 Jun 2016 19:04:25 -0000 [ https://issues.apache.org/jira/browse/QUARKS-195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15321239#comment-15321239 ] ASF GitHub Bot commented on QUARKS-195: --------------------------------------- GitHub user dlaboss reopened a pull request: https://github.com/apache/incubator-quarks/pull/130 [QUARKS-195] Metrics.counter needs TStream.peek(oplet) You can merge this pull request into a Git repository by running: $ git pull https://github.com/dlaboss/incubator-quarks quarks-195-metrics-peek Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-quarks/pull/130.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 #130 ---- commit 1824df8d362b7ff8d486e8784e235ea98379c054 Author: Dale LaBossiere Date: 2016-06-07T18:29:48Z [QUARKS-195] Metrics.counter needs TStream.peek(oplet) commit bbcd081c8193026280c31fd2ab8e7dfedf4f47a0 Author: Dale LaBossiere Date: 2016-06-07T19:44:36Z update expected test result ---- > Metrics.{counter,rateMeter}() shouldn't use TStream.pipe() > ---------------------------------------------------------- > > Key: QUARKS-195 > URL: https://issues.apache.org/jira/browse/QUARKS-195 > Project: Quarks > Issue Type: Bug > Components: API > Reporter: Dale LaBossiere > Assignee: Dale LaBossiere > Priority: Minor > > Add `TStream.peek(Peek)` and change `Metrics.counter(TStream)` and `Metrics.rateMeter(TStream)` to use it instead of `pipe()`. > The author of CounterOp and RateMeter implemented the functionality as Peek Oplets not as Consumer functions. Lacking a TStream.peek(Peek), TStream.pipe() must be used to add the Peek oplets to the topology. > The runtime treats TStream.peek(Consumer) generated Peek oplets rather differently than pipe related oplets (added via pipe() or indirectly via pipe-ish functional methods): see Connector.connect() vs Connector.peek(), and TStream.peek() returns "this" whereas the addition of pipe oplets returns a new TStream. > The use of pipe() in this case is partially responsible for the effect reported in QUARKS-189. > Adding TStream.peek(Peek) enables users/authors of Peek oplets to get the same peek-ish behavior as their functional peeker brethen. It continues to flesh out the general ability of API clients to implement and add oplets to the topology. > The growing number of "oplet" based analogs to the "function" based methods makes me wonder if the oplet ones should be broken out into another interface that TStream implements (`OpletTStream`?). It would contain the current `pipe(Pipe)`, `fanin(FanIn,List)`, `sink(Sink)`, and the new `peek(Peek)`, and any others that may be needed in the future - e.g., a `split(Split)` and/or one that can handle multiple iports and oports. > Instead, TStream.pipe() (ConnectorStream.pipe()) could be modified to deal with Pipe oplet args in the desired manner and document that Pipe oplets receive this special treatment and that pipe() returns "this" for them instead of a new TStream. Adding TStream.peek(Peek) seems like a clearer alternative, and perhaps oplet.core.Peek should not extend Pipe? -- This message was sent by Atlassian JIRA (v6.3.4#6332)