IBM Streams 4.2.1

Operator Export

Primitive operator image not displayed. Problem loading file: ../../image/tk$spl/op$spl.adapter$Export.svg

The Export operator sends a stream from the current application, making it available to Import operators of applications that are running in the same streaming middleware instance.

The Export operator does not send tuples to the exported stream inside stand-alone SPL applications. The tuples are ignored.

The Export operator does not allow a config clause to be specified.

Checkpointed data

The Export operator does not support checkpointing.

Behavior in a consistent region

The Export operator is not supported in a consistent region.

Checkpointing behavior in an autonomous region

The Export operator does not allow config checkpoint clause to be specified.

Examples

This example uses the Export operator.

composite Main {                                                                
  graph                                                                         
    stream<int32 i> TechSectorBargains = Beacon() { }                           
    stream<int32 i> HealthCareSectorBargains = Beacon() { }                     
    () as ExportOp1 = Export(TechSectorBargains) {                              
      param properties : { kind="bargains", category="tech",                    
                           tickers=["IBM", "GOOG", "MSFT"] };                   
    }                                                                           
    () as ExportOp2 = Export(HealthCareSectorBargains) {                        
      param streamId : "someStreamName";                                        
    }                                                                           
}        

Summary

Ports
This operator has 1 input port and 0 output ports.
Windowing
This operator does not accept any windowing configurations.
Parameters
This operator supports 4 parameters.

Optional: allowFilter, congestionPolicy, properties, streamId

Metrics
This operator does not report any metrics.

Properties

Implementation
C++
Threading
Always - Operator always provides a single threaded execution context.

Input Ports

Ports (0)

The Export operator has a single input port, which produces tuples from the exported stream. The Export operator does not allow custom port logic to be specified in its invocations.

Properties

Parameters

This operator supports 4 parameters.

Optional: allowFilter, congestionPolicy, properties, streamId

allowFilter

If this parameter is set to true or not present, then Import operators with a filter expression that connect to this Export operator pass the filter expression to the Export operator to use.

If this parameter is set to false, then Import operators with a filter expression and whose subscriptions match the Export operator fail to match the Export operator.

Properties

congestionPolicy

Specifies the congestion policy of the stream that is exported. If this parameter is set to dropConnection, then the connection is dropped when a downstream importer is not keeping up. In this case, the nBrokenConnections metric indicates the connection drop count at the output port. If many receivers are connected to the same output port, you can't distinguish which connection drops because of a slow receiver since the nBrokenConnections metric is cumulative for all outbound connections. When the parameter value is wait, the output port causes back pressure when congested. The default mode is wait.

Properties

properties

Specifies a tuple literal that gives name-value pairs. The supported attribute types are int64, float64, rstring, list<int64>, list<float64>, and list<rstring>.

If the application has user-defined parallelism and the Export operator is replicated in a parallel region, you can use the getChannel(), getMaxChannels(), getLocalChannel() and getLocalMaxChannels() SPL built-in functions in this parameter. The functions are evaluated when the job is submitted.

You can update the properties at run time by using either Java or C++ primitive operators.

Properties

streamId

Specifies the external name of the stream that is exported. Only one of streamId or properties can be specified on an Export operator.

If neither properties nor streamId is specified, the Export operator exports the stream by properties, with empty properties.

If the application has user-defined parallelism and the Export operator is replicated in a parallel region, you can use the getChannel(), getMaxChannels(), getLocalChannel() and getLocalMaxChannels() SPL built-in functions in this parameter. The functions are evaluated when the job is submitted.

Properties

Code Templates

Export with Properties
() as ${opInstanceName} = Export(${inputStream})   {
            param
                properties: {${paramExpression}};
        }
      

Export with Stream ID
() as ${opInstanceName} = Export(${inputStream})   {
            param
                streamId : ${exportedStreamName};
        }