code: public static boolean exportSupported(@NonNull String sparkMaster, @NonNull FileSystem fs) {
          // Anything is supported with a local master. Regex matches 'local', 'local[DIGITS]' or 'local[*]'
          if (sparkMaster.matches("^local(\\[(\\d+|\\*)])?$")) {
              return true;
          }
          // Clustered mode is supported as long as the file system is not a local one
          return !fs.getUri().getScheme().equals("file");
      }
docs: Check if exporting data is supported in the current environment. Exporting is possible in two cases:
  - The master is set to local. In this case any file system, including local FS, will work for exporting.
  - The file system is not local. Local file systems do not work in cluster modes.
  
  @param sparkMaster the Spark master
  @param fs the Hadoop file system
  @return if export is supported