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
43 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,290 points
115 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,290 points
37 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
31 views
0 votes
1 answer
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,490 points
2,303 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,490 points
234 views
0 votes
10 answers

hadoop fs -put command?

put syntax: put <localSrc> <dest> copy syntax: copyFr ...READ MORE

answered Dec 7, 2018 in Big Data Hadoop by Aditya
11,892 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,290 points
995 views
0 votes
1 answer

Spark-shell not working

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

answered Jul 15 in Apache Spark by Mahesh
31 views