code: private String newStorageID() {
      String newID = null;
      while (newID == null) {
        newID = "DS" + Integer.toString(r.nextInt());
        if (datanodeMap.get(newID) != null) {
          newID = null;
        }
      }
      return newID;
    }
docs: Generate new storage ID.
  
  @return unique storage ID
  <p/>
  Note: that collisions are still possible if somebody will try
  to bring in a data storage from a different cluster.