sumitagrawl commented on code in PR #3783:
URL: https://github.com/apache/ozone/pull/3783#discussion_r996472833


##########
hadoop-ozone/recon/src/main/java/org/apache/hadoop/ozone/recon/scm/ReconStorageContainerManagerFacade.java:
##########
@@ -260,6 +271,28 @@ public 
ReconStorageContainerManagerFacade(OzoneConfiguration conf,
         reconTaskConfig));
   }
 
+  @NotNull
+  private List<BlockingQueue<ContainerReportBase>> initContainerReportQueue() {
+    int threadPoolSize = ozoneConfiguration.getInt(OZONE_SCM_EVENT_PREFIX +
+            StringUtils.camelize(SCMEvents.CONTAINER_REPORT.getName()
+                + "_OR_"
+                + SCMEvents.INCREMENTAL_CONTAINER_REPORT.getName())
+            + ".thread.pool.size",
+        OZONE_SCM_EVENT_THREAD_POOL_SIZE_DEFAULT);
+    int queueSize = ozoneConfiguration.getInt(OZONE_SCM_EVENT_PREFIX +
+            StringUtils.camelize(SCMEvents.CONTAINER_REPORT.getName()
+                + "_OR_"
+                + SCMEvents.INCREMENTAL_CONTAINER_REPORT.getName())
+            + ".queue.size",
+        OZONE_SCM_EVENT_CONTAINER_REPORT_QUEUE_SIZE_DEFAULT);
+    List<BlockingQueue<ContainerReportBase>>
+        queues = new ArrayList<>();
+    for (int i = 0; i < threadPoolSize; ++i) {
+      queues.add(new ContainerReportQueue<>(queueSize));
+    }
+    return queues;
+  }
+

Review Comment:
   @adoroszlai I am not finding way to reuse, as 
ReconStorageContainerManagerFacade is copied from SCM with many modification 
and no shared utility to be used. I can expose same from ContainerReportQueue 
but does not seems good to have this.
   Please suggest mechanism if any or let be be like this for effective 6 loc.



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

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to