/** * Validates the custom transaction timeout, if specified in the given arguments. * * @throws IllegalArgumentException if the transaction timeout exceeds the transaction timeout limit given in the * CConfiguration. */ public static void validateTransactionTimeout(Map<String, String> args, CConfiguration cConf) { validateTransactionTimeout(args, cConf, null, null); }
/** * Validates the custom transaction timeout, if specified in the given arguments. * * @throws IllegalArgumentException if the transaction timeout exceeds the transaction timeout limit given in the * CConfiguration. */ public static void validateTransactionTimeout(Map<String, String> args, CConfiguration cConf) { validateTransactionTimeout(args, cConf, null, null); }
/** * Validates the options for the program. * Subclasses can override this to also validate the options for their sub-programs. */ protected void validateOptions(Program program, ProgramOptions options) { // this will throw an exception if the custom tx timeout is invalid SystemArguments.validateTransactionTimeout(options.getUserArguments().asMap(), cConf); }
/** * Validates the options for the program. * Subclasses can override this to also validate the options for their sub-programs. */ protected void validateOptions(Program program, ProgramOptions options) { // this will throw an exception if the custom tx timeout is invalid SystemArguments.validateTransactionTimeout(options.getUserArguments().asMap(), cConf); }
@Override protected void validateOptions(Program program, ProgramOptions options) { super.validateOptions(program, options); FlowSpecification spec = program.getApplicationSpecification().getFlows().get(program.getName()); for (String flowlet : spec.getFlowlets().keySet()) { SystemArguments.validateTransactionTimeout(options.getUserArguments().asMap(), cConf, "flowlet", flowlet); } }
@Override protected void validateOptions(Program program, ProgramOptions options) { super.validateOptions(program, options); // Extract and verify parameters ApplicationSpecification appSpec = program.getApplicationSpecification(); Preconditions.checkNotNull(appSpec, "Missing application specification."); ProgramType processorType = program.getType(); Preconditions.checkNotNull(processorType, "Missing processor type."); Preconditions.checkArgument(processorType == ProgramType.WORKFLOW, "Only WORKFLOW process type is supported."); WorkflowSpecification spec = appSpec.getWorkflows().get(program.getName()); Preconditions.checkNotNull(spec, "Missing WorkflowSpecification for %s", program.getName()); for (WorkflowNode node : spec.getNodes()) { if (node.getType().equals(WorkflowNodeType.ACTION)) { SystemArguments.validateTransactionTimeout(options.getUserArguments().asMap(), cConf, "action", node.getNodeId()); } } }
@Override protected void validateOptions(Program program, ProgramOptions options) { super.validateOptions(program, options); // Extract and verify parameters ApplicationSpecification appSpec = program.getApplicationSpecification(); Preconditions.checkNotNull(appSpec, "Missing application specification."); ProgramType processorType = program.getType(); Preconditions.checkNotNull(processorType, "Missing processor type."); Preconditions.checkArgument(processorType == ProgramType.WORKFLOW, "Only WORKFLOW process type is supported."); WorkflowSpecification spec = appSpec.getWorkflows().get(program.getName()); Preconditions.checkNotNull(spec, "Missing WorkflowSpecification for %s", program.getName()); for (WorkflowNode node : spec.getNodes()) { if (node.getType().equals(WorkflowNodeType.ACTION)) { SystemArguments.validateTransactionTimeout(options.getUserArguments().asMap(), cConf, "action", node.getNodeId()); } } }