5 HADOOP_ERRORS_IGNORE=""
7 #using Java6 openjdk for now.
8 HADOOP_JAVA_HOME="/usr/lib/jvm/java-6-openjdk"
9 export JAVA_HOME=$HADOOP_JAVA_HOME
11 HADOOP_ERRORS_IGNORE="\
12 grep -vi \"warning\"" #| \
13 #grep -v \"is not a pointer or array, skip client functions\" | \
14 #grep -v \"is a pointer to type 'string', skip client functions\""
16 REV="$(git rev-parse HEAD)"
18 DESTDIR_TMP="install.tmp"
19 OUTDIR="../out/output/sha1/$REV"
22 install -d -m0766 -- "$DESTDIR_TMP"
24 NCPU=$(( 2 * `grep -c processor /proc/cpuinfo` ))
26 echo "$0: building..."
27 echo --START-IGNORE-WARNINGS
28 # filter out idl errors "Unable to determine origin..." to avoid gitbuilder failing
29 ionice -c3 nice -n20 ant -Divy.default.ivy.user.dir=$CURRENT_DIR examples jar-test 2> >( eval ${HADOOP_ERRORS_IGNORE} ) || exit 4
31 OUTDIR_TMP="${OUTDIR}.tmp"
33 install -d -m0755 -- "$OUTDIR_TMP"
34 tar czf "${OUTDIR_TMP}/apache-hadoop.tgz" -C "${CURRENT_DIR}" .
35 printf '%s\n' "$REV" >"$OUTDIR_TMP/sha1"
37 # we're successful, the files are ok to be published; try to be as
38 # atomic as possible about replacing potentially existing OUTDIR
39 if [ -e "$OUTDIR" ]; then
40 rm -rf -- "$OUTDIR.old"
41 mv -- "$OUTDIR" "$OUTDIR.old"
43 mv -- "$OUTDIR_TMP" "$OUTDIR"
44 rm -rf -- "$OUTDIR.old"