Return-Path: Delivered-To: apmail-hadoop-chukwa-user-archive@minotaur.apache.org Received: (qmail 36669 invoked from network); 21 Apr 2010 22:32:11 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 21 Apr 2010 22:32:11 -0000 Received: (qmail 23880 invoked by uid 500); 21 Apr 2010 22:32:11 -0000 Delivered-To: apmail-hadoop-chukwa-user-archive@hadoop.apache.org Received: (qmail 23830 invoked by uid 500); 21 Apr 2010 22:32:10 -0000 Mailing-List: contact chukwa-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-user@hadoop.apache.org Delivered-To: mailing list chukwa-user@hadoop.apache.org Received: (qmail 23822 invoked by uid 99); 21 Apr 2010 22:32:10 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 22:32:10 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_FROM,HTML_MESSAGE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of billgraham@gmail.com designates 74.125.83.176 as permitted sender) Received: from [74.125.83.176] (HELO mail-pv0-f176.google.com) (74.125.83.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Apr 2010 22:32:03 +0000 Received: by pvg12 with SMTP id 12so731826pvg.35 for ; Wed, 21 Apr 2010 15:31:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:reply-to:date:received :message-id:subject:from:to:content-type; bh=fp6+6ylrY/qOf7QMt3EHHgK8Ej8OKYwt9OpwvQC2tf0=; b=HwB3NKjr1dHXtwArICaLFAS1IOiaoqcRrkfbBFRSw5i3qZ58FgCUtWNKT8nJ2DxJNF wjcTVJTvjJop0mPuJzw76Ez+Ey8CVEXDDZ4jwmJWOqk/RxuWqnjUC4dWhdxAy2jLeE05 r+JY6XvKwOSTDoNDt1El6osDdN9IbMv94b9Aw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:date:message-id:subject:from:to:content-type; b=HVzyxpQa5HrSxQqSEFR1SYPeNNaPFgSywcOPuubWm5KWTIlhOpi1uiWItKtyJ0hBjB QB6kPtC4dGzIauMlih2L1QpdtC0GZtwgfnuLK2M85dOOI8FVKiooHEtlpGk75WpfQz+l RbImnU/3ytO2WW8Kqsp6GcNsAt0MBS0L6xI9s= MIME-Version: 1.0 Received: by 10.142.225.11 with HTTP; Wed, 21 Apr 2010 15:31:41 -0700 (PDT) Reply-To: billgraham@gmail.com Date: Wed, 21 Apr 2010 15:31:41 -0700 Received: by 10.143.27.12 with SMTP id e12mr4151033wfj.87.1271889101660; Wed, 21 Apr 2010 15:31:41 -0700 (PDT) Message-ID: Subject: HttpTriggerAction - configuring N objects From: Bill Graham To: chukwa-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=00504502cc731923ad0484c6c27a X-Virus-Checked: Checked by ClamAV on apache.org --00504502cc731923ad0484c6c27a Content-Type: text/plain; charset=ISO-8859-1 Hi, As a follow up to CHUKWA-477, I'm writing a class called HttpTriggerAction that can hit one or more URLs upon successful completion of a demux job. I'd like to contribute it back unless anyone objects. Anyway, I'm looking for feedback though on how to configure this object. The issue is that since the class can hit N urls, it needs N sets of key-value configurations. The hadoop configurations model is just name-value pairs though, so I'm kicking around ideas around the best way to handle this. Specifically, I need to configure values for url, an optional HTTP method (default is GET), an optional collection of HTTP headers and an optional post body. I was thinking of just making a convention where key values could be incremented like below, but wanted to see if there were better suggestions out there. chukwa.trigger.action.[eventName].http.1.url=http://site.com/firstTrigger chukwa.trigger.action.[eventName].http.1.headers=User-Agent:chukwa chukwa.trigger.action.[eventName].http.2.url=http://site.com/secondTrigger chukwa.trigger.action.[eventName].http.2.method=POST chukwa.trigger.action.[eventName].http.2.headers=User-Agent:chukwa,Accepts:text/plain chukwa.trigger.action.[eventName].http.2.body=Some post body to submit .... chukwa.trigger.action.[eventName].http.N.url= chukwa.trigger.action.[eventName].http.N.method= chukwa.trigger.action.[eventName].http.N.headers= chukwa.trigger.action.[eventName].http.N.body= Since the action could potentially be used by other types of events, the event name should be included. This implies that we should add an eventName field to the TriggerAction.execute method in CHUKWA-477. Thoughts? thanks, Bill --00504502cc731923ad0484c6c27a Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi,

As a follow up to CHUKWA-477, I'm writing a class called Htt= pTriggerAction that can hit one or more URLs upon successful completion of = a demux job. I'd like to contribute it back unless anyone objects. Anyw= ay, I'm looking for feedback though on how to configure this object.
The issue is that since the class can hit N urls, it needs N sets of ke= y-value configurations. The hadoop configurations model is just name-value = pairs though, so I'm kicking around ideas around the best way to handle= this.

Specifically, I need to configure values for url, an optional HTTP meth= od (default is GET), an optional collection of HTTP headers and an optional= post body. I was thinking of just making a convention where key values cou= ld be incremented like below, but wanted to see if there were better sugges= tions out there.

chukwa.trigger.action.[eventName].http.1.url=3Dhttp://site.com/firstTrigger
chukwa.trigger.action.[eventName].http.1.headers=3DUser-Agent:chukwa
chukwa.trigger.action.[eventName].http.2.url=3Dhttp://site.com/secondTrigger
chukwa.trigger.action.[e= ventName].http.2.method=3DPOST
chukwa.trigger.action.[eventName].http.2.= headers=3DUser-Agent:chukwa,Accepts:text/plain
chukwa.trigger.action.[eventName].http.2.body=3DSome post body to submit....
chukwa.trigger.action.[eventName].http.N.url=3D
chukwa.trigger.action.[eventName].http.N.method=3D
chukwa.trigger.action.[eventName].http.N.headers=3D
chukwa.trigger.action.[eventName].http.N.body=3D

Since the action could potentially be used by other types of events, th= e event name should be included. This implies that we should add an eventNa= me field to the TriggerAction.execute method in CHUKWA-477.

Thoughts= ?

thanks,
Bill


--00504502cc731923ad0484c6c27a--