Perhaps you can use the DataNode API for this (by default on port 50075), it supports the streamFile command, which you could use. Using wget , it looks something like this:
wget http://$datanode:50075/streamFile/demofile.txt -O ~/demofile.txt
Please note that this command should be executed on the datanode itself, and not on nenenode!
Alternatively, if you donβt know which datanode gets you, you can set jobtracker and it will redirect you to the right datanode using this URL:
http://$namenode:50070/data/demofile.txt
source share