@Override
    public boolean isValidPartition(String partitionID) {
      try {
        String resource = getResourceForPartitionInLocalDc(partitionID).iterator().next();
        String tag = dcToResourceNameToTag.get(clusterMapConfig.clusterMapDatacenterName).get(resource);
        ResourceProperty resourceProperty  =
            dcToTagToResourceProperty.get(clusterMapConfig.clusterMapDatacenterName).get(tag);
        return resourceProperty.replicationFactor >= clusterMapConfig.routerPutSuccessTarget;
      } catch (Exception e) {
        return false;
      }
    }
@param partitionID
@return boolean regarding whether we can write to it
ambry-clustermap/src/main/java/com/github/ambry/clustermap/HelixClusterManager.java