sj_job_task.sql 2.4 KB

12345678910111213141516171819202122232425262728293031323334
  1. create table sj_job_task
  2. (
  3. id bigint unsigned auto_increment comment '主键'
  4. primary key,
  5. namespace_id varchar(64) default '764d604ec6fc45f68cd92514c40e9e1a' not null comment '命名空间id',
  6. group_name varchar(64) not null comment '组名称',
  7. job_id bigint not null comment '任务信息id',
  8. task_batch_id bigint not null comment '调度任务id',
  9. parent_id bigint default 0 not null comment '父执行器id',
  10. task_status tinyint default 0 not null comment '执行的状态 0、失败 1、成功',
  11. retry_count int default 0 not null comment '重试次数',
  12. mr_stage tinyint null comment '动态分片所处阶段 1:map 2:reduce 3:mergeReduce',
  13. leaf tinyint default 1 not null comment '叶子节点',
  14. task_name varchar(255) default '' not null comment '任务名称',
  15. client_info varchar(128) null comment '客户端地址 clientId#ip:port',
  16. wf_context text null comment '工作流全局上下文',
  17. result_message text not null comment '执行结果',
  18. args_str text null comment '执行方法参数',
  19. args_type tinyint default 1 not null comment '参数类型 ',
  20. ext_attrs varchar(256) default '' null comment '扩展字段',
  21. create_dt datetime default CURRENT_TIMESTAMP not null comment '创建时间',
  22. update_dt datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '修改时间'
  23. )
  24. comment '任务实例';
  25. create index idx_create_dt
  26. on sj_job_task (create_dt);
  27. create index idx_namespace_id_group_name
  28. on sj_job_task (namespace_id, group_name);
  29. create index idx_task_batch_id_task_status
  30. on sj_job_task (task_batch_id, task_status);