feat(web): 增加调度时间点展示

This commit is contained in:
2024-01-15 15:45:17 +08:00
parent 26e65f2a81
commit 2b829519d1
6 changed files with 242 additions and 168 deletions

View File

@@ -1,3 +1,172 @@
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=72C86B35CEC2C7C8EAD234351B7EF959
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T145720.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=72C86B35CEC2C7C8EAD234351B7EF959
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T145017.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=0C3AEB91AD103B11FD674356CB0FCC2B
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T144904.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=0C3AEB91AD103B11FD674356CB0FCC2B
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T144539.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=0C3AEB91AD103B11FD674356CB0FCC2B
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T144500.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=E854FA8E5E26010DB1870C60EF6643D1
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T144458.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=E854FA8E5E26010DB1870C60EF6643D1
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143420.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=E854FA8E5E26010DB1870C60EF6643D1
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143315.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=E854FA8E5E26010DB1870C60EF6643D1
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143306.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=E854FA8E5E26010DB1870C60EF6643D1
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143304.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=3FB05EC585838B1A8DC11D0425515571
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143301.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=3FB05EC585838B1A8DC11D0425515571
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143253.503.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=3FB05EC585838B1A8DC11D0425515571
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T143252.503.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=7602F2E53C5FE9BD0182453EBE62D056
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T142946.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=7602F2E53C5FE9BD0182453EBE62D056
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T142928.503.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Cookie: JSESSIONID=7602F2E53C5FE9BD0182453EBE62D056
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T142657.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.126.207.130:35690/hudi_services/service_scheduler/schedule/schedule_times
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.14 (Java/17.0.9)
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2024-01-15T142605.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.152:37496/zookeeper/get_data?path=/hudi/lock/running/sync/sync_lock_1542097983881048064 GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.152:37496/zookeeper/get_data?path=/hudi/lock/running/sync/sync_lock_1542097983881048064
Connection: Keep-Alive Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5) User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
@@ -421,169 +590,3 @@ Accept-Encoding: br,deflate,gzip,x-gzip
### ###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/vertex?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814&vertex_id=320c6e7438afebea43fa0f0160319717
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=EF34D16868A55ED34A46AB1C4C0CD38E
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T165748.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/vertex?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814&vertex_id=320c6e7438afebea43fa0f0160319717
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=EF34D16868A55ED34A46AB1C4C0CD38E
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164913.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/vertex_overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=EF34D16868A55ED34A46AB1C4C0CD38E
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164853.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/job_manager_config?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=F905A137B7F158F712B24DFE6195E5B8
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164839.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:35558/flink/job_manager_config?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=F905A137B7F158F712B24DFE6195E5B8
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164321.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:35558/flink/config?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=F905A137B7F158F712B24DFE6195E5B8
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164305.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:35558/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=F80E5304CB8E8FD184054163B0A8686A
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164240.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:28710/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=E49FFE2512F1E8C330BB6E15F256A98F
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T164006.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:22645/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=A1A87BA887D7B34DD2A98D4B657D759C
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T163351.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:15970/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=A1A87BA887D7B34DD2A98D4B657D759C
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T163025.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:15970/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=A1A87BA887D7B34DD2A98D4B657D759C
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T162944.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:15970/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=70D25DE4476FDFBECDFC247502A73949
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T162909.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:34629/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=70D25DE4476FDFBECDFC247502A73949
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T162734.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:34629/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=EBD3D508251ABFE93A3ED1A8FB3F3BE8
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T162636.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:22828/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=2DEE154C5F7A822607E206573251489E
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-05T162007.500.json
###
GET http://132.122.116.142:22828/flink/overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Accept-Encoding: br,deflate,gzip,x-gzip
###
GET http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814/v1/jobs/320c6e7438afebea43fa0f0160319717/config
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-04T235133.200.json
###

View File

@@ -15,6 +15,9 @@ public interface ScheduleService {
@Get("/schedule_jobs") @Get("/schedule_jobs")
ImmutableList<ScheduleStrategy> scheduleJobs(); ImmutableList<ScheduleStrategy> scheduleJobs();
@Get("/schedule_times")
ImmutableList<Long> scheduleJobTimes();
@Get("/all") @Get("/all")
void scheduleAllTable(); void scheduleAllTable();

View File

@@ -15,6 +15,8 @@ import com.lanyuanxiaoyao.service.web.controller.base.AmisMapResponse;
import com.lanyuanxiaoyao.service.web.controller.base.AmisResponse; import com.lanyuanxiaoyao.service.web.controller.base.AmisResponse;
import com.lanyuanxiaoyao.service.web.controller.base.BaseController; import com.lanyuanxiaoyao.service.web.controller.base.BaseController;
import com.lanyuanxiaoyao.service.web.entity.JobIdAndAliasVO; import com.lanyuanxiaoyao.service.web.entity.JobIdAndAliasVO;
import com.lanyuanxiaoyao.service.web.entity.ScheduleTimeVO;
import java.time.Instant;
import java.time.LocalDateTime; import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter; import java.time.format.DateTimeFormatter;
import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletableFuture;
@@ -149,6 +151,21 @@ public class OverviewController extends BaseController {
return AmisResponse.responseCrudData(scheduleService.scheduleJobs()); return AmisResponse.responseCrudData(scheduleService.scheduleJobs());
} }
@GetMapping("schedule_times")
public AmisCrudResponse scheduleTimes() {
long now = Instant.now().toEpochMilli();
return AmisCrudResponse.responseCrudData(
scheduleService.scheduleJobTimes()
.collect(time -> {
if (time < now) {
return new ScheduleTimeVO("inactive", time);
} else {
return new ScheduleTimeVO("active", time);
}
})
);
}
@GetMapping("sync_running_status") @GetMapping("sync_running_status")
public AmisMapResponse syncRunningStatus() { public AmisMapResponse syncRunningStatus() {
ImmutableList<String> locks = zookeeperService.getChildren(NameHelper.ZK_SYNC_RUNNING_LOCK_PATH).collect(ZookeeperNode::getPath); ImmutableList<String> locks = zookeeperService.getChildren(NameHelper.ZK_SYNC_RUNNING_LOCK_PATH).collect(ZookeeperNode::getPath);

View File

@@ -0,0 +1,31 @@
package com.lanyuanxiaoyao.service.web.entity;
/**
* @author lanyuanxiaoyao
* @date 2024-01-15
*/
public class ScheduleTimeVO {
private final String color;
private final Long time;
public ScheduleTimeVO(String color, Long time) {
this.color = color;
this.time = time;
}
public String getColor() {
return color;
}
public Long getTime() {
return time;
}
@Override
public String toString() {
return "ScheduleTimeVO{" +
"color='" + color + '\'' +
", time='" + time + '\'' +
'}';
}
}

View File

@@ -409,6 +409,26 @@ function overviewTab() {
} }
} }
] ]
},
{type: 'divider'},
{
type: 'service',
api: '${base}/overview/schedule_times',
interval: 60000,
silentPolling: true,
body: [
'调度时间点',
{
type: 'each',
name: 'items',
className: 'grid',
items: {
type: 'tag',
color: '${color}',
label: '${DATETOSTR(TIMESTAMP(time, \'x\'), \'HH:mm:ss\')}'
}
}
]
} }
] ]
} }

View File

@@ -77,5 +77,5 @@ GET {{services-url}}/cloud/services?service_name=center-gateway-new
### Sync status ### Sync status
GET {{web-url}}/overview/sync_running_status GET {{web-url}}/overview/sync_running_status
### ### Get schedule_times
GET http://132.126.207.131:35690/hudi_services/service_web/pulsar/topic?pulsar_url=pulsar%3A%2F%2F132.122.113.167%3A16680%2C132.122.113.168%3A16680%2C132.122.113.171%3A16680%2C132.122.113.172%3A16680%2C132.122.115.163%3A16680%2C132.122.115.164%3A16680%2C132.122.115.165%3A16680%2C132.122.115.166%3A16680&topic=persistent%3A%2F%2Fodcp%2Fcrm_cfguse%2Fpriv_grant_his GET {{scheduler-url}}/schedule/schedule_times