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_r355057312
 
 

 ##########
 File path: 
server/base/src/main/java/org/apache/accumulo/server/ServiceEnvironmentImpl.java
 ##########
 @@ -44,6 +44,11 @@ public ServiceEnvironmentImpl(ServerContext ctx) {
     this.conf = new ConfigurationImpl(srvCtx.getConfiguration());
   }
 
+  public ServiceEnvironmentImpl(ServerContext ctx, AccumuloConfiguration acfg) 
{
+    this.srvCtx = ctx;
+    this.conf = new ConfigurationImpl(acfg);
+  }
+
 
 Review comment:
   One of the design goals of ServerContext is to avoid passing around multiple 
parameters, and to store server state in a consistent way with a common API 
entry point. As such, if there's anything that can be done to pass in a custom 
ServerContext into the existing constructor, that would be better than 
overloading this constructor.
   
   If removing this extra constructor isn't easily done, at the very least, the 
config should be more specific, accepting only a SiteConfiguration object, 
since others wouldn't be appropriate here (we don't want to encourage the use 
of this overloaded method in other situations, since it's generally better to 
use the config from ServerContext, instead of passing it separately).

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


With regards,
Apache Git Services

Reply via email to