/*
 * Copyright © 2014 Cask Data, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */

package co.cask.cdap.apps.movierecommender;

import co.cask.cdap.api.spark.AbstractSpark;
import co.cask.cdap.api.spark.Spark;
import co.cask.cdap.api.spark.SparkSpecification;
import org.apache.spark.mllib.recommendation.MatrixFactorizationModel;
import org.apache.spark.mllib.recommendation.Rating;
import org.apache.spark.rdd.RDD;

/**
 * A {@link Spark} program that creates a {@link MatrixFactorizationModel} from {@link UserScore} and recommend movies
 * to user by calculating {@link Rating} through {@link MatrixFactorizationModel#predict(RDD)}
 */
public class RecommendationBuilderSpecification extends AbstractSpark {
  @Override
  public SparkSpecification configure() {
    return SparkSpecification.Builder.with()
      .setName("RecommendationBuilder")
      .setDescription("Spark program that computes movie recommendations.")
      .setMainClassName(RecommendationBuilder.class.getName())
      .build();
  }
}

@@ -722,58 +722,8 @@
 rk;%0A
-import co.cask.cdap.api.spark.SparkSpecification;%0A
 impo
@@ -1191,34 +1191,20 @@
  public 
-SparkSpecification
+void
  configu
@@ -1218,56 +1218,8 @@
     
-return SparkSpecification.Builder.with()%0A      .
 setN
@@ -1246,24 +1246,22 @@
 uilder%22)
+;
 %0A    
-  .
 setDescr
@@ -1320,24 +1320,22 @@
 tions.%22)
+;
 %0A    
-  .
 setMainC
@@ -1338,20 +1338,16 @@
 ainClass
-Name
 (Recomme
@@ -1370,33 +1370,8 @@
 lass
-.getName())%0A      .build(
 );%0A 

use configurer style api