PDavid commented on code in PR #6520:
URL: https://github.com/apache/hbase/pull/6520#discussion_r1869801904


##########
hbase-rest/src/main/java/org/apache/hadoop/hbase/rest/TableResource.java:
##########
@@ -139,6 +139,9 @@ public TableScanResource getScanResource(final 
@PathParam("scanspec") String sca
     @DefaultValue("true") @QueryParam(Constants.SCAN_INCLUDE_START_ROW) 
boolean includeStartRow,
     @DefaultValue("false") @QueryParam(Constants.SCAN_INCLUDE_STOP_ROW) 
boolean includeStopRow) {
     try {
+      if (servlet.getAdmin().isTableDisabled(TableName.valueOf(this.table))) {
+        throw new ServiceUnavailableException("Table disabled.");

Review Comment:
   To be completely honest I'm not 100% sure if this is the best way to solve 
this.
   This newly created `ServiceUnavailableException` class extends `IOException` 
so that it will be caught and handled in the catch block below (also 
incrementing failed requests metrics).
   What do you think?



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to