Py4JNetworkError when using `textFile` on Spark from Windows

I’ve built Spark on Windows from branch-1.3. Here’s the output:

import pyspark
sc = pyspark.SparkContext(appName="myAppName")

fileName = 'pg100.txt' # from http://www.gutenberg.org/cache/epub/100/pg100.txt
print 'n'.join(sc.textFile(fileName, 8).take(5))

Py4JNetworkError: An error occurred while trying to connect to the Java server

There’s no issue in doing normal stuff with parallelize, it’s only when working with a textFile.


Source: windows

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.