摘要: scala> val employee = sqlparquet.read.json("employee.json") 这里将txt转化为parquet应该也行 employee: org.apache.spark.sql.DataFrame = [_corrupt_record: string, 阅读全文
posted @ 2022-06-24 16:51 M_Fight๑҉ 阅读(66) 评论(0) 推荐(0) 编辑
摘要: Spark SQL 数据源(json文件、hive表、parquet文件) -- json 详见 524 hive表 scala> val hivecontext = new org.apache.spark.sql.hive.HiveContext(sc) warning: one depreca 阅读全文
posted @ 2022-06-24 16:51 M_Fight๑҉ 阅读(137) 评论(0) 推荐(0) 编辑
摘要: Spark SQL 以编程方式指定模式 scala> val sqlcontext = new org.apache.spark.sql.SQLContext(sc) warning: there was one deprecation warning (since 2.0.0); for deta 阅读全文
posted @ 2022-05-25 22:56 M_Fight๑҉ 阅读(72) 评论(0) 推荐(0) 编辑
摘要: 1.启动命令 [root@cdh1 ~]# spark-shell 22/05/24 20:24:56 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builti 阅读全文
posted @ 2022-05-25 22:56 M_Fight๑҉ 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 安全拷贝:scp(secure copy) scp可以实现服务器与服务器之间的数据拷贝(from server1 to server2) 命令 递归 要拷贝的文件路径/名称 目的用户@主机:目的路径/名称 1:cdh1 文件 拷贝到 cdh2 [root@cdh1 home]# scp -r Wor 阅读全文
posted @ 2022-05-23 21:45 M_Fight๑҉ 阅读(240) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示