use of org.apache.accumulo.core.volume.NonConfiguredVolume in project accumulo by apache.
the class VolumeManagerImpl method getVolumeByPath.
@Override
public Volume getVolumeByPath(Path path) {
if (path.toString().contains(":")) {
try {
FileSystem desiredFs = path.getFileSystem(CachedConfiguration.getInstance());
URI desiredFsUri = desiredFs.getUri();
Collection<Volume> candidateVolumes = volumesByFileSystemUri.get(desiredFsUri);
if (null != candidateVolumes) {
for (Volume candidateVolume : candidateVolumes) {
if (candidateVolume.isValidPath(path)) {
return candidateVolume;
}
}
} else {
log.debug("Could not determine volume for Path: {}", path);
}
return new NonConfiguredVolume(desiredFs);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
return defaultVolume;
}
Aggregations