Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0-alpha-1, 2.1.0, 2.2.0
-
None
-
None
Description
Currently when a scanner timeout error occurs on the RS side, a client will get a RetriesExhaustedException that will make the client to fail, however from the REST server point of view that is just an IOE:
org.apache.hadoop.hbase.rest.ScannerResultGenerator#next
} else { Result result = null; try { result = scanner.next(); } catch (UnknownScannerException e) { throw new IllegalArgumentException(e); } catch (TableNotEnabledException tnee) { throw new IllegalStateException(tnee); } catch (TableNotFoundException tnfe) { throw new IllegalArgumentException(tnfe); } catch (IOException e) { LOG.error(StringUtils.stringifyException(e)); }
Now, with that empty result (will handle this as an HTTP 204 response back to the client:
org.apache.hadoop.hbase.rest.ScannerInstanceResource#get
... Cell value = null; try { value = generator.next(); } catch (IllegalStateException e) { ... } catch (IllegalArgumentException e) { ... } ... if (value == null) { if (LOG.isTraceEnabled()) { LOG.trace("generator exhausted"); } // respond with 204 (No Content) if an empty cell set would be // returned if (count == limit) { return Response.noContent().build(); } break;
Obviously this is wrong, since a RetriesExhaustedException is most likely due a failure in the RS side. The correct behavior should be a 504 Gateway Timeout Error.