技巧
1,ArryBuffer生成表sql
val Score = ArryBuffer[1,2,3,4,5] val filname = "wang" val type = "Bread" val result: ArrayBuffer[(String, String, Double)] = Score.map(score => { (filename,type,score) }) result2.toDF("filename","type","score").show(false)
2,执行sh脚本 后台运行 sh t.sh &
3,定时任务:
1,本方法,在脚本tt.sh中while死循环 执行
2,crontab -e
0 12 * * * /tt.sh
0 12 * * * mail dmtsai -s "at 12:00" < /home/dmtsai/.bashrc #分 时 日 月 周 |《==============命令行=======================》|