This file contains hidden or 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/sh | |
LOCAL_DIR=yarn_logs | |
mkdir $LOCAL_DIR | |
for row in $( yarn application -appStates ALL -list | awk '/application_/{print $1 "," $2}' ) | |
do | |
fields=($(echo $row | tr "," "\n")) | |
yarn logs -applicationId ${fields[0]} > $LOCAL_DIR/${fields[0]}_${fields[1]}.log |