@Override
  public boolean isPeerEnabled(String peerId) throws ReplicationException {
    Path disabledFile = new Path(getPeerDir(peerId), DISABLED_FILE);
    try {
      return !fs.exists(disabledFile);
    } catch (IOException e) {
      throw new ReplicationException("Unable to get status of the peer with id=" + peerId, e);
    }
  }
A filesystem based replication peer storage. The implementation does not require atomic rename so
you can use it on cloud OSS.
<p/>
FileSystem layout:

<pre>
hbase
  |
  --peers
      |
      --&lt;peer_id&gt;
          |
          --peer_config
          |
          --disabled
          |
          --sync-rep-state
</pre>

Notice that, if the peer is enabled, we will not have a disabled file.
<p/>
And for other files, to avoid depending on atomic rename, we will use two files for storing the
content. When loading, we will try to read both the files and load the newer one. And when
writing, we will write to the older file.
hbase-replication/src/main/java/org/apache/hadoop/hbase/replication/FSReplicationPeerStorage.java