BDI302cXuất hiện trong 1 đề thi
In this code snippet below from the Hands On exercise on importing data, '100L + row...' adds 100 to the value of every country ID. Which of the following statements are true regarding this decision? (Note: you may select more than one) \nscala\nval countries: RDD[(VertexId, PlaceNode)] = sc.textFile("./EOADATA/country.csv"). filter(!_.startsWith("#")). map{line => val row = line split ',' (100L + row(0).toInt, Country(row(1))) }
Các lựa chọn
AAnother option would have been to add 100 to the metropolis keys as they were imported, and leave the country keys as they were originally numbered.
BThis step was needed to create unique keys between the country and the metropolis datasets.
CAnother option would be to add 500 to the country keys.