From 03a5278e2a7813a7e8b24bd3a7ea5ebd6fefaac2 Mon Sep 17 00:00:00 2001 From: Xiaming Chen Date: Fri, 25 Dec 2015 14:52:41 +0800 Subject: [PATCH] Add test script --- etlers/WifiToolkit/test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 etlers/WifiToolkit/test.sh diff --git a/etlers/WifiToolkit/test.sh b/etlers/WifiToolkit/test.sh new file mode 100755 index 0000000..9438897 --- /dev/null +++ b/etlers/WifiToolkit/test.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +APP_NAME="cn.edu.sjtu.omnilab.odh.spark.MergeWifiSession" +BINJAR="target/scala-2.10/WifiToolkit-assembly-1.0.jar" + +if [ $# -lt 2 ]; then + echo "Usage: $0 " + exit -1 +fi + +input=$1 +output=$2 +echo "Output file:" $output + +rm -rf $output + +spark-submit --master local --class $APP_NAME $BINJAR $input $output + +if [ -d $output ]; then + echo "Output: " + head -n 20 $output/part-00000 + echo "..." +fi