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 2DEB8200B85 for ; Thu, 1 Sep 2016 05:28:43 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 191D8160AB5; Thu, 1 Sep 2016 03:28:38 +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 3A804160AB4 for ; Thu, 1 Sep 2016 05:28:37 +0200 (CEST) Received: (qmail 98065 invoked by uid 500); 1 Sep 2016 03:28:31 -0000 Mailing-List: contact dev-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list dev@nifi.apache.org Received: (qmail 98049 invoked by uid 99); 1 Sep 2016 03:28:31 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 01 Sep 2016 03:28:30 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 8F623C031E for ; Thu, 1 Sep 2016 03:28:30 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -0.121 X-Spam-Level: X-Spam-Status: No, score=-0.121 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, 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: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id KAQNOmJEQOh2 for ; Thu, 1 Sep 2016 03:28:28 +0000 (UTC) Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.161.172]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id A18185F240 for ; Thu, 1 Sep 2016 03:28:27 +0000 (UTC) Received: by mail-yw0-f172.google.com with SMTP id z8so43161486ywa.1 for ; Wed, 31 Aug 2016 20:28:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-transfer-encoding; bh=pR7C2CR04wr0szZX9W7QXaERRoNL3BUAm89KnHf3pBQ=; b=B98Y2NXbIEzl6/JidywTCpWLTdRdFuVT4JE960rbjKAjDa1rnWUQNBciawfOKIZD4q tut8QQXkI24tYc8tyAPgxl1tYqwpSoT5JwK2wvrTq2xsmWoGy25ns+/tEHzmOyMQ3kp8 jomZEm7fLQCK1mPiOb/HfJnAGzr41Q2allZQ80tOY4IbMulK4lBbmJWZZNihg5cNqpHj tvwcy7smUeyqbpHPdUdeXnU87fGYmW3Lwz0+HzjJZZGa3SSYdXbheGBCJtZMFgHvZcfM wAjipKJJWdsmR1a+A5kbwW2pZOSLotNC3sSP1K6PJnFtIUnTee53OB3Sm12CvOlNyQPQ ZMbg== 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:from:date :message-id:subject:to:content-transfer-encoding; bh=pR7C2CR04wr0szZX9W7QXaERRoNL3BUAm89KnHf3pBQ=; b=T9NPopa7Lv17IAkT5YH3cuAjG1DCRa5TB/7SNbLWVvy/B0PBnIBCB0Xp03jBtVKuF8 CIfscmiSpzZrBUHRtZ0swL3LdYjh/xS2qhhq0GDqR15PVSV6AUk7pEakZhHUQfXO46gB sSICRkIdx0YJUI57FuYVm7E6GL+JyD0K+5GzrijB+/oG/Q/71+NmmiRueLf8/ZG1s3s9 EpJx/YzIh/ibmtmlyi839hOonfH7ILbgWlWGRyf7uv9LR4P5yTqAMGiH4EkGUoNbR9FX BO2ocVTvgwo2aLAXMhqHUczm9R4nCwluO61sbIE9dW12cyFGyK9ilOjlSPjAXDy6GaLc UlKg== X-Gm-Message-State: AE9vXwMLzfzcXPGDUTF7Vbq9ignxMRdCYcmGw6Rf9wnjR3NKLaA3gOWwZD+XbuRNDllrgvd4VxRM6EIOaXS4Hw== X-Received: by 10.13.225.143 with SMTP id k137mr11338703ywe.318.1472700506371; Wed, 31 Aug 2016 20:28:26 -0700 (PDT) MIME-Version: 1.0 Received: by 10.37.164.163 with HTTP; Wed, 31 Aug 2016 20:28:25 -0700 (PDT) In-Reply-To: <4A3FFC38-12C7-43E5-9228-5678E3BE1F01@hpe.com> References: <3A86C0AF-B702-4AD4-B3AE-6703291E93E8@hpe.com> <4A3FFC38-12C7-43E5-9228-5678E3BE1F01@hpe.com> From: Joe Witt Date: Thu, 1 Sep 2016 13:28:25 +1000 Message-ID: Subject: Re: PostHTTP Penalize file on HTTP 5xx response To: dev@nifi.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable archived-at: Thu, 01 Sep 2016 03:28:43 -0000 It will not be blocked by penalized things. The queues are setup to basically put those aside and move on to other things until their penalty period passes. If you're seeing different behavior please advise. Thanks Joe On Thu, Sep 1, 2016 at 1:11 PM, McDermott, Chris Kevin (MSDU - STaTS/StorefrontRemote) wrote: > Thanks, everyone for the feedback. I=E2=80=99ll file a JIRA for this and = see if I can find some time to address it. > > Does anyone have any thoughts on my related question? > > (with spelling and grammar corrections:) > > =E2=9E=A2 If a penalized file is routed to a funnel that=E2=80=99s s conn= ect to a processor via a connection with the OldestFlowFileFirst prioritiz= er will the consumption of files from that connection be blocked until pena= lization period is over? > > > > Chris McDermott > > Remote Business Analytics > STaTS/StoreFront Remote > HPE Storage > Hewlett Packard Enterprise > Mobile: +1 978-697-5315 > > > > On 8/31/16, 11:00 PM, "Matt Burgess" wrote: > > Adam, > > A PenalizeFlowFile processor could be pretty useful, please feel free > to file a New Feature Jira for this if you like. > > In the meantime you could use ExecuteScript (with Groovy for this > example) and the following: > > def flowFile =3D session.get() > if(!flowFile) return > flowFile =3D session.penalize(flowFile) > session.transfer(flowFile, REL_SUCCESS) > > In this case the "success" relationship is awkward, it means you > successfully penalized the flow file. But then you can route it > back/forward to the appropriate processor. If you create a template > from this single processor, then dragging the template onto the canva= s > is somewhat equivalent to dragging a "PenalizeFlowFile" processor ont= o > the canvas (meaning I suggest the template is named PenalizeFlowFile)= . > > Regards, > Matt > > On Wed, Aug 31, 2016 at 10:46 PM, Adam Taft wrote= : > > In the wild west of HTTP response codes, a 500 Server Error could m= ean > > practically anything. In my experience, you can't infer any semant= ic > > meaning for what a 500 status code could mean, unless you're very f= amiliar > > with the server application. > > > > I'd even go so far as to suggest, if a modification is made to Post= HTTP, > > that all non-200 response codes should be penalized. The dataflow = manager > > can always adjust the penalization timeout towards zero if a proces= sing > > delay is not warranted. > > > > Unrelated, but this also reminds me, we really need a PenalizeFlowF= ile > > processor, which would allow a dataflow manager to penalize a flowf= ile > > anywhere that is deemed necessary, even if other processors haven't= done so > > (have routed to success). > > > > > > On Wed, Aug 31, 2016 at 1:54 PM, Andrew Grande = wrote: > > > >> Wasn't HTTP 400 Bad Request meant for that? 500 only means the ser= ver > >> failed, not necessarily due to user input. > >> > >> Andrew > >> > >> On Wed, Aug 31, 2016, 10:16 AM Mark Payne w= rote: > >> > >> > Hey Chris, > >> > > >> > I think it is reasonable to penalize when we receive a 500 respo= nse. 500 > >> > means Internal Server Error, and it is > >> > very reasonable to believe that the Internal Server Error occurr= ed due to > >> > the specific input (i.e., that it may not > >> > always occur with different input). So penalizing the FlowFile s= o that it > >> > can be retried after a little bit is reasonable > >> > IMO. > >> > > >> > When using the prioritizers, any FlowFile that is penalized will= not hold > >> > up other FlowFiles. They are always at the > >> > bottom of the queue until the penalization expires. > >> > > >> > Thanks > >> > -Mark > >> > > >> > > >> > > On Aug 31, 2016, at 10:06 AM, McDermott, Chris Kevin (MSDU - > >> > STaTS/StorefrontRemote) wrote: > >> > > > >> > > I wanted to ask if it would be at all sane to have the PostHTT= P > >> > processor penalize a flowfile on 5xx response. 5xx indicates th= at the > >> > request may be good but it cannot be handle by the server Curren= tly it > >> > seems the processor routes files eliciting this response to the = failure > >> > output but does not penalize them. What do we think of adding s= uch > >> > penalization? > >> > > > >> > > On a related note. If a file penalized file is routed to a fu= nnel that > >> > is connect to a processor via a connection with the OldestFlowFi= leFirst > >> > prioritizer will the consumption of files from that connection b= e blocked > >> > until penalization period is over? > >> > > > >> > > What I am trying to accomplish is this: I am using PostHTTP to= send > >> > files to web service that is throttling incoming data by returni= ng a 500 > >> > response. When that happens I want to slow down files being to = that that > >> > service. > >> > > > >> > > Thanks, > >> > > > >> > > Chris McDermott. > >> > > > >> > > Remote Business Analytics > >> > > STaTS/StoreFront Remote > >> > > HPE Storage > >> > > Hewlett Packard Enterprise > >> > > Mobile: +1 978-697-5315 > >> > > > >> > > > >> > > >> > > >> > >