You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/05/04 10:02:51 UTC

[GitHub] [incubator-seatunnel] legendtkl opened a new pull request, #1788: [Feature][Seatunnel-core] format usage help output

legendtkl opened a new pull request, #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788

   ## Purpose of this pull request
   
   related issue: https://github.com/apache/incubator-seatunnel/issues/1787
   
   With this PR, we can get a better output of usage help message
   
   Before
   ```shell
   ./start-seatunnel-flink.sh -h
   Usage: start-seatunnel-flink.sh [options] Options: -t, --check check config Default: false start-seatunnel-flink.sh start-seatunnel-spark.sh start-seatunnel-sql.sh -c, --config Config file -h, --help Show the usage message -r, --run-mode job run mode, run or run-application Default: RUN Possible Values: [RUN, APPLICATION_RUN] -i, --variable variable substitution, such as -i city=beijing, or -i date=20190318 Default: []
   ```
   
   After
   ```shell
   Usage: start-seatunnel-sql.sh [options]
     Options:
       -t, --check    check config (default: false)
     * -c, --config   Config file
       -h, --help     Show the usage message
       -r, --run-mode job run mode, run or run-application (default: RUN) 
                      (values: [RUN, APPLICATION_RUN])
       -i, --variable variable substitution, such as -i city=beijing, or -i 
                      date=20190318 (default: [])
   ```
   
   ## Check list
   
   * [ ] Code changed are covered with tests, or it does not need tests for reason:
   * [ ] If any new Jar binary package adding in your PR, please add License Notice according
     [New License Guide](https://github.com/apache/incubator-seatunnel/blob/dev/docs/en/contribution/new-license.md)
   * [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/incubator-seatunnel/tree/dev/docs
   


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] legendtkl commented on pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
legendtkl commented on PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#issuecomment-1118095762

   macOS Monterey  @ruanwenjun 


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#issuecomment-1118090075

   @legendtkl Which system are you using, Windows?


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] legendtkl commented on pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
legendtkl commented on PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#issuecomment-1118101462

   it's wired... This is my case.
   
   <img width="1907" alt="image" src="https://user-images.githubusercontent.com/2370761/166854835-59df2f5f-f3fa-4f5a-b40c-dd387d8b8fb7.png">
   <img width="586" alt="image" src="https://user-images.githubusercontent.com/2370761/166854847-063d970e-1d32-496f-8a10-ee2a1e884c43.png">
   


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun merged pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
ruanwenjun merged PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#issuecomment-1118106903

   > 
   
   Sorry, you are right, I didn't update my code.


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] legendtkl commented on pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
legendtkl commented on PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#issuecomment-1117136653

   Hi, @ruanwenjun , would you help review this tiny PR when you're available?
   
   Thanks,
   Kelu.


-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on a diff in pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on code in PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#discussion_r865518526


##########
seatunnel-core/seatunnel-core-flink/src/test/java/org/apache/seatunnel/core/flink/utils/CommandLineUtilsTest.java:
##########
@@ -44,6 +44,10 @@ public void testParseCommandArgs() {
         Assert.assertEquals(flinkCommandArgs.getFlinkParams(), Arrays.asList("--detached", "--unkown", "unkown-command"));
         Assert.assertEquals(flinkCommandArgs.getRunMode(), FlinkRunMode.APPLICATION_RUN);
         Assert.assertEquals(flinkCommandArgs.getVariables(), Arrays.asList("city=shenyang", "date=20200202"));
+
+        String[] args2 = {"-h"};
+        flinkCommandArgs = CommandLineUtils.parseCommandArgs(args2, FlinkJobType.SQL);
+        Assert.assertTrue(flinkCommandArgs.isHelp());

Review Comment:
   This test case need to be removed, since this will close the JVM.



-- 
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@seatunnel.apache.org

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


[GitHub] [incubator-seatunnel] ruanwenjun commented on pull request #1788: [Feature][Seatunnel-core-flink/spark] format usage help message

Posted by GitBox <gi...@apache.org>.
ruanwenjun commented on PR #1788:
URL: https://github.com/apache/incubator-seatunnel/pull/1788#issuecomment-1118097330

   > macOS Monterey @ruanwenjun
   
   It looks well on my laptop(macOS x86).
   <img width="967" alt="image" src="https://user-images.githubusercontent.com/22415594/166854279-6d6c413c-71a6-48ac-8585-44f60f220499.png">
   


-- 
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@seatunnel.apache.org

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