You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by GitBox <gi...@apache.org> on 2021/12/29 13:01:02 UTC

[GitHub] [incubator-kyuubi] wForget opened a new pull request #1650: [KYUUBI #1649] Determine the yarn command in stop-application.sh.

wForget opened a new pull request #1650:
URL: https://github.com/apache/incubator-kyuubi/pull/1650


   <!--
   Thanks for sending a pull request!
   
   Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://kyuubi.readthedocs.io/en/latest/community/contributions.html
     2. If the PR is related to an issue in https://github.com/apache/incubator-kyuubi/issues, add '[KYUUBI #XXXX]' in your PR title, e.g., '[KYUUBI #XXXX] Your PR title ...'.
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][KYUUBI #XXXX] Your PR title ...'.
   -->
   
   ### _Why are the changes needed?_
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you add a feature, you can talk about the use case of it.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   When HADOOP_HOME is not set, the stop-application.sh script cannot kill the yarn task even if the yarn command exists. #1649
   
   ### _How was this patch tested?_
   - [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
   
   - [X] Add screenshots for manual tests if appropriate
   ![image](https://user-images.githubusercontent.com/17894939/147664786-564b20b7-ce90-47ec-bffb-2ada93774345.png)
   
   - [X] [Run test](https://kyuubi.readthedocs.io/en/latest/develop_tools/testing.html#running-tests) locally before make a pull request
   


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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on a change in pull request #1650: [KYUUBI #1649] Determine the yarn command in stop-application.sh.

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on a change in pull request #1650:
URL: https://github.com/apache/incubator-kyuubi/pull/1650#discussion_r776541599



##########
File path: bin/stop-application.sh
##########
@@ -21,9 +21,23 @@ if [[ $# < 1 ]] ; then
   exit 1
 fi
 
-if [[ -z ${HADOOP_HOME} ]]; then
-  echo "Error: HADOOP_HOME IS NOT SET! CANNOT PROCEED."
+check_cmd() {
+    command -v "$1" > /dev/null 2>&1
+}
+
+YARN_CMD=""
+
+if check_cmd "yarn"; then
+  YARN_CMD="yarn"
+fi
+
+if [ -z "$YARN_CMD" ] && [ -n "${HADOOP_HOME}" ] && check_cmd "${HADOOP_HOME}/bin/yarn"; then
+  YARN_CMD="${HADOOP_HOME}/bin/yarn"
+fi
+
+if [[ -z "$YARN_CMD" ]]; then
+  echo "Error: Cannot find yarn command! CANNOT PROCEED."

Review comment:
       can we enrich this error msg like:
   ```
   please ensure your 'yarn' command is available or define the 'HADOOP_HOME'  which contains yarn script in 'kyuubi-env.sh'.
   ```

##########
File path: bin/stop-application.sh
##########
@@ -21,9 +21,23 @@ if [[ $# < 1 ]] ; then
   exit 1
 fi
 
-if [[ -z ${HADOOP_HOME} ]]; then
-  echo "Error: HADOOP_HOME IS NOT SET! CANNOT PROCEED."
+check_cmd() {
+    command -v "$1" > /dev/null 2>&1
+}
+
+YARN_CMD=""
+
+if check_cmd "yarn"; then
+  YARN_CMD="yarn"
+fi
+
+if [ -z "$YARN_CMD" ] && [ -n "${HADOOP_HOME}" ] && check_cmd "${HADOOP_HOME}/bin/yarn"; then
+  YARN_CMD="${HADOOP_HOME}/bin/yarn"
+fi
+
+if [[ -z "$YARN_CMD" ]]; then
+  echo "Error: Cannot find yarn command! CANNOT PROCEED."
   exit 1
 fi
 
-$HADOOP_HOME/bin/yarn application -kill $1
+$YARN_CMD application -kill $1

Review comment:
       style




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

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



[GitHub] [incubator-kyuubi] ulysses-you closed pull request #1650: [KYUUBI #1649] Determine the yarn command in stop-application.sh.

Posted by GitBox <gi...@apache.org>.
ulysses-you closed pull request #1650:
URL: https://github.com/apache/incubator-kyuubi/pull/1650


   


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

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



[GitHub] [incubator-kyuubi] wForget commented on a change in pull request #1650: [KYUUBI #1649] Determine the yarn command in stop-application.sh.

Posted by GitBox <gi...@apache.org>.
wForget commented on a change in pull request #1650:
URL: https://github.com/apache/incubator-kyuubi/pull/1650#discussion_r776542217



##########
File path: bin/stop-application.sh
##########
@@ -21,9 +21,23 @@ if [[ $# < 1 ]] ; then
   exit 1
 fi
 
-if [[ -z ${HADOOP_HOME} ]]; then
-  echo "Error: HADOOP_HOME IS NOT SET! CANNOT PROCEED."
+check_cmd() {
+    command -v "$1" > /dev/null 2>&1
+}
+
+YARN_CMD=""
+
+if check_cmd "yarn"; then
+  YARN_CMD="yarn"
+fi
+
+if [ -z "$YARN_CMD" ] && [ -n "${HADOOP_HOME}" ] && check_cmd "${HADOOP_HOME}/bin/yarn"; then
+  YARN_CMD="${HADOOP_HOME}/bin/yarn"
+fi
+
+if [[ -z "$YARN_CMD" ]]; then
+  echo "Error: Cannot find yarn command! CANNOT PROCEED."

Review comment:
       Great, i will do that.




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

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



[GitHub] [incubator-kyuubi] codecov-commenter commented on pull request #1650: [KYUUBI #1649] Determine the yarn command in stop-application.sh.

Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #1650:
URL: https://github.com/apache/incubator-kyuubi/pull/1650#issuecomment-1002846003


   # [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
   > Merging [#1650](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (aa8c08d) into [master](https://codecov.io/gh/apache/incubator-kyuubi/commit/7d68aa07ff172c2c8deb65c891cce04370a446ca?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (7d68aa0) will **decrease** coverage by `0.01%`.
   > The diff coverage is `n/a`.
   
   [![Impacted file tree graph](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650/graphs/tree.svg?width=650&height=150&src=pr&token=925D4tb9AH&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   
   ```diff
   @@             Coverage Diff              @@
   ##             master    #1650      +/-   ##
   ============================================
   - Coverage     59.60%   59.58%   -0.02%     
     Complexity      193      193              
   ============================================
     Files           265      265              
     Lines         13082    13082              
     Branches       1649     1649              
   ============================================
   - Hits           7797     7795       -2     
   - Misses         4625     4626       +1     
   - Partials        660      661       +1     
   ```
   
   
   | [Impacted Files](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
   |---|---|---|
   | [...he/kyuubi/engine/spark/repl/KyuubiSparkILoop.scala](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-ZXh0ZXJuYWxzL2t5dXViaS1zcGFyay1zcWwtZW5naW5lL3NyYy9tYWluL3NjYWxhL29yZy9hcGFjaGUva3l1dWJpL2VuZ2luZS9zcGFyay9yZXBsL0t5dXViaVNwYXJrSUxvb3Auc2NhbGE=) | `90.16% <0.00%> (-3.28%)` | :arrow_down: |
   
   ------
   
   [Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   > `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
   > Powered by [Codecov](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [7d68aa0...aa8c08d](https://codecov.io/gh/apache/incubator-kyuubi/pull/1650?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
   


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

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



[GitHub] [incubator-kyuubi] ulysses-you commented on pull request #1650: [KYUUBI #1649] Determine the yarn command in stop-application.sh.

Posted by GitBox <gi...@apache.org>.
ulysses-you commented on pull request #1650:
URL: https://github.com/apache/incubator-kyuubi/pull/1650#issuecomment-1002851742


   thanks, merging to master


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

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