-
Notifications
You must be signed in to change notification settings - Fork 1
/
TestCompressionAndEncodingEffect.sh
executable file
·109 lines (94 loc) · 1.91 KB
/
TestCompressionAndEncodingEffect.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/bash
set -x
YCSB_DIR=/home/hadoop/ycsb-0.1.4
number_of_operations=100000
number_of_threads=20
number_of_records=10000000
output_file_suffix='.dat'
experiment_list_file=/home/hadoop/git/physical_design/experiments.list.withoutmajorcompaction
#experiment_list_file=/home/hadoop/git/physical_design/experiments.list
clean=false
create=false
load=false
random_read=false
scan=false
all=false
for i in $@
do
if [ "$i" == "all" ]
then
all=true
elif [ "$i" == "clean" ]
then
clean=true
elif [ "$i" == "create" ]
then
create=true
elif [ "$i" == "load" ]
then
load=true
elif [ "$i" == "random_read" ]
then
random_read=true
elif [ "$i" == "scan" ]
then
scan=true
fi
done
let counter=1
function create_table {
echo "creating table..."
echo $1
hbase shell $1
}
cd $YCSB_DIR
echo `pwd`
while read line
do
if $all || $clean
then
echo "droping usertable..."
hbase shell ~/git/physical_design/delete_table
echo "sleeping for 10 sec..."
sleep 10
fi
if $all || $create
then
echo "creating usertable..."
create_statement=$line
echo $create_statement > create_$counter.script
echo "exit " >> create_$counter.script
create_table create_$counter.script
echo "sleeping for 10 sec"
sleep 10
fi
if $all || $load
then
echo "loading data..."
echo "starting time: "
echo `date +%s`
./ld $number_of_records $number_of_threads `echo load_$counter.dat`
echo "end time:"
echo `date +%s`
fi
if $all || $random_read
then
echo "random read..."
echo "starting time: "
echo `date +%s`
./random_read $number_of_operations $number_of_threads `echo random_read_$counter.dat`
echo "end time:"
echo `date +%s`
fi
if $all || $scan
then
echo "scan..."
echo "start time: "
echo `date +%s`
./scan $number_of_operations $number_of_threads `echo scan_$counter.dat`
echo "end time:"
echo `date +%s`
fi
let counter=$counter+1
done < $experiment_list_file
set +x