[ 
https://issues.apache.org/jira/browse/FLINK-10341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16613495#comment-16613495
 ] 

ASF GitHub Bot commented on FLINK-10341:
----------------------------------------

zjffdu opened a new pull request #6690: [FLINK-10341][shell script] Add option 
to print flink command when running bin/flink
URL: https://github.com/apache/flink/pull/6690
 
 
   ## What is the purpose of the change
   
   The purpose is to print the final java command when running `bin/flink`, 
this would be useful for developer to debug the flink program especially when 
hitting weird launch issue such classpath issue.  
   
   ## Brief change log
   
   Just introduce env variable `PRINT_FLINK_COMMAND`, when it is set, user can 
see the final java command.
   
   ## Verifying this change
   
   User can print flink command via setting env PRINT_FLINK_COMMAND.
   
   e.g. 
   ```
   export PRINT_FLINK_COMMAND=1 
   bin/flink run -h
   ```
   
   Here's the output
   ```
   
FLINK_COMMAND:/Library/Java/JavaVirtualMachines/jdk1.8.0_172.jdk/Contents/Home/bin/java
  
-Dlog.file=/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/log/flink-jzhang-client-HW12527.log
 
-Dlog4j.configuration=file:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/conf/log4j-cli.properties
 
-Dlogback.configurationFile=file:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/conf/logback.xml
 -classpath 
:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/lib/flink-dist_2.11-1.7-SNAPSHOT.jar:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/lib/flink-python_2.11-1.7-SNAPSHOT.jar:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/lib/flink-shaded-hadoop2-uber-1.7-SNAPSHOT.jar:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/lib/log4j-1.2.17.jar:/Users/jzhang/github/flink/flink-dist/target/flink-1.7-SNAPSHOT-bin/flink-1.7-SNAPSHOT/lib/slf4j-log4j12-1.7.7.jar:::
 org.apache.flink.client.cli.CliFrontend run -h
   
   Action "run" compiles and runs a program.
   
     Syntax: run [OPTIONS] <jar-file> <arguments>
     "run" action options:
        -c,--class <classname>               Class with the program entry point
                                             ("main" method or "getPlan()" 
method.
                                             Only needed if the JAR file does 
not
                                             specify the class in its manifest.
   ...
   ```
   ## 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)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


> Add option to print flink command when running bin/flink
> --------------------------------------------------------
>
>                 Key: FLINK-10341
>                 URL: https://issues.apache.org/jira/browse/FLINK-10341
>             Project: Flink
>          Issue Type: Improvement
>          Components: Startup Shell Scripts
>            Reporter: Jeff Zhang
>            Assignee: Jeff Zhang
>            Priority: Major
>              Labels: pull-request-available
>
> It would be very useful if I can see the final java command which is used to 
> run flink program, specially when I hit very weird issue as flink 
> contributor. 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to