GetJobExecutionThreadDump - 查询任务执行堆栈

查询任务执行堆栈。

接口说明

引入增强插件

pom.xml文件中添加增强插件以提升 Executor 的能力。

注意:请确保该插件在 pom 中放置在xxl-job-core 依赖的上方

详细信息请参考插件版本说明文档

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
ClusterIdstring

集群 ID。

xxljob-b6ec1xxxx
AppNamestring

应用名称。

xxl-job-executor-sample
JobExecutionIdstring

任务执行 ID。

1310630367761285120
ExecutorAddrstring

执行器地址。

http://192.168.0.215:9966/

返回参数

名称类型描述示例值
object

Schema of Response

RequestIdstring

本次调用请求的 ID,是由阿里云为该请求生成的唯一标识符,可用于排查和定位问题。

3835AA29-2298-5434-BC53-9CC377CDFD2C
Codeinteger

响应码。

200
Messagestring

详细信息。

Parameter error: appId is null.
Successboolean

请求是否成功。

true
Dataobject
Dumpstring

堆栈信息

\"Thread-7\" Id=67 TIMED_WAITING\n\tat java.base@17.0.5/java.lang.Thread.sleep(Native Method)\n\tat app//com.xxl.job.executor.service.jobhandler.SampleXxlJob.shardingJobHandler(SampleXxlJob.java:73)\n\tat java.base@17.0.5/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base@17.0.5/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base@17.0.5/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base@17.0.5/java.lang.reflect.Method.invoke(Method.java:568)\n\tat app//com.xxl.job.core.handler.impl.MethodJobHandler.execute(MethodJobHandler.java:29)\n\tat app//com.xxl.job.core.thread.JobThread.run(JobThread.java:152)\n

示例

正常返回示例

JSON格式

{
  "RequestId": "3835AA29-2298-5434-BC53-9CC377CDFD2C",
  "Code": 200,
  "Message": "Parameter error: appId is null.",
  "Success": true,
  "Data": {
    "Dump": "\\\"Thread-7\\\" Id=67 TIMED_WAITING\\n\\tat java.base@17.0.5/java.lang.Thread.sleep(Native Method)\\n\\tat app//com.xxl.job.executor.service.jobhandler.SampleXxlJob.shardingJobHandler(SampleXxlJob.java:73)\\n\\tat java.base@17.0.5/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\\n\\tat java.base@17.0.5/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\\n\\tat java.base@17.0.5/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\\n\\tat java.base@17.0.5/java.lang.reflect.Method.invoke(Method.java:568)\\n\\tat app//com.xxl.job.core.handler.impl.MethodJobHandler.execute(MethodJobHandler.java:29)\\n\\tat app//com.xxl.job.core.thread.JobThread.run(JobThread.java:152)\\n"
  }
}

错误码

HTTP status code错误码错误信息描述
400InvalidParameterParameter error: %s.参数错误: %s
401IllegalRequestIllegalRequest: %s.非法请求:%s
403NoPermissionNo permission to perform this operation: %s.没有权限去执行该操作:%s
404NotFoundNot found: %s.资源不存在:%s
500InternalErrorInternalError: %s.系统内部错误:%s

访问错误中心查看更多错误码。