forked from odenny/hydra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/jd-bdp/hydra
- Loading branch information
Showing
26 changed files
with
269 additions
and
51 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
modules/hydra-collector-service/src/main/resources/conf.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
metaq.zk.address=192.168.200.110:2181 | ||
metaq.topic=hydra_test | ||
metaq.topic=hydra | ||
|
||
metaq.consumer.maxDelayFetchTimeInMills=100 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
metaq.zk=192.168.200.110:2181 | ||
metaq.topic=hydra_test | ||
metaq.topic=hydra | ||
metaq.zk.root=/meta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
94 changes: 94 additions & 0 deletions
94
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/All.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
#!/bin/bash | ||
cd `dirname $0` | ||
source ./env.sh | ||
|
||
MAINCLASSNAMES= \ | ||
"\ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceA \ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceB \ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceC1 \ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceC2 \ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceD1 \ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceD2 \ | ||
com.jd.bdp.hydra.benchmark.exp2.StartServiceE \ | ||
" | ||
PID_FILE="$PID_DIR/.run.pid" | ||
|
||
#function lists | ||
PIDS=`ps -f | grep java | grep "$BASE_DIR" | awk '{print $2}'` | ||
function running(){ | ||
if [ -f "$PID_FILE" ]; then | ||
pid=$(cat "$PID_FILE") | ||
process=`ps aux | grep " $pid " | grep -v grep`; | ||
if [ "$process" == "" ]; then | ||
return 1; | ||
else | ||
return 0; | ||
fi | ||
else | ||
return 1 | ||
fi | ||
} | ||
|
||
function start_server() { | ||
if running; then | ||
echo "is running." | ||
exit 1 | ||
fi | ||
|
||
mkdir -p $PID_DIR | ||
mkdir -p $LOG_DIR | ||
chown -R $AS_USER $PID_DIR | ||
chown -R $AS_USER $LOG_DIR | ||
|
||
sleep 1 | ||
nohup $JAVA $SERVER_ARGS $MAINCLASSNAME $CONFIG_FILE >$TAIL_FILE & | ||
echo $! > $PID_FILE | ||
chmod 755 $PID_FILE | ||
sleep 1; | ||
tail -F $TAIL_FILE | ||
} | ||
|
||
function stop_server() { | ||
if ! running; then | ||
echo "service is not running." | ||
exit 1 | ||
fi | ||
count=0 | ||
pid=$(cat $PID_FILE) | ||
while running; | ||
do | ||
let count=$count+1 | ||
echo "Stopping $count times" | ||
if [ $count -gt 5 ]; then | ||
echo "kill -9 $pid" | ||
kill -9 $pid | ||
else | ||
kill $pid | ||
fi | ||
sleep 3; | ||
done | ||
echo "Stop service successfully." | ||
rm $PID_FILE | ||
} | ||
|
||
function help() { | ||
echo "Usage: startup.sh {start|stop}" >&2 | ||
echo " start: start the server" | ||
echo " stop: stop the server" | ||
} | ||
|
||
command=$1 | ||
shift 1 | ||
case $command in | ||
start) | ||
start_server $@; | ||
;; | ||
stop) | ||
stop_server $@; | ||
;; | ||
*) | ||
help; | ||
exit 1; | ||
;; | ||
esac |
48 changes: 48 additions & 0 deletions
48
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/env.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
#!/bin/bash | ||
#Config your java home | ||
#JAVA_HOME=/opt/jdk/ | ||
|
||
if [ -z "$BASE_DIR" ] ; then | ||
PRG="$0" | ||
# need this for relative symlinks | ||
while [ -h "$PRG" ] ; do | ||
ls=`ls -ld "$PRG"` | ||
link=`expr "$ls" : '.*-> \(.*\)$'` | ||
if expr "$link" : '/.*' > /dev/null; then | ||
PRG="$link" | ||
else | ||
PRG="`dirname "$PRG"`/$link" | ||
fi | ||
done | ||
BASE_DIR=`dirname "$PRG"`/../.. | ||
BASE_DIR=`cd "$BASE_DIR" && pwd` | ||
fi | ||
CONF_DIR=$BASE_DIR/conf | ||
LIB_DIR=$BASE_DIR/lib | ||
BIN_DIR=$BASE_DIR/bin | ||
LOG_DIR=$BASE_DIR/log | ||
if [ ! -d $LOGS_DIR ]; then | ||
mkdir $LOGS_DIR | ||
fi | ||
|
||
export BASE_DIR="$BASE_DIR" | ||
export CONF_DIR="$CONF_DIR" | ||
export LIB_DIR="$LIB_DIR" | ||
export BIN_DIR="$BIN_DIR" | ||
export LOG_DIR="$LOG_DIR" | ||
|
||
|
||
if [ -z "$JAVA_HOME" ]; then | ||
export JAVA=`which java` | ||
else | ||
export JAVA="$JAVA_HOME/bin/java" | ||
fi | ||
|
||
export CLASSPATH=$CLASSPATH:$CONF_DIR:$(ls $LIB_DIR/*.jar | tr '\n' :) | ||
|
||
#Server jvm args | ||
SERVER_JVM_ARGS="-Xmx512m -Xms512m -server -cp $CLASSPATH " | ||
|
||
if [ -z "$SERVER_ARGS" ]; then | ||
export SERVER_ARGS="$SERVER_JVM_ARGS" | ||
fi |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startA.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceA" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startB.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceB" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startC1.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceC1" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startC2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceC2" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startD1.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceD1" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startD2.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceD2" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
7 changes: 7 additions & 0 deletions
7
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/exp2/startE.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
MAINCLASSNAME="com.jd.bdp.hydra.benchmark.exp2.StartServiceE" | ||
LOGNAME="$MAINCLASSNAME".log | ||
|
||
source ./env.sh | ||
TAIL_FILE="$LOG_DIR/$LOGNAME" | ||
java $SERVER_ARGS $MAINCLASSNAME > $TAIL_FILE & |
5 changes: 0 additions & 5 deletions
5
modules/hydra-test/hydra-test-integration/src/main/resources/scripts/linux/startABC.sh
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+8.57 KB
modules/hydra-web/src/main/webapp/statics/img/glyphicons-halflings-white.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+12.5 KB
modules/hydra-web/src/main/webapp/statics/img/glyphicons-halflings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.