code: public static List<StoreDefinition> dropZone(List<StoreDefinition> currentStoreDefs,
                                                   int dropZoneId) {
  
          List<StoreDefinition> adjustedStoreDefList = new ArrayList<StoreDefinition>();
          for(StoreDefinition storeDef: currentStoreDefs) {
              HashMap<Integer, Integer> zoneRepFactorMap = storeDef.getZoneReplicationFactor();
              if(!zoneRepFactorMap.containsKey(dropZoneId)) {
                  throw new VoldemortException("Store " + storeDef.getName()
                                               + " does not have replication factor for zone "
                                               + dropZoneId);
              }
  
              StoreDefinitionBuilder adjustedStoreDefBuilder = StoreDefinitionUtils.getBuilderForStoreDef(storeDef);
  
              if(!storeDef.hasPreferredReads()) {
                  adjustedStoreDefBuilder.setPreferredReads(null);
              }
              if(!storeDef.hasPreferredWrites()) {
                  adjustedStoreDefBuilder.setPreferredWrites(null);
              }
  
              // Copy all zone replication factor entries except for dropped zone
              HashMap<Integer, Integer> adjustedZoneRepFactorMap = new HashMap<Integer, Integer>();
              for(Integer zoneId: zoneRepFactorMap.keySet()) {
                  if(zoneId != dropZoneId) {
                      adjustedZoneRepFactorMap.put(zoneId, zoneRepFactorMap.get(zoneId));
                  }
              }
              adjustedStoreDefBuilder.setZoneReplicationFactor(adjustedZoneRepFactorMap);
  
              // adjust the replication factor
              int zoneRepFactor = zoneRepFactorMap.get(dropZoneId);
              adjustedStoreDefBuilder.setReplicationFactor(adjustedStoreDefBuilder.getReplicationFactor()
                                                           - zoneRepFactor);
  
              adjustedStoreDefList.add(adjustedStoreDefBuilder.build());
          }
  
          return adjustedStoreDefList;
      }
docs: Similar to {@link RebalanceUtils#vacateZone(Cluster, int)}, takes the
  current store definitions in the cluster and creates store definitions
  with the specified zone effectively dropped.
  
  In order to drop a zone, we adjust the total replication factor and
  remove zone replication factor for the dropped zone
  
  
  @param currentStoreDefs
  @param dropZoneId
  @return the adjusted list of store definitions