WholeTextFileInputFormat Class

WholeTextFileInputFormat is used to read a text file as a single record.

Instead of splitting the file line by line or by delimiters, the entire content of each input file is read and stored into one record.

Behavior

Notes

  • This input format is suitable for small to medium-sized files.
  • Using it on very large files may impact memory usage, since the entire file is loaded at once.