Skip to content

Commit

Permalink
Resolve relative path when passing to the daemon. rescrv/HyperDex#216
Browse files Browse the repository at this point in the history
  • Loading branch information
michelkaporin committed Dec 8, 2017
1 parent 4accc28 commit 5b2c972
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Binary file removed .DS_Store
Binary file not shown.
16 changes: 10 additions & 6 deletions scripts/hyperdex_benchmark.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
#!/bin/bash

# Arguments: server number - $0
# Arguments:
# Server number: $0

# Resolve the relative path because of https://github.com/rescrv/HyperDex/issues/216
tempDir=$(greadlink -f ./../temp) # 'brew install coreutils' to make it work on Mac OS (equivalent of readlink in Linux)

# Clean up coordinator and daemons' data
tempDir="./../temp"
rm -rf $tempDir/HyperDex_Da*/*
rm -rf $tempDir/Hyperdex_Da*/*

# Run coordinator
hyperdex coordinator -l 127.0.0.1 -p 1982 -D $tempDir/Hyperdex_Data &
Expand All @@ -14,9 +17,10 @@ echo "PID of the coordinator: $coordinatorPID"
# Run daemons
for i in $(seq 1 $1)
do
echo "Starting a daemon #$i in $tempDir/HyperDex_Daemon/$i"
mkdir -p $tempDir/HyperDex_Daemon/$i
hyperdex daemon --listen=127.0.0.1 --listen-port=201$i --coordinator=127.0.0.1 --coordinator-port=1982 --data=$tempDir/HyperDex_Daemon/$i &
daemonDir=$tempDir/Hyperdex_Daemon/$i
echo "Starting a daemon #$i in $daemonDir"
mkdir -p $daemonDir
hyperdex daemon --listen=127.0.0.1 --listen-port=201$i --coordinator=127.0.0.1 --coordinator-port=1982 --data=$daemonDir &
done

# Setup spaces
Expand Down

0 comments on commit 5b2c972

Please sign in to comment.