@Override
      public void run() {
        try {
          region.lock.writeLock().lock();
          stopped.set(false);
          while (!stopped.get()) {
            Thread.sleep(100);
          }
        } catch (InterruptedException ie) {
        } finally {
          region.lock.writeLock().unlock();
        }
      }
Test RegionTooBusyException thrown when region is busy
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestHRegion.java