GoogleCloudPlatform / DataflowJavaSDK

Google Cloud Dataflow provides a simple, powerful model for building both batch and streaming parallel data processing pipelines.
http://cloud.google.com/dataflow
855 stars 324 forks source link

DataflowPathValidator.verifyPathIsAccessible should throw checked exception, not runtime exception #586

Open elharo opened 7 years ago

elharo commented 7 years ago

still digging into exactly why this happens, but meanwhile this should be a checked exception, probably some kind of IOException. This is an external condition, not a bug in the program itself. so an IllegalArgumentException is inappropriate.

Caused by: java.lang.IllegalArgumentException: Output path does not exist or is not writeable: gs://tester
    at com.google.cloud.dataflow.sdk.repackaged.com.google.common.base.Preconditions.checkArgument(Preconditions.java:146)
    at com.google.cloud.dataflow.sdk.util.DataflowPathValidator.verifyPathIsAccessible(DataflowPathValidator.java:80)
    at com.google.cloud.dataflow.sdk.util.DataflowPathValidator.validateOutputFilePrefixSupported(DataflowPathValidator.java:63)
    at com.google.cloud.dataflow.sdk.runners.DataflowPipelineRunner.fromOptions(DataflowPipelineRunner.java:274)
    at com.google.cloud.dataflow.sdk.runners.BlockingDataflowPipelineRunner.fromOptions(BlockingDataflowPipelineRunner.java:82)
    ... 9 more