mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Improve YCSB image logging; remove logic to support partial restarts (#6830)
This commit is contained in:
parent
07d11ec2e1
commit
8819534a5e
@ -1,23 +1,16 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -Eeuo pipefail
|
set -Eeuxo pipefail
|
||||||
|
|
||||||
namespace=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
|
namespace=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)
|
||||||
POD_NUM=$(echo $POD_NAME | cut -d - -f3)
|
POD_NUM=$(echo $POD_NAME | cut -d - -f3)
|
||||||
KEY="ycsb_load_${POD_NUM}_of_${NUM_PODS}_complete"
|
KEY="ycsb_load_${POD_NUM}_of_${NUM_PODS}_complete"
|
||||||
CLI=$(ls /var/dynamic-conf/bin/*/fdbcli | head -n1)
|
CLI=$(ls /var/dynamic-conf/bin/*/fdbcli | head -n1)
|
||||||
if [ ${MODE} != "load" ]; then
|
|
||||||
echo "WAITING FOR ALL PODS TO COME UP"
|
echo "WAITING FOR ALL PODS TO COME UP"
|
||||||
while [[ $(kubectl get pods -n ${namespace} -l name=ycsb,run=${RUN_ID} --field-selector=status.phase=Running | grep -cv NAME) -lt ${NUM_PODS} ]]; do
|
while [[ $(kubectl get pods -n ${namespace} -l name=ycsb,run=${RUN_ID} --field-selector=status.phase=Running | grep -cv NAME) -lt ${NUM_PODS} ]]; do
|
||||||
sleep 0.1
|
sleep 1
|
||||||
done
|
done
|
||||||
echo "ALL PODS ARE UP"
|
echo "ALL PODS ARE UP"
|
||||||
else
|
|
||||||
if ${CLI} --exec "get ${KEY}" | grep is ;
|
|
||||||
then
|
|
||||||
# load already completed
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
fi;
|
|
||||||
|
|
||||||
echo "RUNNING YCSB"
|
echo "RUNNING YCSB"
|
||||||
./bin/ycsb.sh ${MODE} foundationdb -s -P workloads/${WORKLOAD} ${YCSB_ARGS}
|
./bin/ycsb.sh ${MODE} foundationdb -s -P workloads/${WORKLOAD} ${YCSB_ARGS}
|
||||||
@ -27,7 +20,3 @@ echo "COPYING HISTOGRAMS TO S3"
|
|||||||
aws s3 sync --sse aws:kms --exclude "*" --include "histogram.*" /tmp s3://${BUCKET}/ycsb_histograms/${namespace}/${POD_NAME}
|
aws s3 sync --sse aws:kms --exclude "*" --include "histogram.*" /tmp s3://${BUCKET}/ycsb_histograms/${namespace}/${POD_NAME}
|
||||||
echo "COPYING HISTOGRAMS TO S3 FINISHED"
|
echo "COPYING HISTOGRAMS TO S3 FINISHED"
|
||||||
|
|
||||||
if [ ${MODE} == "load" ]; then
|
|
||||||
${CLI} --exec "writemode on; set ${KEY} 1"
|
|
||||||
echo "WROTE LOAD COMPLETION KEY"
|
|
||||||
fi
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user