Return-Path: Delivered-To: apmail-hadoop-core-commits-archive@www.apache.org Received: (qmail 17158 invoked from network); 13 Aug 2008 19:02:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Aug 2008 19:02:45 -0000 Received: (qmail 96319 invoked by uid 500); 13 Aug 2008 19:02:45 -0000 Delivered-To: apmail-hadoop-core-commits-archive@hadoop.apache.org Received: (qmail 96166 invoked by uid 500); 13 Aug 2008 19:02:44 -0000 Mailing-List: contact core-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-commits@hadoop.apache.org Received: (qmail 96147 invoked by uid 99); 13 Aug 2008 19:02:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2008 12:02:44 -0700 X-ASF-Spam-Status: No, hits=-1998.5 required=10.0 tests=ALL_TRUSTED,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.130] (HELO eos.apache.org) (140.211.11.130) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Aug 2008 19:01:56 +0000 Received: from eos.apache.org (localhost [127.0.0.1]) by eos.apache.org (Postfix) with ESMTP id 59D7F118DB for ; Wed, 13 Aug 2008 19:02:24 +0000 (GMT) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Apache Wiki To: core-commits@hadoop.apache.org Date: Wed, 13 Aug 2008 19:02:24 -0000 Message-ID: <20080813190224.27685.61790@eos.apache.org> Subject: [Hadoop Wiki] Update of "Hbase/HbaseRest" by sishen X-Virus-Checked: Checked by ClamAV on apache.org Dear Wiki user, You have subscribed to a wiki page or wiki category on "Hadoop Wiki" for change notification. The following page has been changed by sishen: http://wiki.apache.org/hadoop/Hbase/HbaseRest ------------------------------------------------------------------------------ }}} + '''POST /''' + Create a table. + Headers: + Content-type: + application/xml: The client is sending the table metadata in an XML entity. + Returns: + HTTP 200 (OK) if the table could successfully be created. '''GET /[table_name]''' Retrieve metadata about the table. This includes column family descriptors. @@ -72, +79 @@ }}} + '''PUT /[table_name]''' + Update the table schema. + Headers: + Content-type: + application/xml: The client is sending the table metadata in an XML entity. + Returns: + HTTP 200 (OK) if the table could successfully be updated. + + '''DELETE /[table_name]''' + Delete this table. + Returns: + HTTP 202 (Accepted) if the table could successfully be deleted. + + '''POST /[table_name]/disable''' + Disable this table + Returns: + HTTP 202 (Accepted) if the table could successfully be disabled. + + '''POST /[table_name]/enable''' + Enable this table + Returns: + HTTP 202 (Accepted) if the table could successfully be enabled. '''GET /[table_name]/regions''' Retrieve a list of the regions for this table so that you can efficiently split up the work (a la MapReduce). @@ -226, +255 @@ {{{ cd $HBASE_HOME - bin/hbase rest + bin/hbase rest start }}} Pass '''--help''' to see REST server usage. @@ -237, +266 @@ == Examples using curl == + + Here is a POST of create table. + + {{{ + sishen@sishen-mac:~/Work/Personal/java/apache/hbase-trunk$curl -v -X POST -T - http://localhost:60050/api/ + * About to connect() to localhost port 60050 (#0) + * Trying ::1... connected + * Connected to localhost (::1) port 60050 (#0) + > POST /api/ HTTP/1.1 + > User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 + > Host: localhost:60050 + > Accept: */* + > Transfer-Encoding: chunked + > Expect: 100-continue + > + < HTTP/1.1 100 Continue + + + tables + + + subscription + 2 + NONE + false + true + + +
+ ^D + < HTTP/1.1 200 OK + < Date: Wed, 13 Aug 2008 18:59:38 GMT + < Server: Jetty/5.1.4 (Mac OS X/10.5.4 i386 java/1.5.0_13 + < Content-Length: 0 + < + * Connection #0 to host localhost left intact + * Closing connection #0 + }}} + + Here is a POST of disable table. + + {{{ + sishen@sishen-mac:~/Work/Personal/java/apache/hbase-trunk$curl -v -X POST http://localhost:60050/api/tables/disable + * About to connect() to localhost port 60050 (#0) + * Trying ::1... connected + * Connected to localhost (::1) port 60050 (#0) + > POST /api/tables/disable HTTP/1.1 + > User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 + > Host: localhost:60050 + > Accept: */* + > + < HTTP/1.1 202 Accepted + < Date: Wed, 13 Aug 2008 18:55:03 GMT + < Server: Jetty/5.1.4 (Mac OS X/10.5.4 i386 java/1.5.0_13 + < Content-Length: 0 + < + * Connection #0 to host localhost left intact + * Closing connection #0 + }}} + + Here is a POST of enable table. + + {{{ + sishen@sishen-mac:~/Work/Personal/java/apache/hbase-trunk$curl -v -X POST http://localhost:60050/api/tables/enable + * About to connect() to localhost port 60050 (#0) + * Trying ::1... connected + * Connected to localhost (::1) port 60050 (#0) + > POST /api/tables/enable HTTP/1.1 + > User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 + > Host: localhost:60050 + > Accept: */* + > + < HTTP/1.1 202 Accepted + < Date: Wed, 13 Aug 2008 18:56:20 GMT + < Server: Jetty/5.1.4 (Mac OS X/10.5.4 i386 java/1.5.0_13 + < Content-Length: 0 + < + * Connection #0 to host localhost left intact + * Closing connection #0 + }}} + + Here is a DELETE of a table. + + {{{ + sishen@sishen-mac:~/Work/Personal/java/apache/hbase-trunk$curl -v -X DELETE http://localhost:60050/api/tables + * About to connect() to localhost port 60050 (#0) + * Trying ::1... connected + * Connected to localhost (::1) port 60050 (#0) + > DELETE /api/tables HTTP/1.1 + > User-Agent: curl/7.16.3 (powerpc-apple-darwin9.0) libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 + > Host: localhost:60050 + > Accept: */* + > + < HTTP/1.1 202 Accepted + < Date: Wed, 13 Aug 2008 18:57:41 GMT + < Server: Jetty/5.1.4 (Mac OS X/10.5.4 i386 java/1.5.0_13 + < Content-Length: 0 + < + * Connection #0 to host localhost left intact + * Closing connection #0 + }}} Here is a GET of a row. Notice how values are Base64'd.