You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@nemo.apache.org by GitBox <gi...@apache.org> on 2019/08/07 13:53:30 UTC

[GitHub] [incubator-nemo] taegeonum commented on a change in pull request #229: [NEMO-404] Provide user argument to use lambda executor representer

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