Spring Cloud Data Flow参考指南

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Spring Cloud Data Flow参考指南相关的知识,希望对你有一定的参考价值。

Spring

44.13. 作业实例

作业实例端点提供有关向 Spring 云数据流服务器注册的作业实例的信息。 以下主题提供了更多详细信息:

  • 列出所有作业实例
  • 作业实例详细信息

44.13.1. 列出所有作业实例

作业实例终端节点允许您列出所有作业实例。 以下主题提供了更多详细信息:

  • 请求结构
  • 请求参数
  • 示例请求
  • 响应结构
请求结构
GET /jobs/instances?name=DOCJOB&page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数

参数

描述

​page​

从零开始的页码(可选)

​size​

请求的页面大小(可选)

​name​

与作业实例关联的名称

示例请求
$ curl http://localhost:9393/jobs/instances?name=DOCJOB&page=0&size=10 -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1845


"_embedded" :
"jobInstanceResourceList" : [
"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2022-09-13",
"startTime" : "10:55:41",
"duration" : "00:00:00",
"jobExecution" :
"id" : 1,
"version" : 1,
"jobParameters" :
"parameters" :
,
"jobInstance" :
"id" : 1,
"jobName" : "DOCJOB",
"version" : 0
,
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2022-09-13T10:55:41.811+0000",
"createTime" : "2022-09-13T10:55:41.800+0000",
"endTime" : null,
"lastUpdated" : "2022-09-13T10:55:41.811+0000",
"exitStatus" :
"exitCode" : "UNKNOWN",
"exitDescription" : ""
,
"executionContext" :
"dirty" : false,
"empty" : true,
"values" : [ ]
,
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"allFailureExceptions" : [ ]
,
"jobParameters" : ,
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC"
],
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/instances/1"


]
,
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/instances?page=0&size=10"

,
"page" :
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0

44.13.2. 作业实例详细信息

作业实例终端节点允许您列出所有作业实例。 以下主题提供了更多详细信息:

  • 请求结构
  • 请求参数
  • 示例请求
  • 响应结构
请求结构
GET /jobs/instances/1 HTTP/1.1
Host: localhost:9393

/jobs/instances/id

参数

描述

​id​

现有作业实例的 ID(必需)

请求参数

此终结点没有请求参数。

示例请求
$ curl http://localhost:9393/jobs/instances/1 -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1354


"jobName" : "DOCJOB",
"jobInstanceId" : 1,
"jobExecutions" : [
"executionId" : 1,
"stepExecutionCount" : 0,
"jobId" : 1,
"taskExecutionId" : 1,
"name" : "DOCJOB",
"startDate" : "2022-09-13",
"startTime" : "10:55:41",
"duration" : "00:00:00",
"jobExecution" :
"id" : 1,
"version" : 1,
"jobParameters" :
"parameters" :
,
"jobInstance" :
"id" : 1,
"jobName" : "DOCJOB",
"version" : 0
,
"stepExecutions" : [ ],
"status" : "STARTED",
"startTime" : "2022-09-13T10:55:41.811+0000",
"createTime" : "2022-09-13T10:55:41.800+0000",
"endTime" : null,
"lastUpdated" : "2022-09-13T10:55:41.811+0000",
"exitStatus" :
"exitCode" : "UNKNOWN",
"exitDescription" : ""
,
"executionContext" :
"dirty" : false,
"empty" : true,
"values" : [ ]
,
"failureExceptions" : [ ],
"jobConfigurationName" : null,
"allFailureExceptions" : [ ]
,
"jobParameters" : ,
"jobParametersString" : "",
"restartable" : false,
"abandonable" : false,
"stoppable" : true,
"defined" : false,
"timeZone" : "UTC"
],
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/instances/1"


44.14. 作业步骤执行

作业步骤执行端点提供有关向 Spring 云数据流服务器注册的作业步骤执行的信息。 以下主题提供了更多详细信息:

  • 列出作业执行的所有步骤执行
  • 作业步骤执行详细信息
  • 作业步骤执行进度

44.14.1. 列出作业执行的所有步骤执行

作业步骤执行终结点允许您列出所有作业步骤执行。 以下主题提供了更多详细信息:

  • 请求结构
  • 请求参数
  • 示例请求
  • 响应结构
请求结构
GET /jobs/executions/1/steps?page=0&size=10 HTTP/1.1
Host: localhost:9393
请求参数

参数

描述

​page​

从零开始的页码(可选)

​size​

请求的页面大小(可选)

示例请求
$ curl http://localhost:9393/jobs/executions/1/steps?page=0&size=10 -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1623


"_embedded" :
"stepExecutionResourceList" : [
"jobExecutionId" : 1,
"stepExecution" :
"stepName" : "DOCJOB_STEP",
"id" : 1,
"version" : 0,
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2022-09-13T10:55:57.892+0000",
"endTime" : null,
"lastUpdated" : "2022-09-13T10:55:57.893+0000",
"executionContext" :
"dirty" : false,
"empty" : true,
"values" : [ ]
,
"exitStatus" :
"exitCode" : "EXECUTING",
"exitDescription" : ""
,
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobExecutionId" : 1,
"jobParameters" :
"parameters" :
,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
,
"stepType" : "",
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/executions/1/steps/1"


]
,
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/executions/1/steps?page=0&size=10"

,
"page" :
"size" : 10,
"totalElements" : 1,
"totalPages" : 1,
"number" : 0

44.14.2. 作业步骤执行细节

作业步骤执行终结点允许你获取有关作业步骤执行的详细信息。 以下主题提供了更多详细信息:

  • 请求结构
  • 请求参数
  • 示例请求
  • 响应结构
请求结构
GET /jobs/executions/1/steps/1 HTTP/1.1
Host: localhost:9393

/jobs/executions/id/steps/stepid

参数

描述

​id​

现有作业执行的 ID(必需)

​stepid​

特定作业执行的现有步骤执行的 id(必需)

请求参数

此终结点没有请求参数。

示例请求
$ curl http://localhost:9393/jobs/executions/1/steps/1 -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 1173


"jobExecutionId" : 1,
"stepExecution" :
"stepName" : "DOCJOB_STEP",
"id" : 1,
"version" : 0,
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2022-09-13T10:55:57.892+0000",
"endTime" : null,
"lastUpdated" : "2022-09-13T10:55:57.893+0000",
"executionContext" :
"dirty" : false,
"empty" : true,
"values" : [ ]
,
"exitStatus" :
"exitCode" : "EXECUTING",
"exitDescription" : ""
,
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobExecutionId" : 1,
"jobParameters" :
"parameters" :
,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
,
"stepType" : "",
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/executions/1/steps/1"


44.14.3. 作业步骤执行进度

作业步骤执行终结点允许你获取有关作业步骤执行进度的详细信息。 以下主题提供了更多详细信息:

  • 请求结构
  • 请求参数
  • 示例请求
  • 响应结构
请求结构
GET /jobs/executions/1/steps/1/progress HTTP/1.1
Host: localhost:9393

/jobs/executions/id/steps/stepid/progress

参数

描述

​id​

现有作业执行的 ID(必需)

​stepid​

特定作业执行的现有步骤执行的 id(必需)

请求参数

此终结点没有请求参数。

示例请求
$ curl http://localhost:9393/jobs/executions/1/steps/1/progress -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/hal+json
Content-Length: 2676


"stepExecution" :
"stepName" : "DOCJOB_STEP",
"id" : 1,
"version" : 0,
"status" : "STARTING",
"readCount" : 0,
"writeCount" : 0,
"commitCount" : 0,
"rollbackCount" : 0,
"readSkipCount" : 0,
"processSkipCount" : 0,
"writeSkipCount" : 0,
"startTime" : "2022-09-13T10:55:57.892+0000",
"endTime" : null,
"lastUpdated" : "2022-09-13T10:55:57.893+0000",
"executionContext" :
"dirty" : false,
"empty" : true,
"values" : [ ]
,
"exitStatus" :
"exitCode" : "EXECUTING",
"exitDescription" : ""
,
"terminateOnly" : false,
"filterCount" : 0,
"failureExceptions" : [ ],
"jobExecutionId" : 1,
"jobParameters" :
"parameters" :
,
"skipCount" : 0,
"summary" : "StepExecution: id=1, version=0, name=DOCJOB_STEP, status=STARTING, exitStatus=EXECUTING, readCount=0, filterCount=0, writeCount=0 readSkipCount=0, writeSkipCount=0, processSkipCount=0, commitCount=0, rollbackCount=0"
,
"stepExecutionHistory" :
"stepName" : "DOCJOB_STEP",
"count" : 0,
"commitCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"rollbackCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"readCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"writeCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"filterCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"readSkipCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"writeSkipCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"processSkipCount" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"duration" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0
,
"durationPerRead" :
"count" : 0,
"min" : 0.0,
"max" : 0.0,
"mean" : 0.0,
"standardDeviation" : 0.0

,
"percentageComplete" : 0.5,
"finished" : false,
"duration" : 670.0,
"_links" :
"self" :
"href" : "http://localhost:9393/jobs/executions/1/steps/1"


44.15. 有关应用程序的运行时信息

你可以获取有关运行系统已知的应用的信息,无论是全局还是单独。 以下主题提供了更多详细信息:

  • 在运行时列出所有应用程序
  • 查询单个应用的所有实例
  • 查询单个应用的单个实例

44.15.1. 在运行时列出所有应用程序

若要检索有关所有应用的所有实例的信息,请使用查询终结点。 以下主题提供了更多详细信息:​​/runtime/apps​​​​GET​

  • 请求结构
  • 示例请求
  • 响应结构
请求结构
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl http://localhost:9393/runtime/apps -i -X GET \\
-H Accept: application/json
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209


"_links" :
"self" :
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"

,
"page" :
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0

44.15.2. 查询单个应用程序的所有实例

若要检索有关特定应用的所有实例的信息,请使用查询终结点。 以下主题提供了更多详细信息:​​/runtime/apps/<appId>/instances​​​​GET​

  • 请求结构
  • 示例请求
  • 响应结构
请求结构
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl http://localhost:9393/runtime/apps -i -X GET \\
-H Accept: application/json
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209


"_links" :
"self" :
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"

,
"page" :
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0

44.15.3. 查询单个应用程序的单个实例

若要检索有关特定应用程序的特定实例的信息,请使用查询终结点。 以下主题提供了更多详细信息:​​/runtime/apps/<appId>/instances/<instanceId>​​​​GET​

  • 请求结构
  • 示例请求
  • 响应结构
请求结构
GET /runtime/apps HTTP/1.1
Accept: application/json
Host: localhost:9393
示例请求
$ curl http://localhost:9393/runtime/apps -i -X GET \\
-H Accept: application/json
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 209


"_links" :
"self" :
"href" : "http://localhost:9393/runtime/apps?page=0&size=20"

,
"page" :
"size" : 20,
"totalElements" : 0,
"totalPages" : 0,
"number" : 0

44.16. 流日志

您可以获取整个流或流内特定应用程序的流的应用程序日志。 以下主题提供了更多详细信息:

  • 按流名称获取应用程序的日志
  • 从流中获取特定应用程序的日志
44.16.1. 通过流名称获取应用程序的日志

将 HTTP 方法与 REST 终结点一起使用,以检索给定流名称的所有应用程序日志。 以下主题提供了更多详细信息:GET/streams/logs/<streamName>

  • 请求结构
  • 示例请求
  • 响应结构
请求结构
GET /streams/logs/ticktock HTTP/1.1
Host: localhost:9393
示例请求
$ curl http://localhost:9393/streams/logs/ticktock -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 93


"logs" :
"ticktock-time-v1" : "Logs-time",
"ticktock-log-v1" : "Logs-log"

44.16.2. 从流中获取特定应用程序的日志

若要从流中检索特定应用程序的日志,请使用 HTTP 方法查询终结点。 以下主题提供了更多详细信息:​​/streams/logs/<streamName>/<appName>​​​​GET​

  • 请求结构
  • 示例请求
  • 响应结构
请求结构
GET /streams/logs/ticktock/ticktock-log-v1 HTTP/1.1
Host: localhost:9393
示例请求
$ curl http://localhost:9393/streams/logs/ticktock/ticktock-log-v1 -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 55


"logs" :
"ticktock-log-v1" : "Logs-log"

44.17. 任务日志

您可以获取特定任务执行的任务执行日志。

以下主题提供了更多详细信息:

  • 获取任务执行日志
44.17.1. 获取任务执行日志

若要检索任务执行的日志,请使用 HTTP 方法查询终结点。 以下主题提供了更多详细信息:/tasks/logs/<ExternalTaskExecutionId>GET

  • 请求结构
  • 请求参数
  • 示例请求
  • 响应结构
请求结构
GET /tasks/logs/taskA-e71df192-b243-45e0-a5ed-d55ecd0c15e8?platformName=default HTTP/1.1
Host: localhost:9393
请求参数

参数

描述

​platformName​

The name of the platform the task is launched.

Example Request
$ curl http://localhost:9393/tasks/logs/taskA-e71df192-b243-45e0-a5ed-d55ecd0c15e8?platformName=default -i -X GET
响应结构
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 10043

"stdout:\\n2022-09-13 10:55:06.650 INFO 3441 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@4e515669: startup date [Tue Sep 13 10:55:06 UTC 2022]; root of context hierarchy\\n2022-09-13 10:55:07.075 INFO 3441 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean configurationPropertiesRebinderAutoConfiguration of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b056ca48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\\n\\n . ____ _ __ _ _\\n /\\\\\\\\ / ____ __ _ _(_)_ __ __ _ \\\\ \\\\ \\\\ \\\\\\n( ( )\\\\___ | _ | _| | _ \\\\/ _` | \\\\ \\\\ \\\\ \\\\\\n \\\\\\\\/ ___)| |_)| | | | | || (_| | ) ) ) )\\n |____| .__|_| |_|_| |_\\\\__, | / / / /\\n =========|_|==============|___/=/_/_/_/\\n :: Spring Boot :: (v1.5.2.RELEASE)\\n\\n2022-09-13 10:55:07.337 INFO 3441 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at: http://localhost:8888\\n2022-09-13 10:55:07.408 WARN 3441 --- [ main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: I/O error on GET request for \\"http://localhost:8888/timestamp-task/default\\": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)\\n2022-09-13 10:55:07.419 INFO 3441 --- [ main] o.s.c.t.a.t.TimestampTaskApplication : No active profile set, falling back to default profiles: default\\n2022-09-13 10:55:07.441 INFO 3441 --- [ main] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@445b84c0: startup date [Tue Sep 13 10:55:07 UTC 2022]; parent: org.springframework.context.annotation.AnnotationConfigApplicationContext@4e515669\\n2022-09-13 10:55:08.074 INFO 3441 --- [ main] o.s.cloud.context.scope.GenericScope : BeanFactory id=1e36064f-ccbe-3d2f-9196-128427cc78a0\\n2022-09-13 10:55:08.149 INFO 3441 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration of type [org.springframework.cloud.autoconfigure.ConfigurationPropertiesRebinderAutoConfiguration$$EnhancerBySpringCGLIB$$b056ca48] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\\n2022-09-13 10:55:08.156 INFO 3441 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$943cc74b] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)\\n2022-09-13 10:55:08.777 INFO 3441 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executing SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql]\\n2022-09-13 10:55:08.817 INFO 3441 --- [ main] o.s.jdbc.datasource.init.ScriptUtils : Executed SQL script from class path resource [org/springframework/cloud/task/schema-h2.sql] in 40 ms.\\n2022-09-13 10:55:09.312 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Registering beans for JMX exposure on startup\\n2022-09-13 10:55:09.322 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name configurationPropertiesRebinder has been autodetected for JMX exposure\\n2022-09-13 10:55:09.323 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name environmentManager has been autodetected for JMX exposure\\n2022-09-13 10:55:09.326 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Bean with name refreshScope has been autodetected for JMX exposure\\n2022-09-13 10:55:09.328 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean environmentManager: registering with JMX server as MBean [taskA-e71df192-b243-45e0-a5ed-d55ecd0c15e8:name=environmentManager,type=EnvironmentManager]\\n2022-09-13 10:55:09.343 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean refreshScope: registering with JMX server as MBean [taskA-e71df192-b243-45e0-a5ed-d55ecd0c15e8:name=refreshScope,type=RefreshScope]\\n2022-09-13 10:55:09.354 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean configurationPropertiesRebinder: registering with JMX server as MBean [taskA-e71df192-b243-45e0-a5ed-d55ecd0c15e8:name=configurationPropertiesRebinder,context=445b84c0,type=ConfigurationPropertiesRebinder]\\n2022-09-13 10:55:09.445 INFO 3441 --- [ main] o.s.c.support.DefaultLifecycleProcessor : Starting beans in phase 0\\n2022-09-13 10:55:09.467 WARN 3441 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean taskLifecycleListener; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\\n2022-09-13 10:55:09.467 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans on shutdown\\n2022-09-13 10:55:09.468 INFO 3441 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Unregistering JMX-exposed beans\\n2022-09-13 10:55:09.469 ERROR 3441 --- [ main] o.s.c.t.listener.TaskLifecycleListener : An event to end a task has been received for a task that has not yet started.\\n2022-09-13 10:55:09.477 INFO 3441 --- [ main] utoConfigurationReportLoggingInitializer : \\n\\nError starting ApplicationContext. To display the auto-configuration report re-run your application with debug enabled.\\n2022-09-13 10:55:09.486 ERROR 3441 --- [ main] o.s.boot.SpringApplication : Application startup failed\\n\\norg.springframework.context.ApplicationContextException: Failed to start bean taskLifecycleListener; nested exception is java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\\n\\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:50) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:348) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:151) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:114) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:879) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:545) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:737) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\\n\\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:370) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\\n\\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:314) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\\n\\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1162) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\\n\\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1151) [spring-boot-1.5.2.RELEASE.jar!/:1.5.2.RELEASE]\\n\\tat org.springframework.cloud.task.app.timestamp.TimestampTaskApplication.main(TimestampTaskApplication.java:29) [classes!/:1.2.0.RELEASE]\\n\\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_345]\\n\\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_345]\\n\\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_345]\\n\\tat java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_345]\\n\\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\\n\\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\\n\\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\\n\\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [timestamp-task-1.2.0.RELEASE.jar:1.2.0.RELEASE]\\nCaused by: java.lang.IllegalArgumentException: Invalid TaskExecution, ID 1 not found\\n\\tat org.springframework.util.Assert.notNull(Assert.java:134) ~[spring-core-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\tat org.springframework.cloud.task.listener.TaskLifecycleListener.doTaskStart(TaskLifecycleListener.java:200) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\\n\\tat org.springframework.cloud.task.listener.TaskLifecycleListener.start(TaskLifecycleListener.java:282) ~[spring-cloud-task-core-1.2.0.RELEASE.jar!/:1.2.0.RELEASE]\\n\\tat org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:175) ~[spring-context-4.3.7.RELEASE.jar!/:4.3.7.RELEASE]\\n\\t... 20 common frames omitted\\n\\n"

附录

遇到春季云数据流问题,我们愿意提供帮助!

  • 问一个问题。我们监控stackoverflow.com的问题 标记为弹簧云数据流。
  • 在github.com/spring-cloud/spring-cloud-dataflow/issues 时报告Spring Cloud Data Flow的错误。

附录 A:数据流模板

如 API 指南章节中所述,Spring Cloud Data Flow 的功能完全通过 REST 端点公开。 虽然您可以直接使用这些端点,但Spring Cloud Data Flow还提供了基于Java的API,这使得使用这些REST端点变得更加容易。

中心入口点是包中的类。​​DataFlowTemplate​​​​org.springframework.cloud.dataflow.rest.client​

此类实现接口并委派给以下子模板,这些子模板为每个功能集提供特定功能:​​DataFlowOperations​

接口

描述

​StreamOperations​

用于流操作的 REST 客户端

​CounterOperations​

用于计数器操作的 REST 客户端

​FieldValueCounterOperations​

用于字段值计数器操作的 REST 客户端

​AggregateCounterOperations​

用于聚合计数器操作的 REST 客户端

​TaskOperations​

用于任务操作的 REST 客户端

​JobOperations​

用于作业操作的 REST 客户端

​AppRegistryOperations​

用于应用注册表操作的 REST 客户端

​CompletionOperations​

用于完成操作的 REST 客户端

​RuntimeOperations​

用于运行时操作的 REST 客户端

初始化时,可以通过 REST 关系发现子模板,该关系由 HATEOAS(超媒体作为应用程序状态的引擎)提供。​​DataFlowTemplate​

如果无法解析资源,则生成相应的子模板 在空中。一个常见的原因是 Spring 云数据流允许特定的 启动时要启用或禁用的功能集。有关更多信息,请参阅本地、Cloud Foundry​ 或Kubernetes配置章节之一,具体取决于您部署应用程序的位置。

A.1. 使用数据流模板

使用数据流模板时,唯一需要的数据流依赖项是 Spring Cloud Data Flow Rest Client,如以下 Maven 代码片段所示:

<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dataflow-rest-client</artifactId>
<version>2.9.6</version>
</dependency>

有了这个依赖关系,你就可以获得类以及调用Spring Cloud Data Flow服务器所需的所有依赖关系。​​DataFlowTemplate​

实例化时,您还会传入 a。 请注意,需要一些额外的配置才能在上下文中有效。 将 aas 声明为 Bean 时,以下配置就足够了:​​DataFlowTemplate​​​​RestTemplate​​​​RestTemplate​​​​DataFlowTemplate​​​Swarm 的 Spring Cloud Data Flow 支持

Spring Cloud Data Flow 编辑现有流

Spring Cloud Data Flow 的自定义任务中缺少参数

Spring Cloud Data Flow 安全配置和与 RedHat SSO 的集成

Spring Cloud Data Flow Grafana Prometheus 不显示流数据

如何在 Spring Cloud Data Flow 中为 Spring Batch 作业设置调度程序?