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

Output filtered data to WARC Format #147

Open
greebie opened this issue Dec 8, 2017 · 10 comments
Open

Output filtered data to WARC Format #147

greebie opened this issue Dec 8, 2017 · 10 comments

Comments

@greebie
Copy link
Contributor

greebie commented Dec 8, 2017

Users may desire outputs in WARC format after filtering their RDD[ArchiveRecord].

@ianmilligan1 ianmilligan1 changed the title Output filtered data to Warc Format Output filtered data to WARC Format Dec 19, 2017
@greebie greebie self-assigned this Dec 19, 2017
@greebie
Copy link
Contributor Author

greebie commented Jan 8, 2018

@dportabella has an example to implement this here: https://gist.github.com/dportabella/3caf261c218a4448a03a14dbc06fe730 .

The other alternative is the more detailed WARCWriter class from iipc:
https://github.com/iipc/webarchive-commons/blob/master/src/main/java/org/archive/io/warc/WARCWriter.java which has me confused, honestly.

This feature has potential to be dangerous, as there is no real way to test the total size of the request. Take for example this pseudocode:

var record = RecordLoader('filePath', sc) .map(x => SaveToWARC(record))

which would save the entire Warc for every ArchiveRecord in record. It would be a juggernaut that will not stop until the server explodes due to lack of fileSpace.

I have to admit to being a little lost to the finer details of producing and saving a WARC files here, and it's Monday, so am prone to laziness. Advice @ruebot, @lintool and @ianmilligan1 ?

@ianmilligan1
Copy link
Member

The example looks promising, @greebie! I'm not too hung up on the danger, as long as the feature is well documented. But maybe I'm naive. The others may think differently, but my gut is that taking a stab at using @dportabella's example and seeing if it can play with AUT is probably the most fruitful way forward?

We can also discuss tomorrow.

@dportabella
Copy link
Contributor

it would be nice to also create the cdx index at the same time.

@greebie
Copy link
Contributor Author

greebie commented Jan 8, 2018

Producing the cdx would be a safe start for testing purposes, actually. Thanks dportabella!

@greebie
Copy link
Contributor Author

greebie commented Jan 11, 2018

Backing away from this issue for now until we find someone with better understanding of the iipc toolkit.

@ianmilligan1
Copy link
Member

I think our conversations have largely moved away from the idea of creating new WARC files, and really focusing on derivative datasets. I think given this move in the project, we could consider closing this?

@dportabella
Copy link
Contributor

I still think that filtering WARC files is an important task that AUT can solve.

@ianmilligan1
Copy link
Member

Thanks @dportabella! My sense is that our team's time is limited to make this a short or medium-term issue for us, but any chance you'd be interested in opening up a PR based on the example code that @greebie shared up above?

@dportabella
Copy link
Contributor

I shared a gist on achieving this task (included in @greebie comment above), and I am currently using this approach.
I don't know much the details of the AUT library, and I don't have time to get into it, sorry :(

@sepastian
Copy link

Adding writing of WARC records to the current AUT is one way of solving this.

But I would rather go with @ruebot's suggestion of hooking into existing infrastructure and creating a Spark Data Source, see #371.

@ruebot ruebot removed the RA-Task label May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
@sepastian @greebie @ruebot @dportabella @ianmilligan1 and others