Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 85F5B99FD for ; Mon, 4 Jun 2012 15:21:21 +0000 (UTC) Received: (qmail 28675 invoked by uid 500); 4 Jun 2012 15:21:19 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 28600 invoked by uid 500); 4 Jun 2012 15:21:19 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 28585 invoked by uid 99); 4 Jun 2012 15:21:19 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2012 15:21:19 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of ndimiduk@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-wg0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2012 15:21:11 +0000 Received: by wgbed3 with SMTP id ed3so3128164wgb.20 for ; Mon, 04 Jun 2012 08:20:51 -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 :cc:content-type; bh=SNsrHEhV38bX0To6l97xhzp3gizzh+omc/HRFVnj9MQ=; b=tVb60ydYI1tL1Mo23PXGcDIzQQC9fIrYPlJqp1Mx/qljqk5YO/EMURHmPWv9hLkesy 1xWMK66eJR646I9p/uXrDyhJA7ADrJq8ZmUSSB5aELGBm/AtUCSd3vHz3Az7tjiNXWbY z+x1AMfSV6WXNz0uuhSMvGdDDv0xcAwSSFowo+m68iwGbeE1UiioF0aQ+C9Es6vUhV9l 6B5Lf8N1kV9yDsx2f2xO3nkF0JPxe4d60IzZe0IXPccVUf2bryc99duw8y5zlH1u4P37 0SboIf9R+gqWOvRqsbXMazmmaPXj6KLtOhOCTJqAfps7iaIw/12Ux09b1LQzdSJkzljp JWmg== Received: by 10.216.143.195 with SMTP id l45mr11534779wej.49.1338823251204; Mon, 04 Jun 2012 08:20:51 -0700 (PDT) MIME-Version: 1.0 Received: by 10.216.2.84 with HTTP; Mon, 4 Jun 2012 08:20:30 -0700 (PDT) In-Reply-To: References: <682550.37360.qm@web65508.mail.ac4.yahoo.com> From: Nick Dimiduk Date: Mon, 4 Jun 2012 08:20:30 -0700 Message-ID: Subject: Re: REST Interface: Required ordering of JSON name/value pairs when performing Insert/Update To: user@hbase.apache.org Cc: dev@hbase.apache.org Content-Type: multipart/alternative; boundary=0016e6de16b84e1b2f04c1a71493 --0016e6de16b84e1b2f04c1a71493 Content-Type: text/plain; charset=UTF-8 Andy, Thanks for the follow-up. For what it's worth, I've been bitten by this "feature" by two separate projects this month. The only reason I thought to check field order was because it looked strikingly familiar. This is not a blocking issue for me, please prioritize accordingly. If no one else has noticed in 2 years, a documentation is more than sufficient. -n On Sun, Jun 3, 2012 at 2:54 PM, Andrew Purtell wrote: > On Jun 3, 2012, at 11:51 AM, Nick Dimiduk wrote: > > When I: > > > > $ curl -v -XPUT \ > > -H "Content-Type: application/json" \ > > http://localhost:9999/users/TheRealMT/info:password \ > > -d '{ > > "Row": [ > > { > > "Cell": [ > > { > > * "@column": "aW5mbzpwYXNzd29yZA==",* > > * "$": "NzBOQHJJIE4wIDcwdDBSMA=="* > > } > > ], > > "@key": "VGhlUmVhbE1U" > > } > > ] > > }' > > > > The logs show: > > > > 12/06/03 02:43:16 DEBUG rest.RowResource: PUT > > http://localhost:9999/users/TheRealMT/info:password > > 12/06/03 02:43:16 DEBUG rest.RowResource: PUT > > > {"totalColumns":1,"families":{"info":[{"timestamp":9223372036854775807,"qualifier":"password", > > *"vlen":16*}]},"row":"TheRealMT"} > > > > And the write is successful. > > > > But if I: > > > > $ curl -v -XPUT \ > > -H "Content-Type: application/json" \ > > http://localhost:9999/users/TheRealMT/info:password \ > > -d '{ > > "Row": [ > > { > > "Cell": [ > > { > > * "$": "NzBOQHJJIE4wIDcwdDBSMA==",* > > * "@column": "aW5mbzpwYXNzd29yZA=="* > > } > > ], > > "@key": "VGhlUmVhbE1U" > > } > > ] > > }' > > > > The log shows: > > > > 12/06/03 02:46:22 DEBUG rest.RowResource: PUT > >> http://localhost:9999/users/TheRealMT/info:password > > 12/06/03 02:46:22 DEBUG rest.RowResource: PUT > > > {"totalColumns":1,"families":{"info":[{"timestamp":9223372036854775807,"qualifier":"password", > > *"vlen":0*}]},"row":"TheRealMT"} > > See > https://issues.apache.org/jira/browse/HBASE-2475?focusedCommentId=13288259&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13288259 > > and > https://issues.apache.org/jira/browse/HBASE-2475?focusedCommentId=13288265&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13288265 > > Perhaps it's worth proceeding even though the JSON input and output of > HBase REST will most likely change? (And change to something cleaner > and saner.) > > We don't use the REST gateway ourselves but when we were looking at it > once, I recommended using the protobuf representation option. > > - Andy > --0016e6de16b84e1b2f04c1a71493--