@Override
    public int read(byte[] b, int off, int len) throws IOException {
      int n;
      try {
        n = in.read(b, off, len);
      } catch (FileNotFoundException e) {
        n = tryOpen().read(b, off, len);
      }
      if (n > 0) {
        pos += n;
      }
      assert (in.getPos() == pos);
      return n;
    }
FileLink InputStream that handles the switch between the original path and the alternative
locations, when the file is moved.
hbase-server/src/main/java/org/apache/hadoop/hbase/io/FileLink.java