Question: Consider 3 files warc.csv , wat.csv and we . csv . Consider a warc.csv file related data. An indicative line is: 2 0 1 7

Consider 3 files warc.csv, wat.csv and we.csv.
Consider a warc.csv file related data. An indicative line is:
2017-03-22T22:13:57Z, urn:coco, response, 40802,
213.155.18.48, http:coco, Apache, 'html'
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.
Consider a wat.csv file related data. An indicative line is:
urn:uuid, 1053, http:coco
In order the columns are: first the warc record id, the content length of the metadata, and
finally the target URL (it can be different from the target URL of the warc data).
Consider a wet.csv file related data. An indicative line is:
urn:uuid, "extracted plaintext"
In order the columns are: first the warc record id and then the extracted plaintext from the
url (can be in ascii).
Using RDDs write a Pyhton code to answer the following.
Task 1:
For each server used, find the average content length of warc records as well as the average
content length of their metadata (print the top 5 servers with the largest content size).
Tips: You will need to join datasets to get the desired result.
For this query you will need to filter out the records that have null values.
Remember to restart the Spark cluster before each measurement, to avoid hot caches, or
you can clear the cache.
Perform Task 1 using DataFrames/Spark SQL and parquet file
Task 2:
Please give instruction on how to measure the execution time for Task1:
Map/Reduce-RDD API
Spark SQL to CSV files (you need to define the schema of each file)
Spark SQL to parquet file
 Consider 3 files warc.csv, wat.csv and we.csv. Consider a warc.csv file

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!