feature(zookeeper-query): 增加 zookeeper 查询模块

包含查询路径存在、锁存在、获取节点数据的能力
This commit is contained in:
2023-05-14 00:08:11 +08:00
parent ee90857b06
commit 93456ddd78
9 changed files with 803 additions and 0 deletions

589
.idea/httpRequests/http-requests-log.http generated Normal file
View File

@@ -0,0 +1,589 @@
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.152:37496/zookeeper/get_data?path=/hudi/lock/running/sync/sync_lock_1542097983881048064
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=9B2804B24676C18ABB793E669D789275
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-14T000645.200.txt
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.152:37496/zookeeper/exists_path?path=/hudi/lock/running/sync/sync_lock_1542097983881048064
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=9B2804B24676C18ABB793E669D789275
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-14T000637.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.152:37496/zookeeper/exists_path?path=/hudi
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=62C1CD6C50E4C9B2B521DA398F17A0AD
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-14T000603.200.json
###
GET http://132.122.116.152:37496/zookeeper/exists_path?path=/hudi
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=62C1CD6C50E4C9B2B521DA398F17A0AD
Accept-Encoding: br,deflate,gzip,x-gzip
###
GET http://132.122.116.152:37496/zookeeper/exists_path?path=/hudi
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=C4D089C52E5E37EE6486880573CE3C07
Accept-Encoding: br,deflate,gzip,x-gzip
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174807.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174751.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174749.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174739.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174734.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/poll/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174722.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/take/compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=98CC709B9ED7F9CC70C5138E6350AB73
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T174331.404.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14041/queue/add/compaction-queue
Content-Type: application/json
Content-Length: 223
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=1A204579800593D4EFCFCED156E43CB7
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123456",
"priority": 1,
"data": {
"id": "37171d34-25cf-409d-b408-4b329dc009e9",
"flinkJobId": 1683450773883,
"alias": "acct_item",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T174248.200.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:23167/queue/add/compaction-queue
Content-Type: application/json
Content-Length: 225
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=1A204579800593D4EFCFCED156E43CB7
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123456",
"priority": 150,
"data": {
"id": "37171d34-25cf-409d-b408-4b329dc009e9",
"flinkJobId": 1683450773883,
"alias": "acct_item",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T171445.200.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:23167/queue/add/compaction-queue
Content-Type: application/json
Content-Length: 224
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=1A204579800593D4EFCFCED156E43CB7
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123456",
"priority": 15,
"data": {
"id": "37171d34-25cf-409d-b408-4b329dc009e9",
"flinkJobId": 1683450773883,
"alias": "acct_item",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T171436.200.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:23167/queue/add/compaction-queue
Content-Type: application/json
Content-Length: 225
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=1A204579800593D4EFCFCED156E43CB7
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123456",
"priority": 100,
"data": {
"id": "37171d34-25cf-409d-b408-4b329dc009e9",
"flinkJobId": 1683450773883,
"alias": "acct_item",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T171404.200.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:23167/queue/add/compaction-queue
Content-Type: application/json
Content-Length: 206
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=1A204579800593D4EFCFCED156E43CB7
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123456",
"data": {
"id": "37171d34-25cf-409d-b408-4b329dc009e9",
"flinkJobId": 1683450773883,
"alias": "acct_item",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T171323.200.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:23167/queue/add/compaction-queue
Content-Type: application/json
Content-Length: 158
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=1A204579800593D4EFCFCED156E43CB7
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123",
"data": {
"id": "123",
"flinkJobId": 123456,
"alias": "test",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T171200.200.json
###
POST http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:23167/queue/push/compaction-queue
Content-Type: application/json
Content-Length: 158
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=EF34D16868A55ED34A46AB1C4C0CD38E
Accept-Encoding: br,deflate,gzip,x-gzip
{
"id": "123",
"data": {
"id": "123",
"flinkJobId": 123456,
"alias": "test",
"batch": "123",
"status": "",
"comment": "text"
}
}
<> 2023-05-07T171115.404.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@b5s119.hdp.dc:38000/queue/names
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=11609263D43A89047BEC8B5EA721A2B7
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T165612.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@b5s119.hdp.dc:38000/queue/names
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=11609263D43A89047BEC8B5EA721A2B7
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T165521.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@b5s119.hdp.dc:38000/queue/all?name=compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=936E036BAFFA0EEDD94D0007972E841A
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T165512.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@b5s119.hdp.dc:38000/queue/all?name=compaction-queue
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=936E036BAFFA0EEDD94D0007972E841A
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T165150.500.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@b5s119.hdp.dc:38000/queue/names
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Cookie: JSESSIONID=7D592F9B097946A2B42570B66A67399C
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-07T165118.200.json
###
GET http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814/v1/jobs/320c6e7438afebea43fa0f0160319717
Connection: Keep-Alive
User-Agent: Apache-HttpClient/4.5.13 (Java/17.0.5)
Accept-Encoding: br,deflate,gzip,x-gzip
<> 2023-05-06T104152.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/task_manager?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814&vertex_id=320c6e7438afebea43fa0f0160319717&checkpoint_id=2793&task_manager_id=container_1672368973318_1814_01_000002
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-05T165913.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/task_manager_overview?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814&vertex_id=320c6e7438afebea43fa0f0160319717&checkpoint_id=2793
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-05T165848.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/checkpoint_config?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814&vertex_id=320c6e7438afebea43fa0f0160319717&checkpoint_id=2793
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-05T165841.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/checkpoint?url=http://b5s120.hdp.dc:8088/proxy/application_1672368973318_1814&vertex_id=320c6e7438afebea43fa0f0160319717&checkpoint_id=2793
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-05T165831.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/checkpoint_overview?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-05T165806.200.json
###
GET http://AxhEbscwsJDbYMH2:cYxg3b4PtWoVD5SjFayWxtnSVsjzRsg4@132.122.116.142:14986/flink/vertex_config?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-05T165758.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-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
###

5
bin/build-zookeeper-query.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/bin/bash
mvn -pl service-configuration clean deploy -D skipTests -P local -s ~/.m2/settings-development.xml
mvn -pl service-zookeeper-query clean package spring-boot:repackage -D skipTests -s ~/.m2/settings-development.xml
sshpass -p $(/Users/lanyuanxiaoyao/Project/Work/Host/keepassxc-password.sh SSH/iap/132.122.1.162) scp /Users/lanyuanxiaoyao/Project/IdeaProjects/hudi-service/service-zookeeper-query/target/service-zookeeper-query-1.0.0-SNAPSHOT.jar iap@132.122.1.162:/apps/iap/tmp/lanyuanxiaoyao
sshpass -p $(/Users/lanyuanxiaoyao/Project/Work/Host/keepassxc-password.sh SSH/iap/132.122.1.162) ssh -o 'StrictHostKeyChecking no' iap@132.122.1.162 'curl ftp://yyy:QeY\!68\)4nH1@132.121.122.15:2222 -T /apps/iap/tmp/lanyuanxiaoyao/service-zookeeper-query-1.0.0-SNAPSHOT.jar'

View File

@@ -17,6 +17,7 @@
<module>service-flink-query</module>
<module>service-web</module>
<module>service-forest</module>
<module>service-zookeeper-query</module>
</modules>
<properties>

View File

@@ -0,0 +1,23 @@
package com.lanyuanxiaoyao.service.forest.service;
import com.dtflys.forest.annotation.BaseRequest;
import com.dtflys.forest.annotation.Get;
import com.dtflys.forest.annotation.Query;
/**
* Zookeeper 查询
*
* @author lanyuanxiaoyao
* @date 2023-05-13
*/
@BaseRequest(baseURL = "http://service-zookeeper-query")
public interface ZookeeperService {
@Get("/exists_path")
Boolean existsPath(@Query("path") String path);
@Get("/exists_lock")
Boolean existsLock(@Query("path") String path);
@Get("/get_data")
String getData(@Query("path") String path);
}

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>com.lanyuanxiaoyao</groupId>
<artifactId>hudi-service</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<artifactId>service-zookeeper-query</artifactId>
<dependencies>
<dependency>
<groupId>com.lanyuanxiaoyao</groupId>
<artifactId>service-configuration</artifactId>
<version>1.0.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-zookeeper-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.curator</groupId>
<artifactId>curator-recipes</artifactId>
<version>5.1.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>

View File

@@ -0,0 +1,58 @@
package com.lanyuanxiaoyao.service.zookeeper;
import cn.hutool.core.util.ObjectUtil;
import java.util.concurrent.TimeUnit;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.recipes.locks.InterProcessLock;
import org.apache.curator.framework.recipes.locks.InterProcessMutex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
/**
* Zookeeper 查询
*
* @author lanyuanxiaoyao
* @date 2023-05-13
*/
@RestController
@RequestMapping("zookeeper")
public class ZookeeperController {
private static final Logger logger = LoggerFactory.getLogger(ZookeeperController.class);
private final CuratorFramework client;
public ZookeeperController(CuratorFramework client) {
this.client = client;
}
@GetMapping("exists_path")
public Boolean existsPath(@RequestParam("path") String path) throws Exception {
return ObjectUtil.isNotNull(client.checkExists().forPath(path));
}
@GetMapping("get_data")
public String getData(@RequestParam("path") String path) throws Exception {
return new String(client.getData().forPath(path));
}
@GetMapping("exists_lock")
public Boolean existsLock(@RequestParam("path") String path) throws Exception {
InterProcessLock lock = new InterProcessMutex(client, path);
try {
return !lock.acquire(1, TimeUnit.SECONDS);
} finally {
if (ObjectUtil.isNotNull(lock) && lock.isAcquiredInThisProcess()) {
try {
lock.release();
} catch (Exception e) {
logger.error("Release lock failure", e);
}
}
}
}
}

View File

@@ -0,0 +1,29 @@
package com.lanyuanxiaoyao.service.zookeeper;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.gson.GsonAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.retry.annotation.EnableRetry;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* zk 查询
*
* @author lanyuanxiaoyao
* @date 2023-05-13
*/
@EnableDiscoveryClient
@SpringBootApplication(
scanBasePackages = {"com.lanyuanxiaoyao.service"},
exclude = {GsonAutoConfiguration.class}
)
@EnableConfigurationProperties
@EnableRetry
public class ZookeeperQueryApplication {
public static void main(String[] args) {
SpringApplication.run(ZookeeperQueryApplication.class, args);
}
}

View File

@@ -0,0 +1,8 @@
spring:
application:
name: service-zookeeper-query
profiles:
include: random-port,common,eureka,metrics
cloud:
zookeeper:
connect-string: b5m1.hdp.dc:2181,b5m2.hdp.dc:2181,b5m3.hdp.dc:2181

View File

@@ -0,0 +1,50 @@
<configuration>
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<springProperty scope="context" name="LOKI_PUSH_URL" source="loki.url"/>
<springProperty scope="context" name="LOGGING_PARENT" source="logging.parent"/>
<springProperty scope="context" name="APP_NAME" source="spring.application.name"/>
<appender name="Loki" class="com.github.loki4j.logback.Loki4jAppender">
<metricsEnabled>true</metricsEnabled>
<http class="com.github.loki4j.logback.ApacheHttpSender">
<url>${LOKI_PUSH_URL:-http://localhost/loki/api/v1/push}</url>
</http>
<format>
<label>
<pattern>app=${APP_NAME:- },host=${HOSTNAME},level=%level</pattern>
</label>
<message>
<pattern>${FILE_LOG_PATTERN:-%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} [${HOSTNAME}] ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } -&#45;&#45; [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}</pattern>
</message>
<sortByTime>true</sortByTime>
</format>
</appender>
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
<encoder>
<pattern>${CONSOLE_LOG_PATTERN:-%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}</pattern>
</encoder>
</appender>
<appender name="RollingFile" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${LOGGING_PARENT:-.}/${APP_NAME:-run}.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${LOGGING_PARENT:-.}/archive/${APP_NAME:-run}-%d{yyyy-MM-dd}.gz</fileNamePattern>
<MaxHistory>7</MaxHistory>
</rollingPolicy>
<encoder>
<pattern>${FILE_LOG_PATTERN:-%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} [${HOSTNAME}] ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } -&#45;&#45; [%t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}</pattern>
</encoder>
</appender>
<logger name="com.zaxxer.hikari" level="ERROR"/>
<root level="INFO">
<appender-ref ref="Loki"/>
<appender-ref ref="Console"/>
<appender-ref ref="RollingFile"/>
</root>
</configuration>