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 2022/03/08 17:25:21 UTC

[GitHub] [accumulo] milleruntime commented on a change in pull request #2552: Some compaction code cleanup

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-unsubscribe@accumulo.apache.org

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