@Override
  protected T getWAL0(RegionInfo region) throws IOException {
    T walCopy = wal;
    if (walCopy != null) {
      return walCopy;
    }
    walCreateLock.writeLock().lock();
    try {
      walCopy = wal;
      if (walCopy != null) {
        return walCopy;
      }
      walCopy = createWAL();
      initWAL(walCopy);
      wal = walCopy;
      return walCopy;
    } finally {
      walCreateLock.writeLock().unlock();
    }
  }
@param factory    factory that made us, identity used for FS layout. may not be null
@param conf       may not be null
@param providerId differentiate between providers from one factory, used for FS layout. may be
                  null
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/AbstractFSWALProvider.java