You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gearpump.apache.org by huafengw <gi...@git.apache.org> on 2016/05/23 08:57:04 UTC

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

GitHub user huafengw opened a pull request:

    https://github.com/apache/incubator-gearpump/pull/23

    fix GEARPUMP-117 add scripts to start and stop the cluster

    

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

    $ git pull https://github.com/huafengw/incubator-gearpump deploy

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

    https://github.com/apache/incubator-gearpump/pull/23.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 #23
    
----
commit c903f13b45e953ba0084263763d017ad1c59e68f
Author: huafengw <fv...@gmail.com>
Date:   2016-05-23T08:37:04Z

    fix GEARPUMP-117 add scripts to start and stop the cluster

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

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

    https://github.com/apache/incubator-gearpump/pull/23#discussion_r64195854
  
    --- Diff: bin/gear-daemon.sh ---
    @@ -0,0 +1,128 @@
    +#!/usr/bin/env bash
    +
    +USAGE="Usage: gear-daemon.sh (start|stop|stop-all) (local|master|worker) [args]"
    +
    +OPERATION=$1
    +DAEMON=$2
    +ARGS=("${@:3}") # get remaining arguments as array
    +
    +case $DAEMON in
    +    (master)
    +        BASH_TO_RUN=master
    --- End diff --
    
    do we support run web services service via this script?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

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

    https://github.com/apache/incubator-gearpump/pull/23#discussion_r64197132
  
    --- Diff: bin/gear-daemon.sh ---
    @@ -0,0 +1,128 @@
    +#!/usr/bin/env bash
    +
    +USAGE="Usage: gear-daemon.sh (start|stop|stop-all) (local|master|worker) [args]"
    +
    +OPERATION=$1
    +DAEMON=$2
    +ARGS=("${@:3}") # get remaining arguments as array
    +
    +case $DAEMON in
    +    (master)
    +        BASH_TO_RUN=master
    --- End diff --
    
    I didn't add it, do you think it's better to support?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

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

    https://github.com/apache/incubator-gearpump/pull/23#discussion_r64684382
  
    --- Diff: docs/deployment-standalone.md ---
    @@ -55,3 +55,12 @@ The default username and password is "admin:admin", you can check
     ![Dashboard](img/dashboard.gif)
     
     **NOTE:** The UI port can be configured in `gear.conf`. Check [Configuration Guide](deployment-configuration.html) for information.
    +
    +### Bash tool to start cluster
    +
    +There is a bash tool `bin/start-cluster.sh` can launch the cluster conveniently. You need to change the file `conf/masters`, `conf/workers` and 'conf/dashboard' to specify the corresponding machines.
    --- End diff --
    
    'conf/dashboard'  is not in correct format


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

Posted by codecov-io <gi...@git.apache.org>.
Github user codecov-io commented on the pull request:

    https://github.com/apache/incubator-gearpump/pull/23#issuecomment-220928036
  
    ## [Current coverage][cc-pull] is **62.86%**
    > Merging [#23][cc-pull] into [master][cc-base-branch] will increase coverage by **1.17%**
    
    1. 2 files (not in diff) in `...rpump/cluster/master` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#6461656D6F6E2F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F636C75737465722F6D6173746572) 
      - Misses `+75` 
      - Hits `-75`
    1. 1 files (not in diff) in `...che/gearpump/cluster` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#6461656D6F6E2F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F636C7573746572) 
      - Misses `+1` 
      - Hits `-1`
    1. 1 files (not in diff) in `.../org/apache/gearpump` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#6461656D6F6E2F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D70) 
      - Misses `+8` 
      - Hits `-8`
    1. 7 files (not in diff) in `...apache/gearpump/util` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#636F72652F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F7574696C) 
      - Misses `-52` 
      - Hits `+52`
    1. 2 files (not in diff) in `...rpump/cluster/client` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#636F72652F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F636C75737465722F636C69656E74) 
      - Misses `-47` 
      - Hits `+47`
    1. 2 files (not in diff) in `...mp/cluster/appmaster` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#636F72652F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F636C75737465722F6170706D6173746572) 
      - Misses `-9` 
      - Hits `+9`
    1. 7 files (not in diff) in `...che/gearpump/cluster` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#636F72652F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F636C7573746572) 
      - Misses `-42` 
      - Hits `+42`
    1. 1 files (not in diff) in `.../org/apache/gearpump` were modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#636F72652F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D70) 
      - Misses `-1` 
      - Hits `+1`
    1. File `...ntStoreFactory.scala` (not in diff) was modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#65787465726E616C2F6861646F6F7066732F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F73747265616D696E672F6861646F6F702F4861646F6F70436865636B706F696E7453746F7265466163746F72792E7363616C61) 
      - Misses `-2` 
      - Partials `0` 
      - Hits `+2`
    1. File `...cutor/Executor.scala` (not in diff) was modified. [more](https://codecov.io/gh/apache/incubator-gearpump/commit/c903f13b45e953ba0084263763d017ad1c59e68f/changes?src=pr#73747265616D696E672F7372632F6D61696E2F7363616C612F6F72672F6170616368652F6765617270756D702F73747265616D696E672F6578656375746F722F4578656375746F722E7363616C61) 
      - Misses `-1` 
      - Partials `0` 
      - Hits `+1`
    
    ```diff
    @@             master        #23   diff @@
    ==========================================
      Files           180        180          
      Lines          5950       5950          
      Methods        5671       5671          
      Messages          0          0          
      Branches        279        279          
    ==========================================
    + Hits           3670       3740    +70   
    + Misses         2280       2210    -70   
      Partials          0          0          
    ```
    
    [![Sunburst](https://codecov.io/gh/apache/incubator-gearpump/pull/23/graphs/sunburst.svg?src=pr&size=150)][cc-pull]
    
    > Powered by [Codecov](https://codecov.io?src=pr). Last updated by [a1b2352...c903f13][cc-compare]
    [cc-base-branch]: https://codecov.io/gh/apache/incubator-gearpump/branch/master?src=pr
    [cc-compare]: https://codecov.io/gh/apache/incubator-gearpump/compare/a1b23525207f86b1a12e3106d98217844df7f762...c903f13b45e953ba0084263763d017ad1c59e68f
    [cc-pull]: https://codecov.io/gh/apache/incubator-gearpump/pull/23?src=pr


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

Posted by huafengw <gi...@git.apache.org>.
Github user huafengw commented on the pull request:

    https://github.com/apache/incubator-gearpump/pull/23#issuecomment-221764757
  
    Updated 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

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

    https://github.com/apache/incubator-gearpump/pull/23#discussion_r64195757
  
    --- Diff: bin/config.sh ---
    @@ -0,0 +1,84 @@
    +#!/usr/bin/env bash
    +
    +GEARPUMP_PID_DIR=""                                 # Directory to store *.pid files to
    +DEFAULT_ENV_PID_DIR="/tmp"                          # Default directory to store *.pid files to
    +
    +GEARPUMP_LOG_DIR=""
    +DEFAULT_ENV_LOG_DIR="/tmp/gear-logs"
    +
    +if [ "$GEARPUMP_PID_DIR" = "" ]; then
    +    GEARPUMP_PID_DIR=${DEFAULT_ENV_PID_DIR}
    +fi
    +
    +if [ "$GEARPUMP_LOG_DIR" = "" ]; then
    +    GEARPUMP_LOG_DIR=${DEFAULT_ENV_LOG_DIR}
    +fi
    +
    +bin=`dirname "$0"`
    +SYMLINK_RESOLVED=`cd "$bin"; pwd -P`
    +
    +# Define the main directory of the gearpump installation
    +export GEAR_ROOT_DIR=`dirname "$SYMLINK_RESOLVED"`
    +export GEAR_BIN_DIR="$GEAR_ROOT_DIR/bin"
    +export GEAR_CONF_DIR="$GEAR_ROOT_DIR/conf"
    +
    +readMasters() {
    +    MASTERS_FILE="${GEAR_CONF_DIR}/masters"
    +
    +    if [[ ! -f "${MASTERS_FILE}" ]]; then
    +        echo "No masters file. Please specify masters in 'conf/masters'."
    +        exit 1
    +    fi
    +
    +    MASTERS=()
    +    MASTERPORTS=()
    +
    +    while IFS='' read -r line || [[ -n "$line" ]]; do
    +        HOSTPORT=$( extractHostName $line)
    +
    +        if [ -n "$HOSTPORT" ]; then
    +            HOST=$(echo $HOSTPORT | cut -f1 -d:)
    +            PORT=$(echo $HOSTPORT | cut -s -f2 -d:)
    +            MASTERS+=(${HOST})
    +
    +            if [ -z "$PORT" ]; then
    +                MASTERPORTS+=(3000)
    +            else
    +                MASTERPORTS+=(${PORT})
    +            fi
    +        fi
    +    done < "$MASTERS_FILE"
    +}
    +
    +readSlaves() {
    +    SLAVES_FILE="${GEAR_CONF_DIR}/slaves"
    --- End diff --
    
    better to make naming consistent. E.g. Gearpump has "worker", but not "slave". So, it is better to rename "slaves" to "workers".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

Posted by whjiang <gi...@git.apache.org>.
Github user whjiang commented on the pull request:

    https://github.com/apache/incubator-gearpump/pull/23#issuecomment-222067586
  
    +1.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

Posted by manuzhang <gi...@git.apache.org>.
Github user manuzhang commented on the pull request:

    https://github.com/apache/incubator-gearpump/pull/23#issuecomment-221773340
  
    LGTM +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-gearpump/pull/23


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] incubator-gearpump pull request: fix GEARPUMP-117 add scripts to s...

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

    https://github.com/apache/incubator-gearpump/pull/23#discussion_r64197362
  
    --- Diff: bin/gear-daemon.sh ---
    @@ -0,0 +1,128 @@
    +#!/usr/bin/env bash
    +
    +USAGE="Usage: gear-daemon.sh (start|stop|stop-all) (local|master|worker) [args]"
    +
    +OPERATION=$1
    +DAEMON=$2
    +ARGS=("${@:3}") # get remaining arguments as array
    +
    +case $DAEMON in
    +    (master)
    +        BASH_TO_RUN=master
    --- End diff --
    
    yes. Better to do it as web service is also part of GP deployment. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---