Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The script WordCount.py in the rdd directory has a couple of issues #8

Open
tappoz opened this issue Jun 9, 2018 · 0 comments
Open

Comments

@tappoz
Copy link

tappoz commented Jun 9, 2018

I am running these scripts on Debian Stretch.

Path issues

I had to import os, then add this:

    projRootPath = os.path.dirname(os.path.realpath(__file__)) + "/../"
    lines = sc.textFile(projRootPath + "in/word_count.text")

Otherwise I am unable to run the script from different points in the file system.

Python version

It does not work on python 2. To make it work I had to use this environment variable:

export PYSPARK_PYTHON=python3

This information could be added to a README file.

I can provide a PR in case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant