Shreyas arya

Generation

generate functionMon, 23 Jan 2023

Validators are implemented for each workflow execution status Validators are applied in production code

public boolean validate(Workflow wf, String user) throws IOException { boolean isValidated = true; Path inputDir = new Path(wf.getInputDirectory()); FileSystem fs = inputDir.getFileSystem(conf); FileStatus[] files = fs.listStatus(inputDir); for (FileStatus status : files) { Path path = status.getPath(); if (fs.isFile(path)) { try { isValidated = isValidated && validateFile(fs.open(path)); } catch (IOException e) { e.printStackTrace(); isValidated = false; } } } return isValidated; }

Questions about programming?Chat with your personal AI assistant