Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 33 lines (26 sloc) 0.804 kB
db24328 @thiruvel Initial push
authored
1 #!/bin/bash
2 # Copyright (c) 2012 Yahoo! Inc. All rights reserved.
3 # Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.
4 #
5
6 log_status () {
7 echo "reporter:status:$*" >&2
8 }
9
10 FILE="$1"
11 COUNT=count.dat
12
13 rm -f $COUNT
14 for each in chunk-*$FILE
15 do
16 log_status "Verify Processing chunk ... $each"
17 bunzip2 -c $each | wc -l >> $COUNT
18 done
19
20 CHUNK_RECORDS=`cat $COUNT | xargs | tr " " "+" | bc -l`
21 rm -f $COUNT
22
23 log_status "Chunk records - $CHUNK_RECORDS, Calculating $FILE records"
24
25 FILE_RECORDS=`bunzip2 -c $FILE | wc -l`
26 if [ $CHUNK_RECORDS -eq $FILE_RECORDS ]
27 then
28 log_status "SUCCESS: Records match - $FILE - File ($FILE_RECORDS), chunks ($CHUNK_RECORDS)"
29 else
30 log_status "FAILED: Records DONT match - $FILE - File ($FILE_RECORDS), chunks ($CHUNK_RECORDS)"
31 exit 1
32 fi
Something went wrong with that request. Please try again.