You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@heron.apache.org by GitBox <gi...@apache.org> on 2021/08/01 20:40:03 UTC

[GitHub] [incubator-heron] nicknezis commented on a change in pull request #3704: Adding missing logic to Kubernetes Scheduler to properly set the Remote Debug ports

nicknezis commented on a change in pull request #3704:
URL: https://github.com/apache/incubator-heron/pull/3704#discussion_r680562961



##########
File path: heron/schedulers/src/java/org/apache/heron/scheduler/kubernetes/V1Controller.java
##########
@@ -297,15 +296,26 @@ void deleteStatefulSet() {
             + "] in namespace [" + getNamespace() + "] is deleted.");
   }
 
-  protected List<String> getExecutorCommand(String containerId) {
+  protected List<String> getExecutorCommand(String containerId, int numOfInstances) {
+    final Config configuration = getConfiguration();
+    final Config runtimeConfiguration = getRuntimeConfiguration();
     final Map<ExecutorPort, String> ports =
         KubernetesConstants.EXECUTOR_PORTS.entrySet()
             .stream()
             .collect(Collectors.toMap(Map.Entry::getKey,
                 e -> e.getValue().toString()));
 
-    final Config configuration = getConfiguration();
-    final Config runtimeConfiguration = getRuntimeConfiguration();
+    if (TopologyUtils.getTopologyRemoteDebuggingEnabled(Runtime.topology(runtimeConfiguration))
+            && numOfInstances != 0) {

Review comment:
       I copied this code from another scheduler. If we change it, we should fix it everywhere. Any name suggestions? My gut feeling is that this one might be obvious, so ok to keep as is.




-- 
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: commits-unsubscribe@heron.apache.org

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