Skip to content

Instantly share code, notes, and snippets.

@jayunit100
Created June 26, 2014 21:24
Show Gist options
  • Save jayunit100/bdef0c328a3284d3e7e5 to your computer and use it in GitHub Desktop.
Save jayunit100/bdef0c328a3284d3e7e5 to your computer and use it in GitHub Desktop.
stresstest
##########################################################################################
rrr="a/b/c/d/e/f/q/r/r/ggg"
node2="rhs-2.hdp"
mkdir -p /mnt/glusterfs/HadoopVol/$rrr
for i in {1..500}; do
#mkdir /mnt/glusterfs/$rrr/file$i/
d="/mnt/glusterfs/HadoopVol/$rrr/file$i/"
f="a"
echo "file will be $d/$a"
echo "START "
ssh $node2 "mkdir -p $d && echo TEXT > $d/$f && ls -altrh $d/$f "
rm $d/$f
rc1=$?
### If you uncomment this line, then there are no failures.
#sleep 1
ssh $node2 "mkdir -p $d && echo TEXT > $d/$f && ls -altrh $d/$f "
rm $d/$f
rc2=$?
sleep 1
ssh $node2 "mkdir -p $d && echo TEXT > $d/$f && ls -altrh $d/$f "
rm $d/$f
rc3=$?
echo "DONE $rc1 $rc2 $rc3"
done
rm -rf /mnt/glusterfs/HadoopVol/a/
#########################################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment