Return-Path: Delivered-To: apmail-hadoop-hbase-dev-archive@locus.apache.org Received: (qmail 57097 invoked from network); 20 Nov 2008 15:01:29 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Nov 2008 15:01:29 -0000 Received: (qmail 72707 invoked by uid 500); 20 Nov 2008 15:01:37 -0000 Delivered-To: apmail-hadoop-hbase-dev-archive@hadoop.apache.org Received: (qmail 72593 invoked by uid 500); 20 Nov 2008 15:01:37 -0000 Mailing-List: contact hbase-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-dev@hadoop.apache.org Received: (qmail 72582 invoked by uid 99); 20 Nov 2008 15:01:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 07:01:37 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [8.192.1.48] (HELO spamgate.enernoc.com) (8.192.1.48) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 20 Nov 2008 15:00:14 +0000 X-ASG-Debug-ID: 1227193243-1a2b01770000-qbaNgu X-Barracuda-URL: http://spamgate.enernoc.com:8000/cgi-bin/mark.cgi Received: from enbossrv03.EnerNOC.local (localhost [127.0.0.1]) by spamgate.enernoc.com (Spam Firewall) with ESMTP id 84F7CEACF9 for ; Thu, 20 Nov 2008 10:00:43 -0500 (EST) Received: from enbossrv03.EnerNOC.local ([10.40.40.103]) by spamgate.enernoc.com with ESMTP id AmjFZBEuXLPyvRGQ for ; Thu, 20 Nov 2008 10:00:43 -0500 (EST) X-ASG-Whitelist: Client X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-ASG-Orig-Subj: RE: JSON support for HBaseRest Subject: RE: JSON support for HBaseRest Date: Thu, 20 Nov 2008 10:00:39 -0500 Message-ID: In-Reply-To: <4924AA73.6060702@duboce.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: JSON support for HBaseRest Thread-Index: AclKpD6/2Fh/dmMmSamNLl5DkmqRcAAezndA References: <49247FD2.7070300@duboce.net> <528821.99154.qm@web65513.mail.ac4.yahoo.com> <4924AA73.6060702@duboce.net> From: "Brian Beggs" To: X-Barracuda-Connect: UNKNOWN[10.40.40.103] X-Barracuda-Start-Time: 1227193243 X-Barracuda-Virus-Scanned: by Barracuda Spam Firewall at enernoc.com X-Virus-Checked: Checked by ClamAV on apache.org My initial thoughts on this was to take the current REST implementation that returns xml and refactor it so other types of content could be returned. Separating out the content generation and parsing from the servlet code.=20=20 I do think that it would be beneficial to allow multiple types of content to be returned by the implementation. I also believe that adding a new content type should be fairly simple to add. I'm not a fan of having dual REST implementations as provided by the patch in these JIRA issues: https://issues.apache.org/jira/browse/HBASE-814 https://issues.apache.org/jira/browse/HBASE-815 What I think I'm going to do at this point is to refactor the current REST implementation to allow multiple enocoders and parsers to work with the servlets. Brian -----Original Message----- From: Michael Stack [mailto:stack@duboce.net]=20 Sent: Wednesday, November 19, 2008 7:08 PM To: hbase-dev@hadoop.apache.org Cc: apurtell@apache.org Subject: Re: JSON support for HBaseRest Tom and Andrew, you are right. Response should be based off the=20 requested content-type (Actually, this is the way it was orginally=20 written but only XML was every implemented: See http://tinyurl.com/5podrd). St.Ack* * Tom Nichols wrote: > I agree that you wouldn't want to replace one completely with the > other, but allow for multiple content encodings. We're also > interested in CSV (at least as a retrieval format). The current REST > classes would need to be refactored in order to separate the content > parsing & generation from the actual request and response handling. A > simple switch statement based on the content-type (for request) and > accept header (for response) should be enough; a delegating chain of > command type of pattern could be slightly more flexible in terms of > adding new content encodings, but it would probably be overkill. > > On Wed, Nov 19, 2008 at 5:50 PM, Andrew Purtell wrote: >=20=20=20 >>> From: stack >>> I'd be on for replacing our current XML-based with JSON >>> if others were OK with that. >>>=20=20=20=20=20=20=20 >> I agree that JSON is preferable to XML as the default response >> encoding, but XML should be supported IMHO. In some environments >> XML is heavily favored, rightly or wrongly. >> >> - Andy >> >>=20=20=20=20=20 >>> From: stack >>> Subject: Re: JSON support for HBaseRest >>> To: hbase-dev@hadoop.apache.org >>> Date: Wednesday, November 19, 2008, 1:06 PM >>> Sishen Freecity has been looking after our REST interface of >>> late. He'd be the best person to chat with. From my >>> POV, for sure we'd be interested. Someone had begun >>> work on this a while back but it may have been dropped. >>> I'd be on for replacing our current XML-based with JSON >>> if others were OK with that. >>> >>> Thanks Brian, >>> St.Ack >>> >>> Brian Beggs wrote: >>>=20=20=20=20=20=20=20 >>>> I am currently working on adding JSON support to the >>>>=20=20=20=20=20=20=20=20=20 >>> HBase Rest >>>=20=20=20=20=20=20=20 >>>> implementation. I wanted to contact the HBase >>>>=20=20=20=20=20=20=20=20=20 >>> developer community to >>>=20=20=20=20=20=20=20 >>>> see if either something like this was already being >>>>=20=20=20=20=20=20=20=20=20 >>> worked on and if >>>=20=20=20=20=20=20=20 >>>> this something that the community would be interested >>>>=20=20=20=20=20=20=20=20=20 >>> in having. >>>=20=20=20=20=20=20=20 >>>> Thanks, >>>> >>>> >>>> Brian >>>> >>>> >>>> This email and any information disclosed in connection >>>>=20=20=20=20=20=20=20=20=20 >>> herewith, whether written or oral, is the property of >>> EnerNOC, Inc. and is intended only for the person or entity >>> to which it is addressed. This email may contain >>> information that is privileged, confidential or otherwise >>> protected from disclosure. Distributing or copying any >>> information contained in this email to anyone other than the >>> intended recipient is strictly prohibited. >>>=20=20=20=20=20=20=20 >>>>=20=20=20=20=20=20=20=20=20 >> >> >>=20=20=20=20=20 This email and any information disclosed in connection herewith, whether wr= itten or oral, is the property of EnerNOC, Inc. and is intended only for th= e person or entity to which it is addressed. =0D This email may contain information that is privileged, confidential or othe= rwise protected from disclosure. =0D Distributing or copying any information contained in this email to anyone o= ther than the intended recipient is strictly prohibited.