Class FileSystemCreator


  • public class FileSystemCreator
    extends java.lang.Object
    Utility class that helps create a FileSystem using some Spark/Hadoop configuration key-values.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.hadoop.fs.FileSystem get​(java.lang.String path, java.util.Map<java.lang.String,​java.lang.String> configuration)
      Create a FileSystem from an agnostic configuration map
      org.apache.hadoop.fs.FileSystem get​(java.lang.String path, org.apache.hadoop.conf.Configuration configuration)
      Create a FileSystem from a Hadoop Configuration
      org.apache.hadoop.fs.FileSystem get​(java.lang.String path, org.apache.spark.SparkConf configuration)
      Create a FileSystem from a SparkConf
      static java.util.Map<java.lang.String,​java.lang.String> resourceFileSystemScheme()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FileSystemCreator

        public FileSystemCreator()
    • Method Detail

      • resourceFileSystemScheme

        public static final java.util.Map<java.lang.String,​java.lang.String> resourceFileSystemScheme()
        Returns:
        The configuration needed to get a ResourceFileSystem setup.
      • get

        public org.apache.hadoop.fs.FileSystem get​(java.lang.String path,
                                                   org.apache.hadoop.conf.Configuration configuration)
        Create a FileSystem from a Hadoop Configuration
        Parameters:
        path - The path that defines the FileSystem
        configuration - The Configuration
        Returns:
        The corresponding FileSystem
      • get

        public org.apache.hadoop.fs.FileSystem get​(java.lang.String path,
                                                   java.util.Map<java.lang.String,​java.lang.String> configuration)
        Create a FileSystem from an agnostic configuration map
        Parameters:
        path - The path that defines the FileSystem
        configuration - The agnostic configuration map
        Returns:
        The corresponding FileSystem
      • get

        public org.apache.hadoop.fs.FileSystem get​(java.lang.String path,
                                                   org.apache.spark.SparkConf configuration)
        Create a FileSystem from a SparkConf
        Parameters:
        path - The path that defines the FileSystem
        configuration - The SparkConf
        Returns:
        The corresponding FileSystem