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