Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Unable to use the Spark Conecxt Variable in the Spark-Shell (Scala) in CDH5.1

Solved Go to solution

Unable to use the Spark Conecxt Variable in the Spark-Shell (Scala) in CDH5.1

Explorer

Hi,

 

I am using Spark 1.0.0 in a CDH 5.1 VM.  I am trying to use the Spark-Shell (Scala). But I am getting the below error regularly and not able to use thecontect variable

 

Please assist.

 

Using Scala version 2.10.4 (Java HotSpot(TM) 64-Bit Server VM, Java 1.7.0_55)
Type in expressions to have them evaluated.
Type :help for more information.
Spark context available as sc.

scala> val text = sc.textfile("/user/cloudera/test1")
<console>:12: error: value textfile is not a member of org.apache.spark.SparkContext
val text = sc.textfile("/user/cloudera/test1")

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unable to use the Spark Conecxt Variable in the Spark-Shell (Scala) in CDH5.1

Master Collaborator
1 REPLY 1

Re: Unable to use the Spark Conecxt Variable in the Spark-Shell (Scala) in CDH5.1

Master Collaborator
Don't have an account?
Coming from Hortonworks? Activate your account here