I checked that in my code, when I tried to use sc.textFile, sc is always non-NULL,
also, I continue my development just to find that the sc object cannot be referred in the same file, i.e. if I construct and use that only in A.scala, everything is OK; if I pass it to some class in B.scala, it will throw that exception, but this issue doesn't appear in Shark….
so, I reviewed my code, the most suspected place is that I always use sc in actor…
create and use sc in the same actor - passed;
create in main, and use in actor A - crash,
create in actor A, and use in actor B - crash
so I think the main cause may be the actor model??? anyone familiar scala & spark can explain the reason?
Spark can support passing sc in different actors in future? since, actors is so commonly used in scala-developed systems
Best,
--
Nan Zhu
School of Computer Science,
McGill University