public void closeFile(MobFile file) {
    IdLock.Entry lockEntry = null;
    try {
      if (!isCacheEnabled) {
        file.close();
      } else {
        lockEntry = keyLock.getLockEntry(hashFileName(file.getFileName()));
        file.close();
      }
    } catch (IOException e) {
      LOG.error("MobFileCache, Exception happen during close " + file.getFileName(), e);
    } finally {
      if (lockEntry != null) {
        keyLock.releaseLockEntry(lockEntry);
      }
    }
  }
Closes a mob file.
@param file The mob file that needs to be closed.
hbase-server/src/main/java/org/apache/hadoop/hbase/mob/MobFileCache.java