keith-turner commented on a change in pull request #2101:
URL: https://github.com/apache/accumulo/pull/2101#discussion_r631403252



##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/tablet/CompactableUtils.java
##########
@@ -226,14 +227,17 @@ static AccumuloConfiguration 
createCompactionConfiguration(Tablet tablet,
         cfg.getClassName(), CompactionConfigurer.class);
 
     configurer.init(new CompactionConfigurer.InitParamaters() {
+
+      private final ServiceEnvironment senv = new 
ServiceEnvironmentImpl(tablet.getContext());
+

Review comment:
       > which I just noticed is misspelled; should be InitParameters
   
   nice catch, that is an unreleased new API

##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServerResourceManager.java
##########
@@ -783,6 +788,11 @@ public void executeReadAhead(KeyExtent tablet, 
ScanDispatcher dispatcher, ScanSe
       scanExecutors.get("meta").execute(task);
     } else {
       DispatchParameters params = new DispatchParamsImpl() {
+
+        // in scan critical path so only create ServiceEnv if needed
+        private final Supplier<ServiceEnvironment> senvSupplier =
+            Suppliers.memoize(() -> new ServiceEnvironmentImpl(context));

Review comment:
       The [default scan 
dispatcher](https://github.com/apache/accumulo/blob/5b1c0b54e33ee108a45b2126bd194472703822f2/core/src/main/java/org/apache/accumulo/core/spi/scan/SimpleScanDispatcher.java#L141)
 does not use the service env for `init()` or `dispatch()`.




-- 
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:
[email protected]


Reply via email to