Interface SparkFileUtils

All Superinterfaces:
org.apache.spark.internal.Logging

public interface SparkFileUtils extends org.apache.spark.internal.Logging
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.spark.internal.Logging

    org.apache.spark.internal.Logging.LogStringContext, org.apache.spark.internal.Logging.SparkShellLoggingFilter
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Create a directory given the abstract pathname
    createDirectory(String root, String namePrefix)
    Create a directory inside the given parent directory.
    Create a temporary directory inside the java.io.tmpdir prefixed with spark.
    createTempDir(String root, String namePrefix)
    Create a temporary directory inside the given parent directory.
    void
    Delete a file or directory and its contents recursively.
    Lists files recursively.
    Return a well-formed URI for the file described by a user input string.

    Methods inherited from interface org.apache.spark.internal.Logging

    initializeForcefully, initializeLogIfNecessary, initializeLogIfNecessary, initializeLogIfNecessary$default$2, isTraceEnabled, log, logDebug, logDebug, logDebug, logDebug, logError, logError, logError, logError, logInfo, logInfo, logInfo, logInfo, logName, LogStringContext, logTrace, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, logWarning, org$apache$spark$internal$Logging$$log_, org$apache$spark$internal$Logging$$log__$eq, withLogContext
  • Method Details

    • resolveURI

      URI resolveURI(String path)
      Return a well-formed URI for the file described by a user input string.

      If the supplied path does not contain a scheme, or is a relative path, it will be converted into an absolute path with a file:// scheme.

      Parameters:
      path - (undocumented)
      Returns:
      (undocumented)
    • recursiveList

      File[] recursiveList(File f)
      Lists files recursively.
      Parameters:
      f - (undocumented)
      Returns:
      (undocumented)
    • createDirectory

      boolean createDirectory(File dir)
      Create a directory given the abstract pathname
      Parameters:
      dir - (undocumented)
      Returns:
      true, if the directory is successfully created; otherwise, return false.
    • createDirectory

      File createDirectory(String root, String namePrefix)
      Create a directory inside the given parent directory. The directory is guaranteed to be newly created, and is not marked for automatic deletion.
      Parameters:
      root - (undocumented)
      namePrefix - (undocumented)
      Returns:
      (undocumented)
    • createTempDir

      File createTempDir()
      Create a temporary directory inside the java.io.tmpdir prefixed with spark. The directory will be automatically deleted when the VM shuts down.
      Returns:
      (undocumented)
    • createTempDir

      File createTempDir(String root, String namePrefix)
      Create a temporary directory inside the given parent directory. The directory will be automatically deleted when the VM shuts down.
      Parameters:
      root - (undocumented)
      namePrefix - (undocumented)
      Returns:
      (undocumented)
    • deleteRecursively

      void deleteRecursively(File file)
      Delete a file or directory and its contents recursively. Don't follow directories if they are symlinks. Throws an exception if deletion is unsuccessful.
      Parameters:
      file - (undocumented)