hdfs put from stdin
Try this (untested):
cat test.txt | ssh username@masternode "hadoop dfs -put - hadoopFoldername/"
I've used similar tricks to copy directories around:
tar cf - . | ssh remote "(cd /destination && tar xvf -)"
This sends the output of local-tar into the input of remote-tar.
Written by Philipp Haußleiter
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Hdfs
Authors
kh1ramatsu
8.957K
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#