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

问题描述

创建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)

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

解决方法

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

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...