@Component
public class StreamCommands
extends java.lang.Object
implements org.springframework.shell.core.CommandMarker
Constructor and Description |
---|
StreamCommands() |
Modifier and Type | Method and Description |
---|---|
boolean |
available() |
java.lang.String |
createStream(java.lang.String name,
java.lang.String dsl,
boolean deploy) |
java.lang.String |
deployStream(java.lang.String name,
java.lang.String properties) |
java.lang.String |
destroyAllStreams(boolean force) |
java.lang.String |
destroyStream(java.lang.String name) |
Table |
listStreams() |
java.lang.String |
undeployAllStreams(boolean force) |
java.lang.String |
undeployStream(java.lang.String name) |
@CliAvailabilityIndicator(value={"stream create","stream list","stream deploy","stream undeploy","stream destroy","stream all destroy","stream all undeploy"}) public boolean available()
@CliCommand(value="stream create", help="Create a new stream definition") public java.lang.String createStream(@CliOption(mandatory=true,key={"","name"},help="the name to give to the stream") java.lang.String name, @CliOption(mandatory=true,key="definition",optionContext="completion-stream disable-string-converter",help="a stream definition, using XD DSL (e.g. \"http --port=9000 | hdfs\")") java.lang.String dsl, @CliOption(key="deploy",help="whether to deploy the stream immediately",unspecifiedDefaultValue="false",specifiedDefaultValue="true") boolean deploy)
@CliCommand(value="stream destroy", help="Destroy an existing stream") public java.lang.String destroyStream(@CliOption(key={"","name"},help="the name of the stream to destroy",mandatory=true,optionContext="existing-stream disable-string-converter") java.lang.String name)
@CliCommand(value="stream all destroy", help="Destroy all existing streams") public java.lang.String destroyAllStreams(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true") boolean force)
@CliCommand(value="stream deploy", help="Deploy a previously created stream") public java.lang.String deployStream(@CliOption(key={"","name"},help="the name of the stream to deploy",mandatory=true,optionContext="existing-stream undeployed disable-string-converter") java.lang.String name, @CliOption(key="properties",help="the properties for this deployment",mandatory=false) java.lang.String properties)
@CliCommand(value="stream undeploy", help="Un-deploy a previously deployed stream") public java.lang.String undeployStream(@CliOption(key={"","name"},help="the name of the stream to un-deploy",mandatory=true,optionContext="existing-stream deployed disable-string-converter") java.lang.String name)
@CliCommand(value="stream all undeploy", help="Un-deploy all previously deployed stream") public java.lang.String undeployAllStreams(@CliOption(key="force",help="bypass confirmation prompt",unspecifiedDefaultValue="false",specifiedDefaultValue="true") boolean force)
@CliCommand(value="stream list", help="List created streams") public Table listStreams()