public class Grep extends java.lang.Object
com.ibm.streamsx.topology.context.StreamsContext.
This may be executed from the samples/java/functional directory as:
java -cp functionalsamples.jar:../../../com.ibm.streamsx.topology/lib/com.ibm.streamsx.topology.jar:$STREAMS_INSTALL/lib/com.ibm.streams.operator.samples.jar
simple.Grep CONTEXT_TYPE $HOME/books Elizabeth
- Run directly from the command line.
DISTRIBUTED - Run as an IBM Streams distributed
application.STANDALONE - Run as an IBM Streams standalone
application.EMBEDDED - Run embedded within this JVM.BUNDLE - Create an IBM Streams application bundle.TOOLKIT - Create an IBM Streams application toolkit.| Constructor and Description |
|---|
Grep() |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(java.lang.String[] args)
Sample continuous (streaming) grep topology application.
|
public Grep()
public static void main(java.lang.String[] args) throws java.lang.Exception
com.ibm.streamsx.topology.context.StreamsContext.
Three arguments are required:
contextType - The type of the context to execute the topology in, e.g. EMBEDDED or STANDALONE.directory - Directory to watch for files.term - Search term, if any line in a file contains term then it will be printed.
java simple.Grep EMBEDDED $HOME/books Elizabethjava.lang.Exception