keith-turner opened a new issue, #4532:
URL: https://github.com/apache/accumulo/issues/4532

   **Is your feature request related to a problem? Please describe.**
   
   When using scan servers and the default plugins if the set of scan servers 
is empty, then the default plugin will fall back to tablet severs.  Depending 
on how resources are allocated this may be undesirable and cause problems.  
Scan servers would be more useful if it was possible to wait for scan servers 
when none currently exists.
   
   **Describe the solution you'd like**
   
   Add an option to 
[ConfigurableScanServerSelector](https://github.com/apache/accumulo/blob/2.1/core/src/main/java/org/apache/accumulo/core/spi/scan/ConfigurableScanServerSelector.java)
 for waiting on tservers.  This could look like the following where  
`"waitForTservers":true` is the new option.
   
   ```json
       [
        {
          "isDefault":true,
          "maxBusyTimeout":"5m",
          "busyTimeoutMultiplier":4,
          "waitForTservers":true
          "attemptPlans":[
            {"servers":"3", "busyTimeout":"33ms"},
            {"servers":"100%", "busyTimeout":"100ms"}
          ]
        }
       ]
   ```
   
   
   Support for this new option could be added by having the 
ConfigurableScanServerSelector loop where it sleeps and checks the set of scan 
servers.  
   
   Scanners can hive timeouts set, so waiting in the plugin could violate those 
timeouts.  To handle this, may want to add support to the SPI for waiting that 
takes the scanner timeouts into consideration.  Could add support to 
[ScanServerSelector.SelectorParameters](https://github.com/apache/accumulo/blob/86c81e42d2bb8ee7ba45f977a2757adf706c327d/core/src/main/java/org/apache/accumulo/core/spi/scan/ScanServerSelector.java#L90)
 for waiting
   
   ```java
     interface SelectorParameters {
          /**
            *  Determines if a scan server selector can wait for a conditoin to 
be true (like scan servers to be present).  If this returns true and the 
desired state is not met, then throw a timed out exception.
            */
          boolean hasTimedOut();
    }
   ```
   
   
   Then ConfigurableScanServerSelector could call the `hasTimedOut()` function 
in its loop waiting for non zero tservers.  Adding support for timeouts to the 
SPI could be follow on work.
   


-- 
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.

To unsubscribe, e-mail: notifications-unsubscr...@accumulo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to