-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issues of merging kasundharmadasa's changes
- Loading branch information
Showing
7 changed files
with
142 additions
and
140 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,78 +1,71 @@ | ||
#!/usr/bin/env bash | ||
|
||
|
||
MODE=${MODE} | ||
MASTERIP=${MASTERIP} | ||
WORKERS=${WORKERS} | ||
WORKERIP=${WORKERIP} | ||
HOST_NAME=${HOST_NAME} | ||
SERVER_PORT=${SERVER_PORT}; | ||
SERVER_DATA_PORT=${SERVER_DATA_PORT}; | ||
SERVER_PORT=${SERVER_PORT} | ||
SERVER_DATA_PORT=${SERVER_DATA_PORT} | ||
ENABLE_NMON=${ENABLE_NMON} | ||
|
||
while [ $# -gt 0 ]; do | ||
|
||
if [[ $1 == *"--"* ]]; then | ||
if [[ $1 == *"--"* ]]; then | ||
param="${1/--/}" | ||
declare $param="$2" | ||
echo $1 $2 // Optional to see the parameter:value result | ||
fi | ||
fi | ||
|
||
shift | ||
shift | ||
done | ||
|
||
if [ -z "$MODE" ] ; | ||
then | ||
if [ -z "$MODE" ]; then | ||
echo "MODE OF OPERATION SHOULD BE SPECIFIED" | ||
echo "Use argument 1 <MASTERIP> <NUMBER OF WORKERS> <WORKER IPS> to start JasmineGraph in Master mode." | ||
echo "Use 2 <hostName> <serverPort> <serverDataPort> to start in Worker mode." | ||
exit 1 | ||
fi | ||
|
||
if [ $MODE -eq 1 ] ; | ||
then | ||
if [ -z "$MASTERIP" ] ; | ||
then | ||
echo "MASTER IP SHOULD BE SPECIFIED" | ||
exit 1 | ||
if [ $MODE -eq 1 ]; then | ||
if [ -z "$MASTERIP" ]; then | ||
echo "MASTER IP SHOULD BE SPECIFIED" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$WORKERS" ] ; | ||
then | ||
echo "Number of workers SHOULD BE SPECIFIED" | ||
exit 1 | ||
if [ -z "$WORKERS" ]; then | ||
echo "Number of workers SHOULD BE SPECIFIED" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$WORKERIP" ] ; | ||
then | ||
echo "Worker IPs SHOULD BE SPECIFIED" | ||
exit 1 | ||
if [ -z "$WORKERIP" ]; then | ||
echo "Worker IPs SHOULD BE SPECIFIED" | ||
exit 1 | ||
fi | ||
else | ||
|
||
if [ -z "$MASTERIP" ] ; | ||
then | ||
echo "MASTER IP SHOULD BE SPECIFIED" | ||
exit 1 | ||
if [ -z "$MASTERIP" ]; then | ||
echo "MASTER IP SHOULD BE SPECIFIED" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$SERVER_PORT" ] ; | ||
then | ||
echo "SERVER PORT SHOULD BE SPECIFIED" | ||
exit 1 | ||
if [ -z "$SERVER_PORT" ]; then | ||
echo "SERVER PORT SHOULD BE SPECIFIED" | ||
exit 1 | ||
fi | ||
|
||
if [ -z "$SERVER_DATA_PORT" ] ; | ||
then | ||
echo "SERVER DATA PORT SHOULD BE SPECIFIED" | ||
exit 1 | ||
if [ -z "$SERVER_DATA_PORT" ]; then | ||
echo "SERVER DATA PORT SHOULD BE SPECIFIED" | ||
exit 1 | ||
fi | ||
fi | ||
|
||
export LD_LIBRARY_PATH=/usr/local/lib | ||
if [ $MODE -eq 1 ] ; | ||
then | ||
if [ $MODE -eq 1 ]; then | ||
./JasmineGraph "docker" $MODE $MASTERIP $WORKERS $WORKERIP $ENABLE_NMON | ||
else | ||
./JasmineGraph "docker" $MODE $HOST_NAME $MASTERIP $SERVER_PORT $SERVER_DATA_PORT $ENABLE_NMON | ||
fi | ||
fi | ||
|
||
if [ "$TESTING" = "true" ]; then | ||
chmod -R go+w /tmp/jasminegraph | ||
fi |
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
Oops, something went wrong.