We are using HDP 2.5 with HBase 1.2.x. We think we found that the PUT vs
POST documentation on the HBase book [1] website is incorrect.

POST - Create a new table, or replace an existing table’s schema
> PUT - Update an existing table with the provided schema fragment


This contradicts what is in the original HBase 1.2 API javadocs [2].

PUT /<table>/schema
> POST /<table>/schema
> Uploads table schema. PUT or POST creates table as necessary. PUT fully
> replaces schema. POST modifies schema (add or modify column family). Supply
> the full table schema for PUT or a well formed schema fragment for POST in
> the desired encoding. Set Content-Type header to text/xml if the desired
> encoding is XML. Set Content-Type header to application/json if the desired
> encoding is JSON. Set Content-Type header to application/x-protobuf if the
> desired encoding is protobufs. If not successful, returns appropriate HTTP
> error status code. If successful, returns HTTP 200 status.


The result of the two conflicting documentation pages is that PUT either
updates or replaces and POST either updates or replaces the table schema.
This can cause problems like setting the table max versions back to the
default of 1.

Does this make sense? Is it possible the documentation is incorrect here?

The newest versions of HBase apidocs point to the HBase book. I have not
checked if the behavior changed between HBase versions.

1. https://hbase.apache.org/book.html#_rest
2.
https://hbase.apache.org/1.2/apidocs/org/apache/hadoop/hbase/rest/package-summary.html#operation_create_schema

Kevin Risden

Reply via email to