mynameborat commented on code in PR #1668:
URL: https://github.com/apache/samza/pull/1668#discussion_r1227038909


##########
samza-core/src/main/java/org/apache/samza/storage/StorageRecovery.java:
##########
@@ -229,7 +229,7 @@ private void getContainerStorageManagers() {
         .getCheckpointManager(new MetricsRegistryMap()).orElse(null);
 
     for (ContainerModel containerModel : containers.values()) {
-      ContainerContext containerContext = new 
ContainerContextImpl(containerModel, new MetricsRegistryMap());
+      ContainerContext containerContext = new 
ContainerContextImpl(containerModel, new MetricsRegistryMap(), null);

Review Comment:
   `ContainerThreadPool` when being null has special meaning in samza today and 
hence it is important keep that semantic unchanged for the framework components.
   
   Additionally, use of `Optional` constructor arguments is an anti-pattern. 
Ideally, we could have two constructors but the usage seemed minimal to warrant 
two constructors.
   
   More information on why using Optional for arguments/constructor params 
[1][2]
   
   [1] http://dolszewski.com/java/java-8-optional-use-cases/
   [2] 
https://stackoverflow.com/questions/31922866/why-should-java-8s-optional-not-be-used-in-arguments



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

Reply via email to