/** * Get the next HBase Result from the ResultScanner, reopening the scanner if necessary. * * @return the next HBase Result from the ResultScanner. */ private Result getNextResult() { for (int retries = 0; retries < MAX_RETRIES_ON_TIMEOUT; ++retries) { try { return mResultScanner.next(); } catch (LeaseException le) { reopenScanner(); } catch (ScannerTimeoutException ste) { reopenScanner(); } catch (IOException ioe) { throw new FijiIOException(ioe); } } throw new FijiIOException(String.format( "Unable to get Result from HBase scanner after %d attempts.", MAX_RETRIES_ON_TIMEOUT)); }