Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,28 @@
package com.yahoo.bullet.spark

import com.yahoo.bullet.spark.utils.BulletSparkConfig
import joptsimple.OptionParser

object BulletSparkStreamingMain {
val CONFIGURATION_ARG = "bullet-spark-conf"
val HELP_ARG = "help"
val PARSER: OptionParser = new OptionParser() {
{
accepts(CONFIGURATION_ARG, "An optional configuration YAML file for Bullet Spark")
.withOptionalArg()
.describedAs("Configuration file used to override Bullet Spark's default settings")
accepts(HELP_ARG, "Show this help message")
.withOptionalArg()
.describedAs("Print help message")
allowsUnrecognizedOptions()
}
}

def main(args: Array[String]): Unit = {
val options = PARSER.parse(args: _*)
val bulletSparkConfigPath = options.valueOf(CONFIGURATION_ARG).asInstanceOf[String]
val job = new BulletSparkStreamingBaseJob()
val config = new BulletSparkConfig()
val config = new BulletSparkConfig(bulletSparkConfigPath)
val ssc = job.getOrCreateContext(config)
ssc.start()
ssc.awaitTermination()
Expand Down