Skip to content

Instantly share code, notes, and snippets.

@t3rmin4t0r
Last active November 30, 2017 08:29
Show Gist options
  • Save t3rmin4t0r/16776e9415787fe3db88237f9e062258 to your computer and use it in GitHub Desktop.
Save t3rmin4t0r/16776e9415787fe3db88237f9e062258 to your computer and use it in GitHub Desktop.
Run all Tez analysers in one pass
CWD=$(dirname $0)
DAGZ=$1
DAGID=$(basename $1 .zip)
HADOOP_CP=$(which hadoop && hadoop classpath)
function RUNJAR {
java -cp $HADOOP_CP:$CWD/*:$CWD/lib/*: org.apache.tez.analyzer.plugins.AnalyzerDriver $*
}
ANALYZERS=$(RUNJAR | grep "^ .*:" | cut -f 1 -d : | sed "s/ //g")
mkdir -p ./$DAGID/
for a in $ANALYZERS; do
RUNJAR $a --outputDir $DAGID/ --saveResults --eventFileName $DAGZ --dagId $DAGID
done
dot -Tsvg $DAGID.dot > $DAGID/$DAGID.svg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment