I am trying to achieve this scenario where I can split a gz file which is on local linux and upload to hdfs as part unzipped or zipped files without writing the split output to disk. I am having issues after trying this below command.
below command writes to local disk then I can upload to hdfs which I don't want :-
zcat ./file.txt.gz | tail -n +2 | split -l 20 - file.part
hdfs dfs -copyFromLocal ./*file.part* /folder/in/hdfs/
I want something like this is it achievable ?:-
zcat ./file.txt.gz | tail -n +2 | split -l 20 | gzip -d | hdfs dfs -put - /folder/in/hdfs/file.part