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

Add binary extraction DataFrames to PySpark. #350

Merged
merged 3 commits into from
Aug 21, 2019
Merged

Conversation

ruebot
Copy link
Member

@ruebot ruebot commented Aug 20, 2019

GitHub issue(s):

What does this Pull Request do?

Add binary extraction DataFrames to PySpark.

How should this be tested?

  • TravisCI
  • Fire up a Jupyter Notebook:
$ PYSPARK_DRIVER_PYTHON=jupyter PYSPARK_DRIVER_PYTHON_OPTS=notebook ~/bin/spark-2.4.3-bin-hadoop2.7/bin/pyspark --jars /home/nruest/Projects/au/aut/target/aut-0.17.1-SNAPSHOT-fatjar.jar --driver-class-path /home/nruest/Projects/au/aut/target/aut-0.17.1-SNAPSHOT-fatjar.jar --py-files /home/nruest/Projects/au/aut/target/aut.zip

Then do this for each of the additions, and make sure it works:

from aut import *

archive = WebArchive(sc, sqlContext, "/home/nruest/Projects/au/aut/src/test/resources/warc/")

df = archive.spreadsheets()
df.printSchema()

Screenshot from 2019-08-20 13-25-51

Additional Notes:

Let's see what happens with the test coverage. I assume I'm going to have to add some things to src/test/scala/io/archivesunleashed/df/DataFrameLoaderTest.scala

- Address #190
- Address #259
- Address #302
- Address #303
- Address #304
- Address #305
- Address #306
- Address #307
@ruebot ruebot requested a review from ianmilligan1 August 20, 2019 17:26
@codecov
Copy link

codecov bot commented Aug 20, 2019

Codecov Report

Merging #350 into master will decrease coverage by 0.76%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #350      +/-   ##
==========================================
- Coverage   75.52%   74.76%   -0.77%     
==========================================
  Files          39       39              
  Lines        1373     1387      +14     
  Branches      265      265              
==========================================
  Hits         1037     1037              
- Misses        220      234      +14     
  Partials      116      116

@ruebot
Copy link
Member Author

ruebot commented Aug 20, 2019

Here's an even better test: https://github.com/archivesunleashed/aut/wiki/Using-AUT-with-PySpark

(Just swap out 0.18.0 with the path to aut-0.17.1-SNAPSHOT-fatjar.jar and aut.zip)

@lintool
Copy link
Member

lintool commented Aug 21, 2019

Comments about naming df's if it's not too late...

Copy link
Member

@ianmilligan1 ianmilligan1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran through the PySpark documentation with the Jupyter command in this PR. All worked perfectly! 🎉

@ianmilligan1 ianmilligan1 merged commit eda185b into master Aug 21, 2019
@ianmilligan1 ianmilligan1 deleted the images-pyspark branch August 21, 2019 13:14
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

Successfully merging this pull request may close these issues.

3 participants