class MetadataMirrorReplicaLocationManager implements ReplicaLocationManager {

  @Override
  public Path getPartitionLocation(Partition sourcePartition) {
    if (tableType == UNPARTITIONED) {
      throw new UnsupportedOperationException("Not a partitioned table.");
    }
    // for views
    if (!LocationUtils.hasLocation(sourcePartition)) {
      return null;
    }
    return new Path(sourcePartition.getSd().getLocation());
  }

  public  MetadataMirrorReplicaLocationManager(SourceLocationManager sourceLocationManager, TableType tableType);

}