#!/bin/bash
if [ X$1 == X ] || [ X$2 == X ] || [ X$3 == X ] || [ X$4 == X ] || [ X$5 == X ] || [ X$6 == X ] || [ X$7 == X ]; then
echo "usage: $0 <threads> <target> <workload> <hosts> <recordcount> <insertstart> <insertcount>"
exit 1
fi
hyperentoli="java -XmsMINMEMm -XmxMAXMEMm -XX:MaxPermSize=MAXMEMm -cp /opt/YCSB/build/ycsb.jar:/opt/YCSB/db/cassandra-2/lib/*:/opt/YCSB/lib/*:/opt/YCSB/lib/* com.yahoo.ycsb.async.cassandra.ClientAsyncCassandra -load -db com.yahoo.ycsb.db.CassandraCQLClientAsync -s"
if [ $1 != "0" ]; then
hyperentoli=$hyperentoli" -threads $1"
fi
if [ $2 != "0" ]; then
hyperentoli=$hyperentoli" -target $2"
fi
if [ $3 != "0" ]; then
hyperentoli=$hyperentoli" -P /opt/YCSB/workloads/$3"
else
hyperentoli=$hyperentoli" -P /opt/YCSB/workloads/workloada"
fi
if [ $4 != "0" ]; then
hyperentoli=$hyperentoli" -p hosts=$4"
fi
if [ $5 != "0" ]; then
hyperentoli=$hyperentoli" -p recordcount=$5"
else
hyperentoli=$hyperentoli" -p recordcount=1000000"
fi
if [ $6 != "-1" ]; then
hyperentoli=$hyperentoli" -p insertstart=$6"
fi
if [ $7 != "0" ]; then
hyperentoli=$hyperentoli" -p insertcount=$7"
fi
echo $hyperentoli
date
$hyperentoli
date