public StreamDefinition(String name, DataFlowOperations client, String definition, List<StreamApplication> applications) { this.name = name; this.client = client; this.definition = definition; this.applications = applications; if (StringUtils.isEmpty(definition)) { createStreamDefinition(); } this.client.streamOperations().createStream(this.name, this.definition, false); }
public StreamDefinition(String name, DataFlowOperations client, String definition, List<StreamApplication> applications) { this.name = name; this.client = client; this.definition = definition; this.applications = applications; if (StringUtils.isEmpty(definition)) { createStreamDefinition(); } this.client.streamOperations().createStream(this.name, this.definition, false); }
@CliCommand(value = CREATE_STREAM, help = "Create a new stream definition") public String createStream( @CliOption(mandatory = true, key = { "", "name" }, help = "the name to give to the stream") String name, @CliOption(mandatory = true, key = { "definition" }, help = "a stream definition, using the DSL (e.g. " + "\"http --port=9000 | hdfs\")", optionContext = "disable-string-converter completion-stream") String dsl, @CliOption(key = "deploy", help = "whether to deploy the stream immediately", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true") boolean deploy) { streamOperations().createStream(name, dsl, deploy); String message = String.format("Created new stream '%s'", name); if (deploy) { message += "\nDeployment request has been sent"; } return message; }
@CliCommand(value = CREATE_STREAM, help = "Create a new stream definition") public String createStream( @CliOption(mandatory = true, key = { "", "name" }, help = "the name to give to the stream") String name, @CliOption(mandatory = true, key = { "definition" }, help = "a stream definition, using the DSL (e.g. " + "\"http --port=9000 | hdfs\")", optionContext = "disable-string-converter completion-stream") String dsl, @CliOption(key = "deploy", help = "whether to deploy the stream immediately", unspecifiedDefaultValue = "false", specifiedDefaultValue = "true") boolean deploy) { streamOperations().createStream(name, dsl, deploy); String message = String.format("Created new stream '%s'", name); if (deploy) { message += "\nDeployment request has been sent"; } return message; }