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/07/30 15:02:12 UTC

[GitHub] [incubator-heron] nicknezis opened a new pull request #3704: Adding missing logic to provide Remote Debug ports to the Executor

nicknezis opened a new pull request #3704:
URL: https://github.com/apache/incubator-heron/pull/3704


   The remote debug ports were being added to the Pod Spec, but the logic was never added to provide the port information to the Heron Executor which launches the Java processes.
   
   Also there was an issue with the Kubernetes port name being larger than 15 characters. So I renamed it to fit the K8s spec.


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



[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

Posted by GitBox <gi...@apache.org>.
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



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

Posted by GitBox <gi...@apache.org>.
joshfischer1108 commented on a change in pull request #3704:
URL: https://github.com/apache/incubator-heron/pull/3704#discussion_r680506428



##########
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:
       Do we want to get rid of this magic number here in the code? It's readable to me, but may not be to others.




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



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

Posted by GitBox <gi...@apache.org>.
nicknezis merged pull request #3704:
URL: https://github.com/apache/incubator-heron/pull/3704


   


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