Example #1
0
 /// <summary>
 /// Read a text file from HDFS, a local file system (available on all nodes), or any Hadoop-supported file system URI, and return it as an RDD of Strings.
 /// </summary>
 /// <param name="filePath">The path of file to be read</param>
 /// <param name="minPartitions">A suggestion value of the minimal splitting number for input data</param>
 /// <returns>an RDD of Strings</returns>
 public RDD <string> TextFile(string filePath, int minPartitions = 0)
 {
     logger.LogInfo("Reading text file {0} as RDD<string> with {1} partitions", filePath, minPartitions);
     return(new RDD <string>(SparkContextProxy.TextFile(filePath, minPartitions), this, SerializedMode.String));
 }
Example #2
0
 public RDD <string> TextFile(string filePath, int minPartitions = 0)
 {
     return(new RDD <string>(SparkContextProxy.TextFile(filePath, minPartitions), this, SerializedMode.String));
 }