Cloudera: spark Scala : Error: textFile is not part of org.apache.sparkcontext : Getting an error. here is what i did

val sc = new SparkContext
val data1 = sc.textFile("/user/samplecsv.csv")

getting an error textFile is not part of org.apache.sparkcontext. 

I'm running Cloudera >> Spark-Shell

Any suggestions please? 