HBASE-17962 Improve documentation on Rest interface (Excluded update to the ref guide, since it'll be copied from master branch prior to 1.4 release.)
Signed-off-by: Sean Busbey <bus...@apache.org> Project: http://git-wip-us.apache.org/repos/asf/hbase/repo Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/fa4f6389 Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/fa4f6389 Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/fa4f6389 Branch: refs/heads/branch-1 Commit: fa4f6389426c55abf8a1f0d1791deacdc181748c Parents: 9a71bac Author: Niels Basjes <nbas...@bol.com> Authored: Wed Apr 26 11:21:39 2017 +0200 Committer: Sean Busbey <bus...@apache.org> Committed: Fri Apr 28 11:43:55 2017 -0500 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/hbase/rest/RowResource.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hbase/blob/fa4f6389/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java ---------------------------------------------------------------------- diff --git a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java index 4d50c54..d93fd39 100644 --- a/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java +++ b/hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/RowResource.java @@ -139,7 +139,13 @@ public class RowResource extends ResourceBase { if (!rowspec.hasColumns() || rowspec.getColumns().length > 1) { servlet.getMetrics().incrementFailedGetRequests(1); return Response.status(Response.Status.BAD_REQUEST).type(MIMETYPE_TEXT) - .entity("Bad request: Either 0 or more than 1 columns specified." + CRLF).build(); + .entity("Bad request: Default 'GET' method only works if there is exactly 1 column " + + "in the row. Using the 'Accept' header with one of these formats lets you " + + "retrieve the entire row if it has multiple columns: " + + // Same as the @Produces list for the get method. + MIMETYPE_XML + ", " + MIMETYPE_JSON + ", " + + MIMETYPE_PROTOBUF + ", " + MIMETYPE_PROTOBUF_IETF + + CRLF).build(); } MultivaluedMap<String, String> params = uriInfo.getQueryParameters(); try {