Skip to content

Instantly share code, notes, and snippets.

@raksit31667
Created June 25, 2020 16:48
object EventhubScheduleJob {
@transient lazy private val logger = Logger.getLogger(getClass.getName)
def main(args: Array[String]): Unit = {
// One-time initialization
val spark = SparkSession.builder()
.appName(AppName)
.config(SparkMaster, Local)
.getOrCreate()
while(true) {
try {
// do something
} catch {
// log for investigation
} finally {
Thread.sleep(60000) // 1 minute
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment