milleruntime commented on a change in pull request #2552:
URL: https://github.com/apache/accumulo/pull/2552#discussion_r821897512



##########
File path: 
server/tserver/src/main/java/org/apache/accumulo/tserver/TabletServer.java
##########
@@ -754,14 +754,9 @@ public void run() {
     mincMetrics = new TabletServerMinCMetrics();
     ceMetrics = new CompactionExecutorsMetrics();
     MetricsUtil.initializeProducers(metrics, updateMetrics, scanMetrics, 
mincMetrics, ceMetrics);
-
-    this.compactionManager = new CompactionManager(new Iterable<Compactable>() 
{
-      @Override
-      public Iterator<Compactable> iterator() {
-        return 
Iterators.transform(onlineTablets.snapshot().values().iterator(),
-            Tablet::asCompactable);
-      }
-    }, getContext(), ceMetrics);
+    var tabletIterator = onlineTablets.snapshot().values().iterator();
+    Iterable<Compactable> compactables = () -> transform(tabletIterator, 
Tablet::asCompactable);

Review comment:
       Good catch. I don't see how yours is any different though.




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

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


Reply via email to