Created
June 10, 2013 16:58
-
-
Save t3rmin4t0r/5750396 to your computer and use it in GitHub Desktop.
hadoop pull-logs script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for JOBID in $*; do | |
ATTEMPTS=$(mapred job -list-attempt-ids $JOBID MAP completed; mapred job -list-attempt-ids $JOBID REDUCE completed) | |
mkdir -p $JOBID | |
echo $ATTEMPTS | xargs -P 32 -n 1 bash -c "mapred job -logs $JOBID \$0 > $JOBID/\$0.log" 2> /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment