Hi Lydia,
you need to implement a custom InputFormat to read binary files.
Usually you can extend the FileInputFormat.
The implementation depends a lot on your use case, for example whether each binary file is read into a single or multiple records and how records are delimited if there are more than one in records per file.
Best, Fabian