private void resetPartition() {
    if (adminForDc.size() != 1) {
      throw new IllegalStateException("The dc count is not 1 for resetting partition operation");
    }
    HelixAdmin helixAdmin = adminForDc.values().iterator().next();
    String instanceName;
    if (portNum == null) {
      Optional<DataNodeId> optionalDataNode =
          staticClusterMap.getDataNodeIds().stream().filter(node -> node.getHostname().equals(hostName)).findFirst();
      if (!optionalDataNode.isPresent()) {
        throw new IllegalStateException("Host " + hostName + " is not found in static clustermap");
      }
      DataNodeId dataNodeId = optionalDataNode.get();
      instanceName = getInstanceName(dataNodeId);
    } else {
      instanceName = ClusterMapUtils.getInstanceName(hostName, portNum);
    }
    String resourceName = getResourceNameOfPartition(helixAdmin, clusterName, partitionName);
    info("Resetting partition {} under resource {} on node {}", partitionName, resourceName, hostName);
    helixAdmin.resetPartition(clusterName, instanceName, resourceName, Collections.singletonList(partitionName));
    partitionsReset.getAndIncrement();
  }
Reset the partition on specific node.
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixBootstrapUpgradeUtil.java