gearpump-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEARPUMP-117) Script for managing cluster
Date Mon, 23 May 2016 09:52:12 GMT

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

ASF GitHub Bot commented on GEARPUMP-117:
-----------------------------------------

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".


> Script for managing cluster
> ---------------------------
>
>                 Key: GEARPUMP-117
>                 URL: https://issues.apache.org/jira/browse/GEARPUMP-117
>             Project: Apache Gearpump
>          Issue Type: Improvement
>          Components: all
>    Affects Versions: 0.8.0
>            Reporter: Qi Shu
>            Assignee: Huafeng Wang
>
> When Gearpump deployed in a cluster, let's say about 50 servers, now I have to start
or stop masters and workers one by one manually, but what if a cluster of 1000 servers. So
the suggestion is that can Gearpump provide some scripts and configtions to simplify such
operation, just like "slaves" and "start-all.sh" in hadoop.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message