Class GcsPathValidator
java.lang.Object
org.apache.beam.sdk.extensions.gcp.storage.GcsPathValidator
- All Implemented Interfaces:
PathValidator
GCP implementation of
PathValidator
. Only GCS paths are allowed.-
Method Summary
Modifier and TypeMethodDescriptionstatic GcsPathValidator
fromOptions
(PipelineOptions options) void
validateInputFilePatternSupported
(String filepattern) Validates the input GCS path is accessible and that the path is well formed.void
validateOutputFilePrefixSupported
(String filePrefix) Validates the output GCS path is accessible and that the path is well formed.void
validateOutputResourceSupported
(ResourceId resourceId) Validates that an output path is conforming.verifyPath
(String path) Validate that a path is a valid path and that the path is accessible.
-
Method Details
-
fromOptions
-
validateInputFilePatternSupported
Validates the input GCS path is accessible and that the path is well formed.- Specified by:
validateInputFilePatternSupported
in interfacePathValidator
- Parameters:
filepattern
- The file pattern to verify.
-
validateOutputFilePrefixSupported
Validates the output GCS path is accessible and that the path is well formed.- Specified by:
validateOutputFilePrefixSupported
in interfacePathValidator
- Parameters:
filePrefix
- the file prefix to verify.
-
validateOutputResourceSupported
Description copied from interface:PathValidator
Validates that an output path is conforming.- Specified by:
validateOutputResourceSupported
in interfacePathValidator
- Parameters:
resourceId
- the file prefix to verify.
-
verifyPath
Description copied from interface:PathValidator
Validate that a path is a valid path and that the path is accessible.- Specified by:
verifyPath
in interfacePathValidator
- Parameters:
path
- The path to verify.- Returns:
- The post-validation path.
-