Class SparkFileOutput

  • All Implemented Interfaces:
    java.io.Serializable

    public final class SparkFileOutput
    extends java.lang.Object
    implements java.io.Serializable
    Helper class to hide details of output operations for SparkJobs
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static SparkFileOutput from​(java.util.function.Consumer<org.openstreetmap.atlas.streaming.resource.WritableResource> saveFunction, java.lang.String parentFolder, java.lang.String targetFolder, java.lang.String folder, java.lang.String fileName, java.lang.String extension, java.lang.String operationName)
      Constructs a SparkFileOutput from given parameters
      static SparkFileOutput from​(java.util.function.Consumer<org.openstreetmap.atlas.streaming.resource.WritableResource> saveFunction, SparkFilePath folderPath, java.lang.String fileName, java.lang.String extension, java.lang.String operationName)
      Constructs a SparkFileOutput from given parameters
      java.lang.String getOperationName()  
      SparkFilePath getPath()  
      java.util.function.Consumer<org.openstreetmap.atlas.streaming.resource.WritableResource> getSaveFunction()  
      • Methods inherited from class java.lang.Object

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

      • from

        public static SparkFileOutput from​(java.util.function.Consumer<org.openstreetmap.atlas.streaming.resource.WritableResource> saveFunction,
                                           SparkFilePath folderPath,
                                           java.lang.String fileName,
                                           java.lang.String extension,
                                           java.lang.String operationName)
        Constructs a SparkFileOutput from given parameters
        Parameters:
        saveFunction - save function that is going to be executed
        folderPath - SparkFilePath with folder paths
        fileName - file name
        extension - file extension
        operationName - name of the output operation
        Returns:
        a new SparkFileOutput
      • from

        public static SparkFileOutput from​(java.util.function.Consumer<org.openstreetmap.atlas.streaming.resource.WritableResource> saveFunction,
                                           java.lang.String parentFolder,
                                           java.lang.String targetFolder,
                                           java.lang.String folder,
                                           java.lang.String fileName,
                                           java.lang.String extension,
                                           java.lang.String operationName)
        Constructs a SparkFileOutput from given parameters
        Parameters:
        saveFunction - save function that is going to be executed
        parentFolder - parent folder
        targetFolder - target folder
        folder - sub-folder
        fileName - file name
        extension - file extension
        operationName - name of the output operation
        Returns:
        a new SparkFileOutput
      • getOperationName

        public java.lang.String getOperationName()
        Returns:
        the operation name
      • getSaveFunction

        public java.util.function.Consumer<org.openstreetmap.atlas.streaming.resource.WritableResource> getSaveFunction()
        Returns:
        the save function