Class FileUtils


  • public class FileUtils
    extends java.lang.Object
    Utilities for dealing with movement of files from object stores and workers.
    • Constructor Detail

      • FileUtils

        public FileUtils()
    • Method Detail

      • getFileResourceId

        public static org.apache.beam.sdk.io.fs.ResourceId getFileResourceId​(java.lang.String directory,
                                                                             java.lang.String fileName)
      • toStringParams

        public static java.lang.String toStringParams​(java.lang.ProcessBuilder builder)
      • copyFileFromWorkerToGCS

        public static java.lang.String copyFileFromWorkerToGCS​(SubProcessConfiguration configuration,
                                                               java.nio.file.Path fileToUpload)
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • copyFileFromGCSToWorker

        public static java.lang.String copyFileFromGCSToWorker​(ExecutableFile execuableFile)
                                                        throws java.lang.Exception
        Throws:
        java.lang.Exception
      • copyFile

        public static java.lang.String copyFile​(org.apache.beam.sdk.io.fs.ResourceId sourceFile,
                                                org.apache.beam.sdk.io.fs.ResourceId destinationFile)
                                         throws java.io.IOException
        Throws:
        java.io.IOException
      • createDirectoriesOnWorker

        public static void createDirectoriesOnWorker​(SubProcessConfiguration configuration)
                                              throws java.io.IOException
        Create directories needed based on configuration.
        Parameters:
        configuration -
        Throws:
        java.io.IOException
      • readLineOfLogFile

        public static java.lang.String readLineOfLogFile​(java.nio.file.Path path)