为什么组合任务无法执行Spring Cloud Data Flow中的其他组合任务?

时间:2020-08-11 06:09:45

标签: spring-cloud spring-cloud-dataflow spring-cloud-task

创建2个名为foobar的组合任务之后,我想创建另一个名为baz的组合任务来运行foo && bar。但是,由于此错误,我没有这样做:

dataflow:>task create baz --definition "foo && bar"
Command failed org.springframework.cloud.dataflow.rest.client.DataFlowClientException: The 'task:foo' application could not be found.
The 'task:foo' application could not be found.
org.springframework.cloud.dataflow.rest.client.DataFlowClientException: The 'task:foo' application could not be found.
    at org.springframework.cloud.dataflow.rest.client.VndErrorResponseErrorHandler.handleError(VndErrorResponseErrorHandler.java:65)
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782)
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740)
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674)
    at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:418)
    at org.springframework.cloud.dataflow.rest.client.TaskTemplate.create(TaskTemplate.java:156)
    at org.springframework.cloud.dataflow.shell.command.TaskCommands.create(TaskCommands.java:213)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282)
    at org.springframework.shell.core.SimpleExecutionStrategy.invoke(SimpleExecutionStrategy.java:68)
    at org.springframework.shell.core.SimpleExecutionStrategy.execute(SimpleExecutionStrategy.java:59)
    at org.springframework.shell.core.AbstractShell.executeCommand(AbstractShell.java:134)
    at org.springframework.shell.core.JLineShell.promptLoop(JLineShell.java:533)
    at org.springframework.shell.core.JLineShell.run(JLineShell.java:179)
    at java.lang.Thread.run(Thread.java:748)

组合任务似乎只能由基本任务应用程序组成。为什么我不能创建由其他组合任务组成的组合任务?谢谢。

1 个答案:

答案 0 :(得分:1)

这是设计使然。 SCDF不支持在另一个组合任务中运行组合任务。请随时在https://github.com/spring-cloud/spring-cloud-dataflow/issues上打开增强功能请求。谢谢!