private void verifySpec(ApplicationId appId, ApplicationSpecification specification) { VerifyResult result = getVerifier(ApplicationSpecification.class).verify(appId, specification); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage()); } }
private void verifySpec(ApplicationId appId, ApplicationSpecification specification) { VerifyResult result = getVerifier(ApplicationSpecification.class).verify(appId, specification); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage()); } }
protected void verifyPrograms(ApplicationId appId, ApplicationSpecification specification) { Iterable<ProgramSpecification> programSpecs = Iterables.concat(specification.getMapReduce().values(), specification.getWorkflows().values()); VerifyResult result; for (ProgramSpecification programSpec : programSpecs) { Verifier<ProgramSpecification> verifier = getVerifier(programSpec.getClass()); result = verifier.verify(appId, programSpec); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage()); } } for (Map.Entry<String, WorkflowSpecification> entry : specification.getWorkflows().entrySet()) { verifyWorkflowSpecifications(specification, entry.getValue()); } for (Map.Entry<String, ScheduleCreationSpec> entry : specification.getProgramSchedules().entrySet()) { String programName = entry.getValue().getProgramName(); if (!specification.getWorkflows().containsKey(programName)) { throw new RuntimeException(String.format("Schedule '%s' is invalid: Workflow '%s' is not configured " + "in application '%s'", entry.getValue().getName(), programName, specification.getName())); } } }
protected void verifyPrograms(ApplicationId appId, ApplicationSpecification specification) { Iterable<ProgramSpecification> programSpecs = Iterables.concat(specification.getFlows().values(), specification.getMapReduce().values(), specification.getWorkflows().values()); VerifyResult result; for (ProgramSpecification programSpec : programSpecs) { result = getVerifier(programSpec.getClass()).verify(appId, programSpec); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage()); } } for (Map.Entry<String, WorkflowSpecification> entry : specification.getWorkflows().entrySet()) { verifyWorkflowSpecifications(specification, entry.getValue()); } for (Map.Entry<String, ScheduleCreationSpec> entry : specification.getProgramSchedules().entrySet()) { String programName = entry.getValue().getProgramName(); if (!specification.getWorkflows().containsKey(programName)) { throw new RuntimeException(String.format("Schedule '%s' is invalid: Workflow '%s' is not configured " + "in application '%s'", entry.getValue().getName(), programName, specification.getName())); } } }
result = getVerifier(DatasetCreationSpec.class).verify(appId, dataSetCreateSpec); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage());
result = getVerifier(DatasetCreationSpec.class).verify(appId, dataSetCreateSpec); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage()); result = getVerifier(StreamSpecification.class).verify(appId, spec); if (!result.isSuccess()) { throw new RuntimeException(result.getMessage());