08 2020 档案

摘要:方法1: 用root以ssh登录到linux,打开终端输入以下命令: cd $ORACLE_HOME #进入到oracle的安装目录 dbstart #重启服务器 lsnrctl start #重启监听器 cd $ORACLE_HOME #进入到oracle的安装目录 dbstart #重启服务器 阅读全文
posted @ 2020-08-19 15:05 bioamin 阅读(5159) 评论(0) 推荐(0)
摘要:1、普通方式: 例如rdd.map(para(para(0).trim(),para(1).trim().toInt)).toDF("name","age") #需要导入隐式转换 import spark.implicits._ // 隐式转换 val df1=data.map(x=>x.split 阅读全文
posted @ 2020-08-06 16:09 bioamin 阅读(422) 评论(0) 推荐(0)
摘要:def show(numRows: Int): Unit = show(numRows, truncate = true) /** * Displays the top 20 rows of Dataset in a tabular form. Strings more than 20 charac 阅读全文
posted @ 2020-08-04 14:12 bioamin 阅读(3209) 评论(0) 推荐(0)
摘要:def sample( withReplacement: Boolean, fraction: Double, seed: Long = Utils.random.nextLong): RDD[T] = { require(fraction >= 0, s"Fraction must be nonn 阅读全文
posted @ 2020-08-04 13:28 bioamin 阅读(1197) 评论(0) 推荐(0)
摘要:DataFrame注册成一张表格,如果通过CreateTempView这种方式来创建,那么该表格Session有效,如果通过CreateGlobalTempView来创建,那么该表格跨Session有效,但是SQL语句访问该表格的时候需要加上前缀global_temp dataframe 转换为临时 阅读全文
posted @ 2020-08-04 11:30 bioamin 阅读(1267) 评论(0) 推荐(0)