Dávid Paksy created HBASE-28999: ----------------------------------- Summary: Scan endpoint returns HTTP 500 Internal Server Error when table is disabled Key: HBASE-28999 URL: https://issues.apache.org/jira/browse/HBASE-28999 Project: HBase Issue Type: Task Components: REST Affects Versions: 4.0.0-alpha-1 Reporter: Dávid Paksy
h2. Scenario Try to use stateless scanner a *disabled table* on REST interface. h2. Actual result Scan endpoint returns HTTP 500 Internal Server Error. {code:java} { "servlet":"org.apache.hbase.thirdparty.org.glassfish.jersey.servlet.ServletContainer-33c2bd", "message":"Request failed.", "url":"/test/*", "status":"500" } {code} h2. Expected result It should NOT return HTTP 500 Internal Server Error. (?) Probably some client error status code (4xx). h2. How to reproduce * Create a new table (e.g via hbase shell, etc) * Disable the table * Try to scan the table with the stateless scanner REST endpoint {code:java} curl -v -X GET \ -H "Accept: application/json" \ "http://localhost:8080/test/*" ... < HTTP/1.1 500 Server Error ...{code} h2. Additional information REST server logs snippet: {code:java} 2024-11-26T08:53:25,140 WARN [qtp485475507-50 {}] server.HttpChannel: handleException /test/* com.fasterxml.jackson.databind.JsonMappingException: org.apache.hadoop.hbase.TableNotEnabledException: test (through reference chain: org.apache.hadoop.hbase.rest.TableScanResource$CellSetModelStream["Row"])2024-11-26T08:53:25,141 WARN [qtp485475507-50 {}] server.HttpChannelState: unhandled due to prior sendErrorjavax.servlet.ServletException: org.apache.hbase.thirdparty.org.glassfish.jersey.server.ContainerException: com.fasterxml.jackson.databind.JsonMappingException: org.apache.hadoop.hbase.TableNotEnabledException: test (through reference chain: org.apache.hadoop.hbase.rest.TableScanResource$CellSetModelStream["Row"]) Caused by: java.io.UncheckedIOException: org.apache.hadoop.hbase.TableNotEnabledException: test at org.apache.hadoop.hbase.client.ResultScanner$1.hasNext(ResultScanner.java:53) ~[hbase-client-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT] at org.apache.hadoop.hbase.rest.TableScanResource$1$1.hasNext(TableScanResource.java:77) ~[hbase-rest-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT] {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)