コード例 #1
0
 /** 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;
 }
コード例 #2
0
 @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();
 }