public WAL getWAL(RegionInfo region) throws IOException {
    // Use different WAL for hbase:meta. Instantiates the meta WALProvider if not already up.
    if (region != null && RegionReplicaUtil.isDefaultReplica(region)) {
      if (region.isMetaRegion()) {
        return metaProvider.getProvider().getWAL(region);
      } else if (ReplicationStorageFactory.isReplicationQueueTable(conf, region.getTable())) {
        return replicationProvider.getProvider().getWAL(region);
      }
    }
    return provider.getWAL(region);
  }
@param region the region which we want to get a WAL for. Could be null.
hbase-server/src/main/java/org/apache/hadoop/hbase/wal/WALFactory.java