code: void setTargets(DatanodeDescriptor[] locs, long generationStamp) {
      setTargets(locs);
      if (locs == null) {
        targetGSs = null;
        return;
      }
      long[] targetGSs = new long[locs.length];
      for (int i=0; i<targetGSs.length; i++) {
        targetGSs[i] = generationStamp;
      }
      this.targetGSs = targetGSs;
    }
docs: Set targets for list of replicas all sharing the same generationStamp
  
  @param locs location of replicas
  @param generationStamp shared generation stamp