@Override
  public CompletableFuture<Boolean> isReplicationPeerEnabled(String peerId) {
    GetReplicationPeerStateRequest.Builder request = GetReplicationPeerStateRequest.newBuilder();
    request.setPeerId(peerId);
    return this.<Boolean> newMasterCaller()
      .action((controller, stub) -> this.<GetReplicationPeerStateRequest,
        GetReplicationPeerStateResponse, Boolean> call(controller, stub, request.build(),
          (s, c, req, done) -> s.isReplicationPeerEnabled(c, req, done),
          resp -> resp.getIsEnabled()))
      .call();
  }
Set the table's replication switch if the table's replication switch is already not set.
@param tableName name of the table
@param enableRep is replication switch enable or disable
hbase-client/src/main/java/org/apache/hadoop/hbase/client/RawAsyncHBaseAdmin.java