You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by GitBox <gi...@apache.org> on 2019/09/16 12:33:09 UTC

[GitHub] [hbase] wchevreuil commented on a change in pull request #524: HBASE-22846 Internal Error 500 when Using HBASE REST API to Create Na…

wchevreuil commented on a change in pull request #524: HBASE-22846 Internal Error 500 when Using HBASE REST API to Create Na…
URL: https://github.com/apache/hbase/pull/524#discussion_r324647009
 
 

 ##########
 File path: hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/NamespacesInstanceResource.java
 ##########
 @@ -135,35 +135,9 @@ public Response get(final @Context ServletContext context,
   @Consumes({MIMETYPE_XML, MIMETYPE_JSON, MIMETYPE_PROTOBUF,
     MIMETYPE_PROTOBUF_IETF})
   public Response put(final NamespacesInstanceModel model, final @Context UriInfo uriInfo) {
-    if (LOG.isTraceEnabled()) {
-      LOG.trace("PUT " + uriInfo.getAbsolutePath());
-    }
-    servlet.getMetrics().incrementRequests(1);
     return processUpdate(model, true, uriInfo);
   }
 
-  /**
-   * Build a response for PUT alter namespace with no properties specified.
-   * @param message value not used.
-   * @param headers value not used.
-   * @return response code.
-   */
-  @PUT
-  public Response putNoBody(final byte[] message,
 
 Review comment:
   For some reason, on branch-2 based versions, these putNoBody and postNoBody methods only get properly called if client sets content-type request header to "application/octet-stream". We don't explicit define any requirement for "binary" request content-type, on the REST API doc in the ref guide, so it seems clients had been working well without setting content-type, in hbase 1. I suspect the behaviour change might be due jersey version changes between branch-1 and branch-2. 
   This fix simply removed the additional method, so request is guaranteed to always go to same place and then payload validations are applied there.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services