Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Consider a warc.csv file related data. An indicative line is: 2 0 1 7 - 0 3 - 2 2 T 2 2 : 1

Consider a warc.csv file related data. An indicative line is:
2017-03-22T22:13:57Z, record id, response, 40802,ip
adrress, URL, Server, HTML DOM
Columns in order: first the warc date, the warc record id, the warc type (e.g. metadata,
response, etc), the content length, the public IP address, the target URL, the server running
the site (eg apache, nginx, etc), and finally the overall content of the page with the entire
HTML DOM.
Using RDDs write a Pyhton code to answer the following.
Task 1:
For the target URL "coco", find the content length of the metadata as well as the size of the
HTML DOM (number of characters).
Tips:
For this query you should filter by url and keep warc type "request.
Remember to restart the Spark cluster before each measurement, to avoid hot caches, or
you can clear the cache with the command spark.catalog.clearCache()
Task 2:
Perform Task 1 using DataFrames/Splark SQL and parquet file

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advanced Database Systems

Authors: Carlo Zaniolo, Stefano Ceri, Christos Faloutsos, Richard T. Snodgrass, V.S. Subrahmanian, Roberto Zicari

1st Edition

155860443X, 978-1558604438

More Books

Students also viewed these Databases questions