You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/12/06 23:33:40 UTC

[GitHub] [accumulo] ctubbsii commented on a change in pull request #1450: #1373: Preferred volume chooser support the init scope fix

ctubbsii commented on a change in pull request #1450: #1373: Preferred volume chooser support the init scope fix
URL: https://github.com/apache/accumulo/pull/1450#discussion_r355067911
 
 

 ##########
 File path: server/base/src/main/java/org/apache/accumulo/server/fs/PerTableVolumeChooser.java
 ##########
 @@ -68,11 +68,6 @@ public String choose(VolumeChooserEnvironment env, String[] options)
   // visible (not private) for testing
   VolumeChooser getDelegateChooser(VolumeChooserEnvironment env) {
     switch (env.getScope()) {
-      case INIT:
-        // TODO should be possible to read from SiteConfiguration during init
-        log.warn("Not possible to determine delegate chooser at '{}' scope. Using {}.",
-            ChooserScope.INIT, RandomVolumeChooser.class.getName());
-        return randomChooser;
 
 Review comment:
   At this point, the switch statement (here and in the other class) could be turned into a simple conditional:
   
   ```java
   if (env.getScope() == ChooserScope.TABLE) {
       return getVolumeChooserForTable(env);
   }
   return getVolumeChooserForScope(env);
   ```
   
   This probably comes down to style also... both work fine, but the conditional is slightly shorter and probably easier to read, since the choice is binary.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services