Cloudera
CCD-410 · Question #14
You have a directory named jobdata in HDFS that contains four files: _first.txt, second.txt, .third.txt and #data.txt. How many files will be processed by the FileInputFormat.setInputPaths ()…
The correct answer is C. Two, file names with a leading period or underscore are ignored. Files starting with '_' are considered 'hidden' like unix files starting with '.'. # characters are allowed in HDFS file names.
Developing with Apache Spark Core
Question
You have a directory named jobdata in HDFS that contains four files: _first.txt, second.txt, .third.txt and #data.txt. How many files will be processed by the FileInputFormat.setInputPaths () command when it's given a path object representing this directory?
Options
- AFour, all files will be processed
- BThree, the pound sign is an invalid character for HDFS file names
- CTwo, file names with a leading period or underscore are ignored
- DNone, the directory cannot be named jobdata
- EOne, no special characters can prefix the name of an input file
How the community answered
(27 responses)- A4% (1)
- C81% (22)
- D11% (3)
- E4% (1)
Explanation
Files starting with '_' are considered 'hidden' like unix files starting with '.'. # characters are allowed in HDFS file names.
Topics
#FileInputFormat#hidden files#underscore prefix#input path filtering
Community Discussion
No community discussion yet for this question.