Created
March 16, 2017 11:29
-
-
Save mdespriee/4f020b4f8106f8aebe835a80118ff146 to your computer and use it in GitHub Desktop.
stream data in/out of hdfs through a edge node
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ssh edge_node "hdfs dfs -cat /some/path/part-*" | cat > file | |
cat file | ssh edge_node "hdfs dfs -put - /target/path" | |
# think of using a named pipe (mkfifo) to sream directly for application output | |
rm -f stream | |
mkfifo stream | |
some_app > stream & | |
cat stream | ssh edge_node "hdfs dfs -put - /target/path" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment