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 BCDE810B2C for ; Tue, 4 Feb 2014 03:52:33 +0000 (UTC) Received: (qmail 70132 invoked by uid 500); 4 Feb 2014 03:52:30 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 69793 invoked by uid 500); 4 Feb 2014 03:52:24 -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 69785 invoked by uid 99); 4 Feb 2014 03:52:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 03:52:23 +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 yuzhihong@gmail.com designates 209.85.160.170 as permitted sender) Received: from [209.85.160.170] (HELO mail-yk0-f170.google.com) (209.85.160.170) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 04 Feb 2014 03:52:17 +0000 Received: by mail-yk0-f170.google.com with SMTP id 9so44252152ykp.1 for ; Mon, 03 Feb 2014 19:51:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=ZEkB4IuQvRg5cUC7Oefb7bl8TN3+wrn0oqef9sNhnGE=; b=iZ/49Q+YGPmEiUYrwCMJQh3i7AnHSPCtW5mp64mBavvfUOH9lstwCEkW8gzjgK2IkT dlo0knbAsrFtJk3Jz8IcmHMmUy+d5m8y5T3Tp6rcBf1Dsu0FDdr1mnK49K554ChWq/pD XUjopcjD8HygYmGPYUFAIy+AQul6v+FtvKYV9dSPU9v+0Mo0lFpoIIaylGrtwkttiJRS 3W5CUILl+2Eo2LsZV6u3az2B53cB5IxmrPOf+V28OEnJxtEGJnZgBKbjJdn3MwibmZ3y ZLjivklxgZY54JB8J+yWnxye1t+XHPxHSr3OAzTZiVutIZGKSuWNSQZyh5QoEVnFb8fu YiHA== MIME-Version: 1.0 X-Received: by 10.236.88.179 with SMTP id a39mr4351586yhf.83.1391485916041; Mon, 03 Feb 2014 19:51:56 -0800 (PST) Received: by 10.170.122.18 with HTTP; Mon, 3 Feb 2014 19:51:55 -0800 (PST) In-Reply-To: References: Date: Mon, 3 Feb 2014 19:51:55 -0800 Message-ID: Subject: Re: HBase Rest Put examples/errors From: Ted Yu To: "user@hbase.apache.org" Content-Type: multipart/alternative; boundary=14dae9d2fb34bc564d04f18c8f04 X-Virus-Checked: Checked by ClamAV on apache.org --14dae9d2fb34bc564d04f18c8f04 Content-Type: text/plain; charset=ISO-8859-1 Have you looked at Cell Query (Single Value) section of http://wiki.apache.org/hadoop/Hbase/Stargate ? Cheers On Mon, Feb 3, 2014 at 5:55 PM, Demai Ni wrote: > hi, folks, > > I am trying to put a row through REST API and linux command. > > I started REST server (using port 8500), and be able to create a table: > create 't2_dn','cf1' > > And then, I used this command to insert a row > curl -v -X PUT 'http://localhost:8500/t2_dn/row1/cf1:q1' -H "Accept: > application/json" -H "Content-Type: application/json" --data '{"Row":{ > "@key":"row1","Cell":{"@column":"cf1:q1", "$":"val1"}}}' > but failed with error: > > {"Row":{ "@key":"row1","Cell":{"@column":"cf1:q1", "$":"val1"}}}HTTP/1.1 > 500 Can not deserialize instance of java.util.List out of START_OBJECT > token at [Source: org.mortbay.jetty.HttpParser$Input@1a841a84; line: 1, > column: 2] (through reference chain: > org.apache.hadoop.hbase.rest.model.CellSetModel["Row"]) > > I have googled a couple examples, such as here: > > http://stackoverflow.com/questions/14614669/hbase-rest-api-stargate-post-multiple-cells-rows > > Would someone give me some hints or point to a few more examples? many > thanks > > Demai > --14dae9d2fb34bc564d04f18c8f04--