I want to write a loop by shell, and do 'hadoop fs -cat' command, but when it finished , it will show 'cat: Unable to write to output stream', so that it cann't go to next step in loop. and I need to using ctrl+c to stop it by manually. so how to stop Hadoop cat: Unable to write to output stream automatically when run loop in shell?
and shell is below:
for i in {00..23}; do
echo "$i";
mkdir $i
cd $i
hadoop fs -cat hdfs://xxxx/20180816/$i/*.gz | zcat | head -60000 > tmp1
cd -
done