private void throttle() throws InterruptedIOException {
    long sleepTime = calSleepTimeMs();
    totalSleepTime += sleepTime;
    try {
      TimeUnit.MILLISECONDS.sleep(sleepTime);
    } catch (InterruptedException e) {
      throw new InterruptedIOException("Thread aborted");
    }
  }
Read bytes starting from the specified position. This requires rawStream is an instance of
{@link PositionedReadable}.
@return the number of bytes read
hbase-common/src/main/java/org/apache/hadoop/hbase/io/hadoopbackport/ThrottledInputStream.java