/** Validates the the input GCS path is accessible and that the path is well formed. */ @Override public String validateInputFilePatternSupported(String filepattern) { GcsPath gcsPath = getGcsPath(filepattern); checkArgument(dataflowOptions.getGcsUtil().isGcsPatternSupported(gcsPath.getObject())); String returnValue = verifyPath(filepattern); verifyPathIsAccessible(filepattern, "Could not find file %s"); return returnValue; }
@Override public String verifyPath(String path) { GcsPath gcsPath = getGcsPath(path); checkArgument(gcsPath.isAbsolute(), "Must provide absolute paths for Dataflow"); checkArgument( !gcsPath.getObject().contains("//"), "Dataflow Service does not allow objects with consecutive slashes"); return gcsPath.toResourceName(); }