public class ProcessStream extends AbstractLineStream
| Modifier and Type | Field and Description |
|---|---|
protected String |
command |
protected Stream |
dataStream |
protected Class<? extends Stream> |
dataStreamClass |
protected String |
format |
(package private) static org.slf4j.Logger |
log |
protected Process |
process |
attributes, encoding, readerclosed, count, id, in, limit, prefix, seqId, sequenceKey, urlSOURCE_KEY| Constructor and Description |
|---|
ProcessStream() |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
getCommand() |
String |
getFormat() |
void |
init() |
Data |
readNext() |
void |
setCommand(String command) |
void |
setFormat(String format) |
getEncoding, readLine, setEncodinggetId, getInputStream, getLimit, getPrefix, getSequenceKey, getUrl, read, setId, setLimit, setPrefix, setSequenceKey, setUrlstatic org.slf4j.Logger log
protected Process process
protected Stream dataStream
protected String format
protected String command
public String getCommand()
@Parameter(required=true, description="The command to execute. This command will be spawned and is assumed to output data to standard output.") public void setCommand(String command)
command - the command to setpublic String getFormat()
public void init()
throws Exception
init in interface Sourceinit in class AbstractLineStreamExceptionSource.init()@Parameter(required=true, values={"stream.io.CsvStream","stream.io.SvmLight","stream.io.JSONStream","stream.io.LineStream"}, defaultValue="stream.io.CsvStream", description="The format of the input (standard input), defaults to CSV") public void setFormat(String format)
format - the format to setpublic Data readNext() throws Exception
readNext in class AbstractStreamExceptionSource.read()public void close()
close in interface Sourceclose in class AbstractLineStreamSource.close()Copyright © 2018. All rights reserved.