GoogleCloudPlatform/DataflowJavaSDK

DataflowPathValidator.verifyPathIsAccessible should throw checked exception, not runtime exception

elharo opened this issue · 0 comments

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