Github user ctubbsii commented on a diff in the pull request: https://github.com/apache/accumulo/pull/253#discussion_r113297767 --- Diff: server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java --- @@ -68,10 +100,107 @@ public String choose(VolumeChooserEnvironment env, String[] options) { chooser = last; } } + } + return chooser; + } + + private VolumeChooser getVolumeChooserForNonTable(VolumeChooserEnvironment env, ServerConfigurationFactory localConf) { + VolumeChooser chooser; + final String customProperty = Property.GENERAL_ARBITRARY_PROP_PREFIX.getKey() + env.getScope() + ".volume.chooser"; + + if (log.isTraceEnabled()) { + log.trace("Scope: " + env.getScope()); + log.trace("Looking up property: " + customProperty); + } + + AccumuloConfiguration systemConfiguration = localConf.getConfiguration(); + String clazz = systemConfiguration.get(customProperty); + if (null == clazz || clazz.isEmpty()) { + log.debug("Property not found: " + customProperty + " using fallback chooser."); + return fallbackVolumeChooser; } else { - chooser = fallbackVolumeChooser; + chooser = scopeSpecificChooser.get(env.getScope()); + if (chooser == null) { + VolumeChooser temp; + try { + temp = loadClassForCustomProperty(clazz); + } catch (Exception e) { + log.error("Failed to create instance for " + env.getScope() + " configured to use " + clazz + " via " + customProperty); + return fallbackVolumeChooser; --- End diff -- Same comment as above. We can simplify this if we fail-hard.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---