Huawei
H13-723_V2.0 · Question #45
There are the following business scenarios: the user's online log files have been stored on HDFS, and the log file content format is: each online record has three fields, namely name, gender, and…
The correct answer is A. sc.textFile("/data/file/path".map(_.split(",").map(p => Femalelnfo(p(0), p(1), p C. val text = sc.textFile("/data/file/path"). See the full explanation below for the reasoning.
Question
There are the following business scenarios: the user's online log files have been stored on HDFS, and the log file content format is: each online record has three fields, namely name, gender, and online time, separated by "," between the fields; All female netizens who spend more than two hours online are required to print out. Which of the following code fragments can achieve the above business scenarios? (multiple choice)
Options
- Asc.textFile("/data/file/path".map(_.split(",").map(p => Femalelnfo(p(0), p(1), p
- Bsc.textFile("/data/file/path".map(_.split(",").map(p => Femalelnfo(p(0), p(1), p
- Cval text = sc.textFile("/data/file/path")
- Dval text = sc.textFile("/data/file/path")
How the community answered
(24 responses)- A79% (19)
- B8% (2)
- D13% (3)
Community Discussion
No community discussion yet for this question.