private ReplicaId getBootstrapReplicaInSemiAuto(String partitionIdStr, DataNodeId dataNodeId) {
    ReplicaId bootstrapReplica = null;
    logger.info("Getting ReplicaAddition ZNRecord from HelixPropertyStore in local DC.");
    ZNRecord zNRecord = helixPropertyStoreInLocalDc.get(REPLICA_ADDITION_ZNODE_PATH, null, AccessOption.PERSISTENT);
    if (zNRecord == null) {
      logger.warn("ZNRecord from HelixPropertyStore is NULL, partition to replicaInfo map doesn't exist.");
      return null;
    }
    String instanceName = getInstanceName(dataNodeId.getHostname(), dataNodeId.getPort());
    Map<String, Map<String, String>> partitionToReplicas = zNRecord.getMapFields();
    Map<String, String> replicaInfos = partitionToReplicas.get(partitionIdStr);
    if (replicaInfos == null || !replicaInfos.containsKey(instanceName)) {
      logger.warn("Partition {} or replica on host {} is not found in replica info map", partitionIdStr, instanceName);
      return null;
    }
    long replicaCapacity = Long.parseLong(replicaInfos.get(REPLICAS_CAPACITY_STR));
    String partitionClass = replicaInfos.get(PARTITION_CLASS_STR);
    AmbryPartition mappedPartition =
        new AmbryPartition(Long.parseLong(partitionIdStr), partitionClass, helixClusterManagerQueryHelper);
    AmbryPartition currentPartition =
        partitionNameToAmbryPartition.putIfAbsent(mappedPartition.toPathString(), mappedPartition);
    if (currentPartition == null) {
      logger.info("Partition {} is currently not present in cluster map, a new partition is created", partitionIdStr);
      currentPartition = mappedPartition;
    }
    // Check if data node or disk is in current cluster map, if not, set bootstrapReplica to null.
    AmbryDataNode dataNode = instanceNameToAmbryDataNode.get(instanceName);
    String mountPathAndDiskCapacityFromHelix = replicaInfos.get(instanceName);
    String[] segments = mountPathAndDiskCapacityFromHelix.split(DISK_CAPACITY_DELIM_STR);
    String mountPath = segments[0];
    String diskCapacityStr = segments.length >= 2 ? segments[1] : null;
    Set<AmbryDisk> disks = dataNode != null ? ambryDataNodeToAmbryDisks.get(dataNode) : null;
    Optional<AmbryDisk> potentialDisk =
        disks != null ? disks.stream().filter(d -> d.getMountPath().equals(mountPath)).findAny() : Optional.empty();
    if (potentialDisk.isPresent()) {
      try {
        AmbryDisk targetDisk = potentialDisk.get();
        if (diskCapacityStr != null) {
          // update disk capacity if bootstrap replica info contains disk capacity in bytes.
          targetDisk.setDiskCapacityInBytes(Long.parseLong(diskCapacityStr));
        } else {
          logger.info("Replica addition infos map doesn't contain disk capacity. Disk {} capacity {} is not changed",
              targetDisk, targetDisk.getRawCapacityInBytes());
        }
        // Update disk usage. However, this is just for tracking. We only check the disk usage in Full-auto mode.
        targetDisk.decreaseAvailableSpaceInBytes(replicaCapacity);
        // A bootstrap replica is always ReplicaSealedStatus#NOT_SEALED.
        bootstrapReplica = new AmbryServerReplica(clusterMapConfig, currentPartition, targetDisk, true, replicaCapacity,
            ReplicaSealStatus.NOT_SEALED);
        logger.info("Created bootstrap replica {} for Partition {}", bootstrapReplica, partitionIdStr);
      } catch (Exception e) {
        logger.error("Failed to create bootstrap replica for partition {} on {} due to exception: ", partitionIdStr,
            instanceName, e);
        bootstrapReplica = null;
      }
    } else {
      logger.error(
          "Either datanode or disk that associated with bootstrap replica is not found in cluster map. Cannot create the replica.");
    }
    return bootstrapReplica;
  }
Get bootstrap replica in Helix semi auto mode.
To create bootstrap replica, {@link HelixClusterManager} needs to fetch replica info (i.e. capacity, mount path)
from Helix PropertyStore. This method looks up the ZNode in local datacenter and does some validation. Right now,
{@link HelixClusterManager} supports getting bootstrap replica of new partition but it doesn't support getting replica
residing on hosts that are not present in clustermap.
The ZNRecord of REPLICA_ADDITION_ZNODE has following format in mapFields.
<pre>
"mapFields": {
    "1": {
        "replicaCapacityInBytes": 107374182400,
        "partitionClass": "max-replicas-all-datacenters",
        "localhost1_17088": "/tmp/c/1,536870912000",
        "localhost2_17088": "/tmp/d/1,536870912000"
    },
    "2": {
        "replicaCapacityInBytes": 107374182400,
        "partitionClass": "max-replicas-all-datacenters",
        "localhost3_17088": "/tmp/e/1,536870912000"
    }
}
</pre>
In above example, two bootstrap replicas of partition[1] will be added to localhost1 and localhost2 respectively.
The host name is followed by mount path on which the bootstrap replica should be placed.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixClusterManager.java