0

I have a file on hdfs having size 11 gb. I want to split it into multiple files in 1 gb. How can I do that? My hadoop version is 2.7.3

sathya
  • 1,832
  • 1
  • 17
  • 36
Vish
  • 178
  • 2
  • 15

1 Answers1

0

If you have spark, try below-

Below example splits input-file into 2 files:

spark-shell

scala> sc.textFile("/xyz-path/input-file",2).saveAsTextFile("/xyz-path/output-file")
Rahul Sharma
  • 5,181
  • 7
  • 52
  • 86