![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spark
spark笔记
jp_666
这个作者很懒,什么都没留下…
展开
-
Spark删除HDFS文件的两种方式
import org.apache.hadoop.fs.Pathimport org.apache.spark.{SparkConf, SparkContext}import org.apache.spark.sql.SparkSessionobject DeleteHdfsFile { /** * 删除hdfs文件目录方法1 */ def deleteHdfsPath1(sc: SparkContext, filePath: String): Unit = { .原创 2020-11-17 20:38:22 · 2440 阅读 · 0 评论 -
Spark中RDD转换为DataFrame的方法总结
直接贴出代码吧。import org.apache.spark.sql.hive.HiveContextimport org.apache.spark.sql.{DataFrame, Row, SQLContext, SparkSession}import org.apache.spark.sql.types.{IntegerType, StringType, StructField, StructType}import org.apache.spark.{SparkConf, SparkCon原创 2020-11-16 17:25:22 · 861 阅读 · 0 评论