Search in sources :

Example 1 with StreamingInput

use of com.ibm.streams.operator.StreamingInput in project streamsx.kafka by IBMStreams.

the class AbstractKafkaConsumerOperator method warnStartPositionParamRequiresJCP.

// @ContextCheck (compile = true)
public static void warnStartPositionParamRequiresJCP(OperatorContextChecker checker) {
    OperatorContext opCtx = checker.getOperatorContext();
    Set<String> paramNames = opCtx.getParameterNames();
    List<StreamingInput<Tuple>> inputPorts = opCtx.getStreamingInputs();
    if (opCtx.getOptionalContext(ConsistentRegionContext.class) == null && (paramNames.contains(START_POSITION_PARAM) || paramNames.contains(START_POSITION_STR_PARAM)) && inputPorts.size() == 0) {
        System.err.println(Messages.getString("WARN_ENSURE_JCP_ADDED_STARTPOS_NOT_DEFAULT", opCtx.getKind()));
    }
}
Also used : ConsistentRegionContext(com.ibm.streams.operator.state.ConsistentRegionContext) StreamingInput(com.ibm.streams.operator.StreamingInput) OperatorContext(com.ibm.streams.operator.OperatorContext) RString(com.ibm.streams.operator.types.RString)

Aggregations

OperatorContext (com.ibm.streams.operator.OperatorContext)1 StreamingInput (com.ibm.streams.operator.StreamingInput)1 ConsistentRegionContext (com.ibm.streams.operator.state.ConsistentRegionContext)1 RString (com.ibm.streams.operator.types.RString)1