milleruntime commented on a change in pull request #1553: Simplify some
VolumeManager tooling
URL: https://github.com/apache/accumulo/pull/1553#discussion_r389875112
##########
File path:
server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
##########
@@ -95,23 +94,18 @@ protected VolumeManagerImpl(Map<String,Volume> volumes,
Volume defaultVolume,
this.hadoopConf = hadoopConf;
}
- private void invertVolumesByFileSystem(Map<String,Volume> forward,
- Multimap<URI,Volume> inverted) {
- for (Volume volume : forward.values()) {
- inverted.put(volume.getFileSystem().getUri(), volume);
- }
+ private Multimap<URI,Volume> invertVolumesByFileSystem(Map<String,Volume>
forward) {
+ Multimap<URI,Volume> inverted = HashMultimap.create();
+ forward.values().forEach(volume ->
inverted.put(volume.getFileSystem().getUri(), volume));
+ return inverted;
}
- public static org.apache.accumulo.server.fs.VolumeManager getLocal(String
localBasePath)
- throws IOException {
+ // for testing only
+ public static VolumeManager getLocalForTesting(String localBasePath) throws
IOException {
Review comment:
This makes me think we should just create our own annotation for
VisibleForTesting since its not used for anything else other than a label.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services