File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
src/main/scala/fr/polytechnique/cmap/cnam/filtering/mlpp Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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}
You can’t perform that action at this time.
0 commit comments