class FsDatasetImpl implements FsDatasetSpi<FsVolumeImpl> {

  @Override
  public synchronized void addVolumes(Collection<StorageLocation> volumes)
      throws IOException {
    final Collection<StorageLocation> dataLocations =
        DataNode.getStorageLocations(this.conf);
    Map<String, Storage.StorageDirectory> allStorageDirs =
        new HashMap<String, Storage.StorageDirectory>();
    for (int idx = 0; idx < dataStorage.getNumStorageDirs(); idx++) {
      Storage.StorageDirectory sd = dataStorage.getStorageDir(idx);
      allStorageDirs.put(sd.getRoot().getAbsolutePath(), sd);
    }

    for (StorageLocation vol : volumes) {
      String key = vol.getFile().getAbsolutePath();
      if (!allStorageDirs.containsKey(key)) {
        LOG.warn("Attempt to add an invalid volume: " + vol.getFile());
      } else {
        addVolume(dataLocations, allStorageDirs.get(key));
      }
    }
  }

    FsDatasetImpl(DataNode datanode, DataStorage storage, Configuration conf
      );

}