Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/bash
- NODE="$(hdfs fsck -blockId $1 | grep -i "^Block replica" | head -n 1 | awk '{print substr($5,0,index($5,"/") - 1);}')"
- LOCATION="$(sudo -u hdfsuser ssh hdfsuser@$NODE "locate $1 && exit" | head -n 1)"
- echo $NODE:$LOCATION
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement