Github user keith-turner commented on a diff in the pull request:
https://github.com/apache/accumulo/pull/16#discussion_r17987986
--- Diff:
server/base/src/main/java/org/apache/accumulo/server/fs/VolumeManagerImpl.java
---
@@ -560,8 +565,22 @@ public ContentSummary getContentSummary(Path dir)
throws IOException {
}
@Override
- public String choose(String[] options) {
- return chooser.choose(options);
+ public String choose(Optional<String> tableId, String[] options) {
+ // If the tableId is present, use that to create a
VolumeChooserEnvironment variable
+ if (tableId.isPresent()) {
+ // Get the current instance and from that the
ServerConfigurationFactory and in turn the tableId
+ Instance instance = HdfsZooInstance.getInstance();
+ ServerConfigurationFactory serverConf = new
ServerConfigurationFactory(instance);
+ TableConfiguration tableConf =
serverConf.getTableConfiguration(tableId.get());
+
+ // Create the environment and then choose the volume using the
currently defined chooser
+ VolumeChooserEnvironment env = new
VolumeChooserEnvironment(tableConf);
+ return chooser.choose(env, options);
+ } else {
+ // If the tableId is missing, then just choose using the current
chooser, without using the per table properties
+ log.info("TABLE ID MISSING");
--- End diff --
this is not a very useful log message, and I assume it will occur regularly
in the case when a volume is chosen for walogs... maybe drop it
---
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 [email protected] or file a JIRA ticket
with INFRA.
---