saveAsNewAPIHadoopFile Not working

val Products=sc.textFile("/user/cloudera/problem2/products/")
import org.apache.hadoop.io._
val ProductsMap=Products.map(rec => (new IntWritable(rec.split("//|")(0).toInt),new Text(rec)))
import org.apache.hadoop.mapreduce.lib.output
ProductsMap.saveAsNewAPIHadoopFile("/user/cloudera/ProductsSequence", classOf[IntWritable], class[Text], classOf[SequenceFileOutputFormat[IntWritable,Text]])

Error:
:1: error: illegal start of simple expression
Products.map(rec => (rec.split("//|")(0),rec)).saveAsNewAPIHadoopFile("/user/cloudera/ProductsSequence",classOf[IntWritable],class[Text],classOf[SequenceFileOutputFormat(IntWritable,Text)])
^

classOf[Text] instead of class[Text]

Thanks alot Laxman…:slight_smile: