Skip to content

Commit 24ea995

Browse files
committed
Added lag parameter to MLPPProvisoryMain
1 parent b7469a1 commit 24ea995

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/scala/fr/polytechnique/cmap/cnam/filtering/mlpp/MLPPProvisoryMain.scala

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object MLPPProvisoryMain extends Main {
1111

1212
override def appName: String = "MLPPMain"
1313

14-
def runMLPPFeaturing(sqlContext: SQLContext, config: Config) = {
14+
def runMLPPFeaturing(sqlContext: SQLContext, config: Config, params: MLPPWriter.Params) = {
1515
import sqlContext.implicits._
1616

1717
Seq("broad", "narrow").foreach { i =>
@@ -24,15 +24,16 @@ object MLPPProvisoryMain extends Main {
2424

2525
val flatEvents = flatEventsDF.as[FlatEvent].persist
2626

27-
MLPPWriter().write(flatEvents, s"/shared/mlpp_features/$i/")
27+
MLPPWriter(params).write(flatEvents, s"/shared/mlpp_features/$i/")
2828
}
2929
}
3030

3131
override def main(args: Array[String]): Unit = {
3232
startContext()
33-
val environment = if (args.nonEmpty) args(0) else "test"
33+
val environment = args(0)
34+
val params = MLPPWriter.Params(lagCount = args(1).toInt, bucketSize = args(2).toInt)
3435
val config: Config = ConfigFactory.parseResources("filtering.conf").getConfig(environment)
35-
runMLPPFeaturing(sqlContext, config)
36+
runMLPPFeaturing(sqlContext, config, params)
3637
stopContext()
3738
}
3839
}

0 commit comments

Comments
 (0)