Class GcsPathValidator

java.lang.Object
org.apache.beam.sdk.extensions.gcp.storage.GcsPathValidator
All Implemented Interfaces:
PathValidator

public class GcsPathValidator extends Object implements PathValidator
GCP implementation of PathValidator. Only GCS paths are allowed.
  • Method Details

    • fromOptions

      public static GcsPathValidator fromOptions(PipelineOptions options)
    • validateInputFilePatternSupported

      public void validateInputFilePatternSupported(String filepattern)
      Validates the input GCS path is accessible and that the path is well formed.
      Specified by:
      validateInputFilePatternSupported in interface PathValidator
      Parameters:
      filepattern - The file pattern to verify.
    • validateOutputFilePrefixSupported

      public void validateOutputFilePrefixSupported(String filePrefix)
      Validates the output GCS path is accessible and that the path is well formed.
      Specified by:
      validateOutputFilePrefixSupported in interface PathValidator
      Parameters:
      filePrefix - the file prefix to verify.
    • validateOutputResourceSupported

      public void validateOutputResourceSupported(ResourceId resourceId)
      Description copied from interface: PathValidator
      Validates that an output path is conforming.
      Specified by:
      validateOutputResourceSupported in interface PathValidator
      Parameters:
      resourceId - the file prefix to verify.
    • verifyPath

      public String verifyPath(String path)
      Description copied from interface: PathValidator
      Validate that a path is a valid path and that the path is accessible.
      Specified by:
      verifyPath in interface PathValidator
      Parameters:
      path - The path to verify.
      Returns:
      The post-validation path.