티스토리 뷰

공부

[Sh] HDFS exists directory

seunggabi 승가비 2020. 12. 10. 10:26
hdfs dfs -test -d $yourdir

if [ $? == 0 ]; then
    echo "exists"
else
    echo "dir does not exists"
fi

https://stackoverflow.com/questions/26513861/checking-if-directory-in-hdfs-already-exists-or-not

 

Checking if directory in HDFS already exists or not

I am having following directory structure in HDFS, /analysis/alertData/logs/YEAR/MONTH/DATE/HOURS That is data is coming on houly basis and stored in format of year/month/day/hour. I have writt...

stackoverflow.com

 

댓글
댓글쓰기 폼