diff --git a/src/main/scala/ignition/core/jobs/CoreJobRunner.scala b/src/main/scala/ignition/core/jobs/CoreJobRunner.scala index eb1c7014..42f71f2d 100644 --- a/src/main/scala/ignition/core/jobs/CoreJobRunner.scala +++ b/src/main/scala/ignition/core/jobs/CoreJobRunner.scala @@ -3,6 +3,7 @@ package ignition.core.jobs import org.apache.spark.SparkContext import org.apache.spark.sql.SparkSession import org.joda.time.{DateTime, DateTimeZone} +import org.joda.time.format.{DateTimeFormat} import org.slf4j.{Logger, LoggerFactory} import scala.concurrent.Future @@ -10,6 +11,9 @@ import scala.concurrent.Future object CoreJobRunner { val logger: Logger = LoggerFactory.getLogger(getClass) + val tagFormat = "yyyy_MM_dd'T'HH_mm_ss'UTC'" + val today: DateTime = DateTime.now().withZone(DateTimeZone.UTC) + val todayFormatted: String = DateTimeFormat.forPattern(tagFormat).print(today) case class RunnerContext(sparkContext: SparkContext, sparkSession: SparkSession, @@ -29,8 +33,8 @@ object CoreJobRunner { } case class RunnerConfig(setupName: String = "nosetup", - date: DateTime = DateTime.now.withZone(DateTimeZone.UTC), - tag: String = "notag", + date: DateTime = today, + tag: String = todayFormatted, user: String = "nouser", master: String = "local[*]", executorMemory: String = "2G",