nemo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [incubator-nemo] taegeonum commented on a change in pull request #229: [NEMO-404] Provide user argument to use lambda executor representer
Date Wed, 07 Aug 2019 13:53:30 GMT
taegeonum commented on a change in pull request #229: [NEMO-404] Provide user argument to use
lambda executor representer
URL: https://github.com/apache/incubator-nemo/pull/229#discussion_r311565574
 
 

 ##########
 File path: runtime/master/src/main/java/org/apache/nemo/runtime/master/resource/ContainerManager.java
 ##########
 @@ -191,11 +194,23 @@ public void onContainerAllocated(final String executorId,
       messageSender = new FailedMessageSender();
     }
 
+    final ExecutorRepresenter executorRepresenter;
     // Create the executor representation.
-    final ExecutorRepresenter executorRepresenter =
-      new ExecutorRepresenter(executorId, resourceSpec, messageSender, activeContext, serializationExecutorService,
-        activeContext.getEvaluatorDescriptor().getNodeDescriptor().getName());
-
+    if(this.executorType.equals("default")) {
 
 Review comment:
   why don't you use Factory pattern? 
   It would be good to create an interface: `ExecutorRepresenterFactory`  
   and two implementation factories: `DefaultExecutorRepresenterFactory` and `LambdaExecutorRepresenterFactory`.

   
   Also we can inject the specific factory through Tang and don't have to use `if--else` here.


----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message