6

This exception is rising at lines.count().

Exception has occurred: py4j.protocol.Py4JError An error occurred while calling o26.isBarrier. Trace: py4j.Py4JException: Method isBarrier([]) does not exist at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:318) at py4j.reflection.ReflectionEngine.getMethod(ReflectionEngine.java:326) at py4j.Gateway.invoke(Gateway.java:274) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79) at from pyspark import SparkContext from pyspark import SparkConf

Code:

    conf = SparkConf()

    conf.setAppName("First App")

    sc = SparkContext('local',conf=conf)
    print("-----------------------------------------------------------------------------")
    lines = sc.textFile("sample.csv")
    print("-----------------------------------------------------------------------------")
    lines.count()
3

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.