concept register file in category spark

appears as: register file, The register file
Spark in Action, Second Edition

This is an excerpt from Manning's book Spark in Action, Second Edition.

Spark requires a resource file to tell it what to do with a short name (as opposed to a full class name). This is the advertiser (in this example, exif ). This file contains the list of external data sources that need to be registered. Those classes advertise a short name; in this case, exif . The file contains the class name where the loading process happens: net.jgp.books.spark.ch09.x.ds.exif.ExifDirectoryDataSourceShortnameAdvertiser . This is done in a resource file called org.apache.spark.sql.sources .DataSourceRegister, as illustrated in figure 9.7. The register file must be in the resources/META-INF/services directory of your project.

Figure 9.7 Location of the register file, which tells Spark where the data sources’ advertisers are. The advertiser will tell Spark the short name of the data source (in this lab, exif ).
Figure 9.6 The journey to your business logic follows a bit of plumbing code, which involves writing a simple class to advertise your data source short name, the data source, and the relation.