我有一个在 Spark-shell 中运行的 spark-scala 脚本
spark2-shell -i test.scala
它工作正常。关于如何安排此脚本每小时运行一次的任何建议可能会有所帮助。
实际上,这与火花无关,因为没有内置的机制。
你实际上可以考虑使用这样的 cron
0 * * * * spark2-shell -i test.scala
或者您可能还想使用 Oozie,它有点复杂,但如果您有很多 Spark 作业要运行,则更容易维护
https://oozie.apache.org/docs/3.1.3-incubating/index.html