Saturday 2 January 2016

Hadoop : appendToFile

“appendToFile” command append multiple files data to a file located in Hadoop file system.

Usage
hadoop fs [generic options] -appendToFile <localsrc> ...

file1.txt
I am file1

file2.txt
I am file2


$ hadoop fs -appendToFile /Users/harikrishna_gurram/file1.txt /Users/harikrishna_gurram/file2.txt /user/harikrishna_gurram/dir1/append.txt
$ 
$ hadoop fs -cat /user/harikrishna_gurram/dir1/append.txt
I am file1I am file2


Previous                                                 Next                                                 Home

No comments:

Post a Comment