diff options
author | Joe Buck <jbbuck@gmail.com> | 2013-02-19 10:37:49 -0800 |
---|---|---|
committer | Joe Buck <jbbuck@gmail.com> | 2013-02-26 10:53:35 -0800 |
commit | 6bd09695692b639749d11fad6497da6371683d66 (patch) | |
tree | d4938cfe2f2432803fe6ec63133aadb0ab0a4ca0 /qa | |
parent | f0ae38043a09dbf70afed3b6fc2114a243d25a04 (diff) | |
download | ceph-6bd09695692b639749d11fad6497da6371683d66.tar.gz |
testing: updating hadoop-internal test
Small tweaks to the hadoop-internal test
to better use existing environment varaibles
and in response to the recent teuthology
changes.
Signed-off-by: Joe Buck <jbbuck@gmail.com>
Reviewed-by: Noah Watkins <noahwatkins@gmail.com>
Diffstat (limited to 'qa')
-rwxr-xr-x | qa/workunits/hadoop-internal-tests/test.sh | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/qa/workunits/hadoop-internal-tests/test.sh b/qa/workunits/hadoop-internal-tests/test.sh index f37783ef3f8..a446f770cf8 100755 --- a/qa/workunits/hadoop-internal-tests/test.sh +++ b/qa/workunits/hadoop-internal-tests/test.sh @@ -3,6 +3,23 @@ # bail if $TESTDIR is not set as this test will fail in that scenario [ -z $TESTDIR ] && { echo "\$TESTDIR needs to be set, but is not. Exiting."; exit 1; } +# configure CEPH_CONF and LD_LIBRARY_PATH if they're not already set +conf="$CEPH_CONF" +if [ -z "$conf" ] ; then + echo "Setting conf to /etc/ceph/ceph.conf" + conf="/etc/ceph/ceph.conf" +else + echo "conf is set to $conf" +fi + +ld_lib_path="$LD_LIBRARY_PATH" +if [ -z "$ld_lib_path" ] ; then + echo "Setting ld_lib_path to /usr/lib/jni" + ld_lib_path="/usr/lib/jni" +else + echo "ld_lib_path was set to $ld_lib_path" +fi + POOL_SIZES=`seq 1 8` POOL_BASE=hadoop POOL_NAMES=`echo -n $POOL_SIZES | sed "s/\([0-9]*\)/$POOL_BASE\1/g" | sed "s/ /,/g"` @@ -10,13 +27,14 @@ POOL_NAMES=`echo -n $POOL_SIZES | sed "s/\([0-9]*\)/$POOL_BASE\1/g" | sed "s/ /, function gen_hadoop_conf() { local outfile=$1 local poolnames=$2 +local conf=$3 cat << EOF > $outfile <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="configuration.xsl"?> <configuration> <property> <name>ceph.conf.file</name> - <value>$CEPH_CONF</value> + <value>$conf</value> </property> <property> <name>ceph.data.pools</name> @@ -30,32 +48,29 @@ echo creating hadoop test pools for size in $POOL_SIZES; do name=${POOL_BASE}$size echo creating pool $name - #./ceph osd pool create $name 100 100 - #./ceph osd pool set $name size $size ceph osd pool create $name 100 100 ceph osd pool set $name size $size echo making pool $name a data pool poolid=`ceph osd dump | sed -n "s/^pool \([0-9]*\) '$name'.*/\1/p"` ceph mds add_data_pool $poolid - #./ceph mds add_data_pool $poolid done def_repl_conf=`mktemp` echo generating default replication hadoop config $def_repl_conf -gen_hadoop_conf $def_repl_conf "" +gen_hadoop_conf $def_repl_conf "" $conf cust_repl_conf=`mktemp` echo generating custom replication hadoop config $cust_repl_conf -gen_hadoop_conf $cust_repl_conf $POOL_NAMES +gen_hadoop_conf $cust_repl_conf $POOL_NAMES $conf pushd $TESTDIR/hadoop echo running default replication hadoop tests -ant -Dextra.library.path=$LD_LIBRARY_PATH -Dhadoop.conf.file=$def_repl_conf -Dtestcase=TestCephDefaultReplication test +ant -Dextra.library.path=$ld_lib_path -Dhadoop.conf.file=$def_repl_conf -Dtestcase=TestCephDefaultReplication test echo running custom replication hadoop tests -ant -Dextra.library.path=$LD_LIBRARY_PATH -Dhadoop.conf.file=$cust_repl_conf -Dtestcase=TestCephCustomReplication test +ant -Dextra.library.path=$ld_lib_path -Dhadoop.conf.file=$cust_repl_conf -Dtestcase=TestCephCustomReplication test popd |