Reputation: 21625
I am trying to use the newAPIHadoopRDD function in Spark, but I see that there is no argument in the constructor which takes file's name. So, how to set the filename in this case?
Upvotes: 0
Views: 152
Reputation: 36
This is configured using org.apache.hadoop.conf.Configuration
and details depend on the InputFormat
you use. For example TextInputFormat
uses mapred.input.dir
.
In general if you want use file based source use newAPIHadoopFile
.
Upvotes: 2