public DataFlowOpForgeInitializeResult initializeForge(DataFlowOpForgeInitializeContext context) throws ExprValidationException { if (!context.getOutputPorts().isEmpty()) { throw new IllegalArgumentException("EventBusSink operator does not provide an output stream"); } eventTypes = new EventType[context.getInputPorts().size()]; for (int i = 0; i < eventTypes.length; i++) { eventTypes[i] = context.getInputPorts().get(i).getTypeDesc().getEventType(); } return null; }
public DataFlowOpForgeInitializeResult initializeForge(DataFlowOpForgeInitializeContext context) throws ExprValidationException { if (!context.getOutputPorts().isEmpty()) { throw new IllegalArgumentException("LogSink operator does not provide an output stream"); } eventTypes = new EventType[context.getInputPorts().size()]; for (Map.Entry<Integer, DataFlowOpInputPort> entry : context.getInputPorts().entrySet()) { eventTypes[entry.getKey()] = entry.getValue().getTypeDesc().getEventType(); } title = DataFlowParameterValidation.validate("title", title, String.class, context); layout = DataFlowParameterValidation.validate("layout", layout, String.class, context); format = DataFlowParameterValidation.validate("format", format, String.class, context); log = DataFlowParameterValidation.validate("log", log, boolean.class, context); linefeed = DataFlowParameterValidation.validate("linefeed", linefeed, boolean.class, context); return null; }
public DataFlowOpForgeInitializeResult initializeForge(DataFlowOpForgeInitializeContext context) throws ExprValidationException { if (context.getInputPorts().size() != 1) { throw new EPException(this.getClass().getSimpleName() + " expected a single input port"); } eventType = context.getInputPorts().get(0).getTypeDesc().getEventType(); if (eventType == null) { throw new EPException("No event type defined for input port"); } file = DataFlowParameterValidation.validate("file", file, String.class, context); classpathFile = DataFlowParameterValidation.validate("classpathFile", classpathFile, boolean.class, context); append = DataFlowParameterValidation.validate("append", append, boolean.class, context); return null; }
public DataFlowOpForgeInitializeResult initializeForge(DataFlowOpForgeInitializeContext context) throws ExprValidationException { if (context.getInputPorts().size() != 1) { throw new EPException(this.getClass().getSimpleName() + " expected a single input port"); } eventType = context.getInputPorts().get(0).getTypeDesc().getEventType(); if (eventType == null) { throw new EPException("No event type defined for input port"); } file = DataFlowParameterValidation.validate("file", file, String.class, context); classpathFile = DataFlowParameterValidation.validate("classpathFile", classpathFile, boolean.class, context); append = DataFlowParameterValidation.validate("append", append, boolean.class, context); return null; }
public DataFlowOpForgeInitializeResult initializeForge(DataFlowOpForgeInitializeContext context) throws ExprValidationException { if (context.getInputPorts().size() != 1) { throw new ExprValidationException("Filter requires single input port"); } if (filter == null) { throw new ExprValidationException("Required parameter 'filter' providing the filter expression is not provided"); } if (context.getOutputPorts().isEmpty() || context.getOutputPorts().size() > 2) { throw new IllegalArgumentException("Filter operator requires one or two output stream(s) but produces " + context.getOutputPorts().size() + " streams"); } eventType = context.getInputPorts().get(0).getTypeDesc().getEventType(); singleOutputPort = context.getOutputPorts().size() == 1; filter = DataFlowParameterValidation.validate("filter", filter, eventType, Boolean.class, context); GraphTypeDesc[] typesPerPort = new GraphTypeDesc[context.getOutputPorts().size()]; for (int i = 0; i < typesPerPort.length; i++) { typesPerPort[i] = new GraphTypeDesc(false, true, eventType); } return new DataFlowOpForgeInitializeResult(typesPerPort); }
eventTypes = new EventType[numStreams]; for (int i = 0; i < numStreams; i++) { eventTypes[i] = context.getInputPorts().get(i).getTypeDesc().getEventType(); throw new ExprValidationException("Failed to find stream '" + filter.getRawFilterSpec().getEventTypeName() + "' among input ports, input ports are " + Arrays.toString(getInputPortNames(context.getInputPorts()))); EventType eventType = inputPort.getValue().getTypeDesc().getEventType(); originatingStreamToViewableStream[inputPort.getKey()] = streamNum; String streamAlias = filter.getOptionalStreamName();