Return-Path: Delivered-To: apmail-incubator-chukwa-dev-archive@www.apache.org Received: (qmail 42319 invoked from network); 3 Sep 2010 19:30:27 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 3 Sep 2010 19:30:27 -0000 Received: (qmail 95352 invoked by uid 500); 3 Sep 2010 19:30:27 -0000 Delivered-To: apmail-incubator-chukwa-dev-archive@incubator.apache.org Received: (qmail 95155 invoked by uid 500); 3 Sep 2010 19:30:26 -0000 Mailing-List: contact chukwa-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: chukwa-dev@incubator.apache.org Delivered-To: mailing list chukwa-dev@incubator.apache.org Received: (qmail 95119 invoked by uid 99); 3 Sep 2010 19:30:26 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 19:30:26 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Sep 2010 19:29:54 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id o83JTXxB024075 for ; Fri, 3 Sep 2010 19:29:33 GMT Message-ID: <17318851.17331283542173171.JavaMail.jira@thor> Date: Fri, 3 Sep 2010 15:29:33 -0400 (EDT) From: "Bill Graham (JIRA)" To: chukwa-dev@incubator.apache.org Subject: [jira] Updated: (CHUKWA-515) REST API for Agent In-Reply-To: <13775783.9101282844393269.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CHUKWA-515?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Bill Graham updated CHUKWA-515: ------------------------------- Attachment: CHUKWA-515-1.patch Attaching CHUKWA-515-1.patch, which has full CRUD support. The read API is as described above. The add and delete APIs can be tested with commands like this: {noformat} # AdaptorParms is optional in the event that the adaptor doesn't take params. # Offset is optional and defaults to 0 curl -d '{ "DataType" : "TestDataType", "AdaptorClass" : "org.apache.hadoop.chukwa.util.ConstRateAdapr", "AdaptorParams" : "1000", "Offset" : "0" }' -H "Content-Type: application/json" http://localhost:9094/rest/v1/adaptor curl -X DELETE http://localhost:9094/rest/v1/adapto/[adaptor_id] {noformat} I've included a generic {{OffsetStatsManager}} in {{org.apache.hadoop.chukwa.datacollection}} that can be used by anything that tracks data by offset from a given point. This could be useful on the collector if we were to implement a similar collector REST API. Let me know if you have any comments about the API, the request format, the response format, variable names, whatever. > REST API for Agent > ------------------ > > Key: CHUKWA-515 > URL: https://issues.apache.org/jira/browse/CHUKWA-515 > Project: Chukwa > Issue Type: Sub-task > Components: data collection > Reporter: Bill Graham > Assignee: Bill Graham > Attachments: CHUKWA-515-1.patch > > > Develop a REST interface for the Agent to expose Adaptor CRUD operations. > * Request URI: > {noformat} > GET /rest/v1/adaptor HTTP/1.0 > {noformat} > * For now I'm shooting for the XML and plain text response, but ultimately we can support optional params: > {noformat} > viewType=[json|xml|text] (default is XML?) > {noformat} > I'm planning on using Jetty similar to how the collector does. We could have some common code that delegates requests to different handlers based on the URI. The current telnet interface will remain as-is. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.