IBM Streams 4.2

Parallel region restrictions

While the @parallel annotation can be applied to most operators, there are some limitations. The following conditions are not allowed in parallel regions, and the compiler will generate an error if it encounters them.
  1. A punctuation-expecting input port cannot be downstream from a parallel region without having a punctuation-generating operator between it and the parallel region. SPL does not permit fan-ins on input ports that expect punctuations. A fan-in on an operator input port means that more than one stream connects to it. Placing @parallel on an operator invocation implies that fan-ins are permitted on the input ports that are immediately outside the parallel region. If those input ports expect punctuations, they would violate the SPL ban on punctuation-expecting fan-ins.
  2. A parallel region cannot contain only Import or Export operator invocations. The following invocation of an Import operator is not allowed:
        @parallel(width=5)
        stream<Type> Data = Import() {
            param applicationName: "sample::Main";
                  streamId: "myName" + (rstring)getChannel();
        }
    Import and Export operators can only be replicated when they are invoked inside of a replicated composite operator, and they are used only in that replicated composite operator. For an Import, that means the operator which consumes its output stream must be inside of the replicated composite operator, and for an Export that means its input stream must come from an operator inside of the replicated composite operator.
  3. Import and Export operators that are not in a parallel region cannot communicate directly with operators inside of a parallel region. For Import operators outside of a parallel region, this means that operators inside of a parallel region cannot directly consume their output stream. For Export operators outside of a parallel region, this means that they cannot directly consume streams coming from operators inside of a parallel region.