接口 JobLogService
-
- 所有已知实现类:
JobLogServiceImpl
public interface JobLogService
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 booleanappendLog(String id, String logContext)添加日志voidappendSource(String id, String source, String msg)添加调度源voidclearLog(Date time)清除日志 小于这个时间的voidclearTimeOutJob()清理掉调度超时的任务voidendJob(String id, int success, String msg, String result, String environment)结束任务JobLogfindById(String id)根据id 查找StringfindConsoleById(String id)JobLogfindDownJob(Integer id, List<String> logs)获取到因为掉线没执行的jobList<JobLog>findDownJobs(Integer id, List<String> logs)拿到当前job在运行中的IntegergetExecutedCountByStatusAndTime(List<Integer> statusList, long start, long end)List<Map<String,Object>>getExecutedCountGroupByDispatchTime(List<Integer> statusList, long start, long end)IntegergetLogCount(String environment)获取执行任务的数量List<Map<String,Object>>getLogGroupInfo(List<Integer> statuslist, Long startTime, Long endTime)org.springframework.cloud.client.ServiceInstancegetRunableMinInstance(List<org.springframework.cloud.client.ServiceInstance> instanceIds)拿到运行任务最少的List<Map<String,Object>>getSchedulingInfo(List<Integer> statuslist, Long startTime, Long endTime, String environment)booleanisBlock(Integer jobId, int timeOut, String logId)是否阻塞booleankillAwaitJob(Integer jobId)删除掉正在等待的任务JobLogpollJob(Integer jobId, int timeOut)获取最早在排队的任务进行调度booleansaveLog(JobLog jobLog)保存日志net.risedata.jdbc.commons.LPage<Map<String,Object>>search(JobLog job, LPageable page, ConcurrentSecurity securityJurisdiction, String jobType, Integer[] jobIds)查询日志net.risedata.jdbc.commons.LPage<Map<String,Object>>searchByGroup(Date startDate, Date endDate, String environment, LPageable page, String jobName)List<Map<String,Object>>searchByGroupLog(Date startDate, Date endDate, String environment, String jobName)booleanupdateStatus(String logId, Integer status)修改状态booleanupdateStatus(String logId, Integer status, Integer ovlStatus)修改状态
-
-
-
方法详细资料
-
isBlock
boolean isBlock(Integer jobId, int timeOut, String logId)
是否阻塞- 参数:
jobId- 任务idtimeOut- 超时时间logId- 当前日志id- 返回:
-
saveLog
boolean saveLog(JobLog jobLog)
保存日志- 参数:
jobLog-- 返回:
-
appendLog
boolean appendLog(String id, String logContext)
添加日志- 参数:
id- 日志idlogContext- 添加的内容- 返回:
-
updateStatus
boolean updateStatus(String logId, Integer status, Integer ovlStatus)
修改状态- 参数:
logId- 日志idstatus- 状态ovlStatus- 之前的状态- 返回:
-
updateStatus
boolean updateStatus(String logId, Integer status)
修改状态- 参数:
logId- 日志idstatus- 状态- 返回:
-
endJob
void endJob(String id, int success, String msg, String result, String environment)
结束任务- 参数:
id- idsuccess- 状态msg- 消息result- 返回值
-
search
net.risedata.jdbc.commons.LPage<Map<String,Object>> search(JobLog job, LPageable page, ConcurrentSecurity securityJurisdiction, String jobType, Integer[] jobIds)
查询日志- 参数:
job-page-securityJurisdiction-service-jobIds-- 返回:
-
clearLog
void clearLog(Date time)
清除日志 小于这个时间的- 参数:
time-
-
clearTimeOutJob
void clearTimeOutJob()
清理掉调度超时的任务
-
findDownJobs
List<JobLog> findDownJobs(Integer id, List<String> logs)
拿到当前job在运行中的- 参数:
id-logs-- 返回:
-
getRunableMinInstance
org.springframework.cloud.client.ServiceInstance getRunableMinInstance(List<org.springframework.cloud.client.ServiceInstance> instanceIds)
拿到运行任务最少的- 参数:
instanceIds-- 返回:
-
killAwaitJob
boolean killAwaitJob(Integer jobId)
删除掉正在等待的任务- 参数:
jobId-- 返回:
-
searchByGroup
net.risedata.jdbc.commons.LPage<Map<String,Object>> searchByGroup(Date startDate, Date endDate, String environment, LPageable page, String jobName)
-
searchByGroupLog
List<Map<String,Object>> searchByGroupLog(Date startDate, Date endDate, String environment, String jobName)
-
getExecutedCountByStatusAndTime
Integer getExecutedCountByStatusAndTime(List<Integer> statusList, long start, long end)
-
getExecutedCountGroupByDispatchTime
List<Map<String,Object>> getExecutedCountGroupByDispatchTime(List<Integer> statusList, long start, long end)
-
getSchedulingInfo
List<Map<String,Object>> getSchedulingInfo(List<Integer> statuslist, Long startTime, Long endTime, String environment)
-
-