Spark context (sc) not found

0 votes

I start spark using spark-shell. 

But I am getting "sc not found " error . I have set the SPARK_MASTER_ID in spark-env.sh. stopped the service and started again using the following commands, still the same error.

sudo service hadoop-master stop
sudo service hadoop-master start hadoop dfsadmin -safemode leave
Feb 13 in Apache Spark by Loki
36 views

1 answer to this question.

0 votes

Maybe the hadoop service didn't start properly. Try restarting the services:

cd /usr/lib/spark-2.1.1-bin-hadoop2.7

./sbin/stop-all.sh

and then, start it again:

./sbin/start-all.sh

And then run your command

answered Feb 13 by John

Related Questions In Apache Spark

0 votes
1 answer

Not able to use sc in spark shell

Seems like master and worker are not ...READ MORE

answered Jan 3 in Apache Spark by Omkar
• 67,120 points
100 views
0 votes
1 answer

Deciding number of spark context objects

How many spark context objects you should ...READ MORE

answered Jan 16 in Apache Spark by Omkar
• 67,120 points
35 views
0 votes
1 answer
0 votes
1 answer

Not able to preserve shuffle files in Spark

You lose the files because by default, ...READ MORE

answered Feb 23 in Apache Spark by Rana
25 views
0 votes
0 answers
0 votes
1 answer

Hadoop Mapreduce word count Program

Firstly you need to understand the concept ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,070 points
2,038 views
0 votes
1 answer

hadoop.mapred vs hadoop.mapreduce?

org.apache.hadoop.mapred is the Old API  org.apache.hadoop.mapreduce is the ...READ MORE

answered Mar 16, 2018 in Data Analytics by nitinrawat895
• 10,070 points
192 views
0 votes
10 answers

hadoop fs -put command?

copy command can be used to copy files ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Sujay
10,390 views
0 votes
1 answer

How can I write a text file in HDFS not from an RDD, in Spark program?

Yes, you can go ahead and write ...READ MORE

answered May 29, 2018 in Apache Spark by Shubham
• 13,110 points
859 views
0 votes
1 answer

Spark-shell not working

First, reboot the system. And after reboot, ...READ MORE

answered 3 days ago in Apache Spark by Mahesh
12 views