concept relation in category spark

appears as: relation, The relation, A relation, relations, relations
Spark in Action, Second Edition

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

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.

A relation is a resilient distributed dataset, or RDD (for more information, see chapter 3), a known schema, and a few other methods:

ExifDirectoryRelation br = new ExifDirectoryRelation(); #1
       br .setSqlContext( sqlContext ); #2
      RecursiveExtensionFilteredLister photoLister = #3
             new RecursiveExtensionFilteredLister();
       for (java.util.Map.Entry<String, String> entry : optionsAsJavaMap
            .entrySet()) { #4
        String key = entry .getKey().toLowerCase(); #5
        String value = entry .getValue();
         switch ( key ) {
             case K. PATH : #6 #7
               photoLister .setPath( value );
               break ;
 
             case K. RECURSIVE : #8
               if ( value .toLowerCase().charAt(0) == 't' ) {
                 photoLister .setRecursive( true );
              } else {
                 photoLister .setRecursive( false );
              }
               break ;
...
        }
      }
       br .setPhotoLister( photoLister );
       return br ;
    }
 }

The next class you will study is the implementation of the relation; the class is ExifDirectoryRelation .