Till Westmann | 276bbc2 | 2013-06-05 18:56:27 -0700 | [diff] [blame] | 1 | #/* |
| 2 | # Copyright 2009-2013 by The Regents of the University of California |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # you may obtain a copy of the License from |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | #*/ |
buyingyi | c73348c | 2012-11-02 00:31:31 +0000 | [diff] [blame] | 15 | #asterix/stopall.sh |
| 16 | |
| 17 | #$HADOOP_HOME/bin/stop-all.sh |
| 18 | #$HADOOP_HOME/bin/start-all.sh |
| 19 | #sleep 10 |
| 20 | |
| 21 | #asterix/startall.sh |
| 22 | |
| 23 | LOG=perflog/result.log |
| 24 | echo "">$LOG |
| 25 | |
| 26 | for file in $1/*.hive |
| 27 | do |
| 28 | ../asterix/stopall.sh |
| 29 | $HADOOP_HOME/bin/stop-all.sh |
| 30 | sleep 10 |
| 31 | ../asterix/startall.sh |
| 32 | $HADOOP_HOME/bin/start-dfs.sh |
| 33 | sleep 10 |
| 34 | $HADOOP_HOME/bin/hadoop dfsadmin -safemode leave |
| 35 | |
| 36 | START=$(date +%s) |
| 37 | echo $file |
| 38 | ../bin/hive -f $file > perflog/$file |
| 39 | END=$(date +%s) |
| 40 | DIFF=$(( $END - $START )) |
| 41 | echo $file $DIFF>>$LOG |
| 42 | done |