You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zjffdu <gi...@git.apache.org> on 2018/07/03 13:57:47 UTC

[GitHub] flink pull request #6245: FLINK-9718. Add enviroment variable in start-scala...

GitHub user zjffdu opened a pull request:

    https://github.com/apache/flink/pull/6245

    FLINK-9718. Add enviroment variable in start-scala-shell.sh to enable remote debug

    ## What is the purpose of the change
    
    Add enviroment variable `FLINK_SCALA_SHELL_JAVA_OPTS` in `start-scala-shell.sh` to enable remote debug.  
    
    ## Brief change log
    
    ## Verifying this change
    
    Verify it manually via uncomment that line in `start-scala-shell.sh`
     
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (no)
      - If yes, how is the feature documented? (not documented)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zjffdu/flink FLINK-9718

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6245.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6245
    
----
commit 7d8d10ad7e91b291c94a37ad49c4dab84a1ae00c
Author: Jeff Zhang <zj...@...>
Date:   2018-07-03T13:53:06Z

    FLINK-9718. Add enviroment variable in start-scala-shell.sh to enable remote debug

----


---

[GitHub] flink pull request #6245: [FLINK-9718][scala-shell]. Add enviroment variable...

Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6245#discussion_r200056172
  
    --- Diff: flink-scala-shell/start-script/start-scala-shell.sh ---
    @@ -19,6 +19,9 @@
     
     # from scala-lang 2.10.4
     
    +# Uncomment the following line to enable remote debug
    +# export FLINK_SCALA_SHELL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
    --- End diff --
    
    I know there is not a env variable named "FLINK_SCALA_SHELL_JAVA_OPTS" before you create. I said, it is commented, but you always used in "java" command later.
    About the bool flag, I mean we could add a flag named "remoteDebugMode" to control the "export" operation. 
    
    for example : 
    
    ```
    if $remoteDebugMode then 
    export FLINK_SCALA_SHELL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
    fi
    ```
    
    It's better than "comment" & "uncomment". Why do you think it hides the details of remote debug info?


---

[GitHub] flink pull request #6245: [FLINK-9718][scala-shell]. Add enviroment variable...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6245#discussion_r200060027
  
    --- Diff: flink-scala-shell/start-script/start-scala-shell.sh ---
    @@ -19,6 +19,9 @@
     
     # from scala-lang 2.10.4
     
    +# Uncomment the following line to enable remote debug
    +# export FLINK_SCALA_SHELL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
    --- End diff --
    
    Sorry @yanghua I still think using bool flag is not proper. Regarding `hiding the details of remote debug info`, I mean bool flag only control whether to enable remote debug, but does't control how, such as which port to listen.  If we introduce this bool flag,  we will use 2 env variable to control whether and how to remote debug which is too verbose to me. 


---

[GitHub] flink pull request #6245: FLINK-9718. Add enviroment variable in start-scala...

Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6245#discussion_r199849293
  
    --- Diff: flink-scala-shell/start-script/start-scala-shell.sh ---
    @@ -19,6 +19,9 @@
     
     # from scala-lang 2.10.4
     
    +# Uncomment the following line to enable remote debug
    +# export FLINK_SCALA_SHELL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
    --- End diff --
    
    If not remote debug mode,  it does not exist the env variable `FLINK_SCALA_SHELL_JAVA_OPTS `, but it would be used in other place. What's more, I think use a bool flag would be better that "uncomment".


---

[GitHub] flink pull request #6245: [FLINK-9718][scala-shell]. Add enviroment variable...

Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6245#discussion_r200091741
  
    --- Diff: flink-scala-shell/start-script/start-scala-shell.sh ---
    @@ -19,6 +19,9 @@
     
     # from scala-lang 2.10.4
     
    +# Uncomment the following line to enable remote debug
    +# export FLINK_SCALA_SHELL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
    --- End diff --
    
    OK, I just think using a comment which may been ignored by the user. And using a bool flag which also can control whether add  `FLINK_SCALA_SHELL_JAVA_OPTS ` as a option to java command or not. Please feel free to follow your idea.


---

[GitHub] flink issue #6245: FLINK-9718. Add enviroment variable in start-scala-shell....

Posted by yanghua <gi...@git.apache.org>.
Github user yanghua commented on the issue:

    https://github.com/apache/flink/pull/6245
  
    @zjffdu please change the PR title "FLINK-9718" to "[FLINK-9718]"


---

[GitHub] flink pull request #6245: FLINK-9718. Add enviroment variable in start-scala...

Posted by zjffdu <gi...@git.apache.org>.
Github user zjffdu commented on a diff in the pull request:

    https://github.com/apache/flink/pull/6245#discussion_r200040940
  
    --- Diff: flink-scala-shell/start-script/start-scala-shell.sh ---
    @@ -19,6 +19,9 @@
     
     # from scala-lang 2.10.4
     
    +# Uncomment the following line to enable remote debug
    +# export FLINK_SCALA_SHELL_JAVA_OPTS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005"
    --- End diff --
    
    I don't find something like `flink-env.sh` for specify flink related env variable. So I just put it in `start-scala-shell.sh` directly. I don't think bool flag is proper, as it hide the details of remote debug info, like which port to listen. I believe most of apache project use `*JAVA_OPTS` for remote debug which is very common. What do you think ?


---