-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Manager console provides clearing the cache for P2P with task id #2818
Comments
gaius-qi
changed the title
Manager Console provides clearing the cache for P2P with task id
Manager console provides clearing the cache for P2P with task id
Oct 20, 2023
The scheduler should notify the peer to clear the cache and prevent the peer from hitting the local cache. |
Reference request and response example:create a joburl: /jobs
{
"args": {
"task_id": "string",
"page": "int",
"per_page": "int",
},
"bio": "",
"result": {
},
"scheduler_cluster_ids": [
0
],
"seed_peer_cluster_ids": [
0
],
"type": "list_tasks",
"user_id": 0
}
{
"args": {
"task_id": "string",
"page": "int",
"per_page": "int",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
},
"scheduler_clusters": [
{
"bio": "string",
"client_config": {
},
"config": {
},
"created_at": "string",
"id": 0,
"is_default": true,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"peers": [
{
"build_platform": "string",
"created_at": "string",
"download_port": 0,
"git_commit": "string",
"git_version": "string",
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"kernel_version": "string",
"location": "string",
"object_storage_port": 0,
"os": "string",
"platform": "string",
"platform_family": "string",
"platform_version": "string",
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"schedulers": [
{
"created_at": "string",
"features": [
"string"
],
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"models": [
{
"bio": "string",
"created_at": "string",
"evaluation": {
},
"id": 0,
"is_del": 0,
"name": "string",
"scheduler": "string",
"scheduler_id": 0,
"state": "string",
"type": "string",
"updated_at": "string",
"version": "string"
}
],
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"updated_at": "string"
}
],
"scopes": {
},
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"state": "string",
"task_id": "string",
"type": "string",
"updated_at": "string",
"user": {
"avatar": "string",
"bio": "string",
"configs": [
{
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"name": "string",
"updated_at": "string",
"user": "string",
"user_id": 0,
"value": "string"
}
],
"created_at": "string",
"email": "string",
"id": 0,
"is_del": 0,
"location": "string",
"name": "string",
"phone": "string",
"state": "string",
"updated_at": "string"
},
"user_id": 0
}
{
"args": {
"task_id": "string",
},
"bio": "string",
"result": {
},
"scheduler_cluster_ids": [
0
],
"seed_peer_cluster_ids": [
0
],
"type": "delete_task",
"user_id": 0
}
{
"args": {
"task_id": "string",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
},
"scheduler_clusters": [
{
"bio": "string",
"client_config": {
},
"config": {
},
"created_at": "string",
"id": 0,
"is_default": true,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"peers": [
{
"build_platform": "string",
"created_at": "string",
"download_port": 0,
"git_commit": "string",
"git_version": "string",
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"kernel_version": "string",
"location": "string",
"object_storage_port": 0,
"os": "string",
"platform": "string",
"platform_family": "string",
"platform_version": "string",
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"schedulers": [
{
"created_at": "string",
"features": [
"string"
],
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"models": [
{
"bio": "string",
"created_at": "string",
"evaluation": {
},
"id": 0,
"is_del": 0,
"name": "string",
"scheduler": "string",
"scheduler_id": 0,
"state": "string",
"type": "string",
"updated_at": "string",
"version": "string"
}
],
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"updated_at": "string"
}
],
"scopes": {
},
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"state": "string",
"task_id": "string",
"type": "string",
"updated_at": "string",
"user": {
"avatar": "string",
"bio": "string",
"configs": [
{
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"name": "string",
"updated_at": "string",
"user": "string",
"user_id": 0,
"value": "string"
}
],
"created_at": "string",
"email": "string",
"id": 0,
"is_del": 0,
"location": "string",
"name": "string",
"phone": "string",
"state": "string",
"updated_at": "string"
},
"user_id": 0
} query job resulturl: /jobs/{id}
{
"args": {
"task_id": "string",
"page": "int",
"per_page": "int",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
"peers": [
{
"host_name": "server1.example.com",
"type": "primary",
"idc": "IDC1",
"location": "New York, NY",
"ip": "192.168.1.1",
"port": 8080,
"download_port": 9090,
"object_storage_port": 10000,
"state": "active",
"os": "Linux",
"platform": "x86_64",
"platform_family": "debian",
"platform_version": "10",
"kernel_version": "4.19.0-12-amd64",
"git_version": "v1.2.3",
"git_commit": "a1b2c3d4",
"build_platform": "linux/amd64",
"scheduler_cluster_id": 1,
"scheduler_cluster": {
"id": 1,
"name": "Cluster A",
"state": "active",
"region": "us-east-1"
}
},
{
"host_name": "server2.example.com",
"type": "secondary",
"idc": "IDC2",
"location": "San Francisco, CA",
"ip": "192.168.1.2",
"port": 8081,
"download_port": 9091,
"object_storage_port": 10001,
"state": "inactive",
"os": "Linux",
"platform": "x86_64",
"platform_family": "ubuntu",
"platform_version": "18.04",
"kernel_version": "5.4.0-42-generic",
"git_version": "v1.2.4",
"git_commit": "e5f6g7h8",
"build_platform": "linux/amd64",
"scheduler_cluster_id": 2,
"scheduler_cluster": {
"id": 2,
"name": "Cluster B",
"state": "inactive",
"region": "us-west-2"
}
}
]
},
"scheduler_clusters": [
{
"bio": "string",
"client_config": {
},
"config": {
},
"created_at": "string",
"id": 0,
"is_default": true,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"peers": [
{
"build_platform": "string",
"created_at": "string",
"download_port": 0,
"git_commit": "string",
"git_version": "string",
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"kernel_version": "string",
"location": "string",
"object_storage_port": 0,
"os": "string",
"platform": "string",
"platform_family": "string",
"platform_version": "string",
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"schedulers": [
{
"created_at": "string",
"features": [
"string"
],
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"models": [
{
"bio": "string",
"created_at": "string",
"evaluation": {
},
"id": 0,
"is_del": 0,
"name": "string",
"scheduler": "string",
"scheduler_id": 0,
"state": "string",
"type": "string",
"updated_at": "string",
"version": "string"
}
],
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"updated_at": "string"
}
],
"scopes": {
},
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"state": "string",
"task_id": "string",
"type": "string",
"updated_at": "string",
"user": {
"avatar": "string",
"bio": "string",
"configs": [
{
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"name": "string",
"updated_at": "string",
"user": "string",
"user_id": 0,
"value": "string"
}
],
"created_at": "string",
"email": "string",
"id": 0,
"is_del": 0,
"location": "string",
"name": "string",
"phone": "string",
"state": "string",
"updated_at": "string"
},
"user_id": 0
}
{
"args": {
"task_id": "string",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
"success_tasks": [
{
"task": {
"id": "task1",
"piece_length": 1024,
"content_length": 20480,
"uploading_count": 5,
"uploaded_count": 5,
"updated_at": 1599557760,
"created_at": 1599554160,
"prefetched_at": 1599554460,
"failed_at": 0,
"finished_at": 1599557760
},
"peer": {
"id": "peer1",
"address": "192.168.1.100",
"port": 8080
},
"desc": "Task completed successfully."
},
{
"task": {
"id": "task2",
"piece_length": 2048,
"content_length": 40960,
"uploading_count": 3,
"uploaded_count": 3,
"updated_at": 1599657760,
"created_at": 1599654160,
"prefetched_at": 1599654460,
"failed_at": 0,
"finished_at": 1599657760
},
"peer": {
"id": "peer2",
"address": "192.168.1.101",
"port": 8081
},
"desc": "Task completed without issues."
}
],
"failure_tasks": [
{
"task": {
"id": "task3",
"piece_length": 512,
"content_length": 10240,
"uploading_count": 2,
"uploaded_count": 1,
"updated_at": 1599757760,
"created_at": 1599754160,
"prefetched_at": 0,
"failed_at": 1599755000,
"finished_at": 0
},
"peer": {
"id": "peer3",
"address": "192.168.1.102",
"port": 8082
},
"desc": "Task failed due to network issues."
}
]
},
"scheduler_clusters": [
{
"bio": "string",
"client_config": {
},
"config": {
},
"created_at": "string",
"id": 0,
"is_default": true,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"peers": [
{
"build_platform": "string",
"created_at": "string",
"download_port": 0,
"git_commit": "string",
"git_version": "string",
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"kernel_version": "string",
"location": "string",
"object_storage_port": 0,
"os": "string",
"platform": "string",
"platform_family": "string",
"platform_version": "string",
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"schedulers": [
{
"created_at": "string",
"features": [
"string"
],
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"models": [
{
"bio": "string",
"created_at": "string",
"evaluation": {
},
"id": 0,
"is_del": 0,
"name": "string",
"scheduler": "string",
"scheduler_id": 0,
"state": "string",
"type": "string",
"updated_at": "string",
"version": "string"
}
],
"port": 0,
"scheduler_cluster": "string",
"scheduler_cluster_id": 0,
"state": "string",
"updated_at": "string"
}
],
"scopes": {
},
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"seed_peer_clusters": [
{
"bio": "string",
"config": {
},
"created_at": "string",
"id": 0,
"is_del": 0,
"jobs": [
"string"
],
"name": "string",
"scheduler_clusters": [
"string"
],
"seed_peer": [
{
"created_at": "string",
"download_port": 0,
"host_name": "string",
"id": 0,
"idc": "string",
"ip": "string",
"is_del": 0,
"location": "string",
"object_storage_port": 0,
"port": 0,
"seed_peer_cluster": "string",
"seed_peer_cluster_id": 0,
"state": "string",
"type": "string",
"updated_at": "string"
}
],
"updated_at": "string"
}
],
"state": "string",
"task_id": "string",
"type": "string",
"updated_at": "string",
"user": {
"avatar": "string",
"bio": "string",
"configs": [
{
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"name": "string",
"updated_at": "string",
"user": "string",
"user_id": 0,
"value": "string"
}
],
"created_at": "string",
"email": "string",
"id": 0,
"is_del": 0,
"location": "string",
"name": "string",
"phone": "string",
"state": "string",
"updated_at": "string"
},
"user_id": 0
} |
8 tasks
8 tasks
8 tasks
GetTask and DeleteTask request and response example:create a get task joburl: /jobs 1. get task request{
"args": {
"task_id": "string",
},
"type": "get_task",
} 2. get task response{
"args": {
"task_id": "string",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
},
"scheduler_clusters": [
],
"seed_peer_clusters": [
],
"state": "string",
"task_id": "string",
"type": "string",
"updated_at": "string",
"user": {
},
"user_id": 0
} create a delete task job1. delete task request{
"args": {
"task_id": "string",
},
"type": "delete_task",
} 2. delete task response{
"args": {
"task_id": "string",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
},
"scheduler_clusters": [
],
"seed_peer_clusters": [
],
"state": "string",
"task_id": "string",
"type": "string",
"updated_at": "string",
"user": {
},
"user_id": 0
} query job resulturl: /jobs/{id} 1. query get task response
{
"args": {
"task_id": "string",
},
"bio": "string",
"created_at": "string",
"id": 0,
"is_del": 0,
"result": {
"peers": [
{
"host_name": "server1.example.com",
"type": "primary",
"idc": "IDC1",
"location": "New York, NY",
"ip": "192.168.1.1",
"port": 8080,
"download_port": 9090,
"object_storage_port": 10000,
"state": "active",
"os": "Linux",
"platform": "x86_64",
"platform_family": "debian",
"platform_version": "10",
"kernel_version": "4.19.0-12-amd64",
"git_version": "v1.2.3",
"git_commit": "a1b2c3d4",
"build_platform": "linux/amd64",
"scheduler_cluster_id": 1,
"scheduler_cluster": {
"id": 1,
"name": "Cluster A",
"state": "active",
"region": "us-east-1"
}
},
{
"host_name": "server2.example.com",
"type": "secondary",
"idc": "IDC2",
"location": "San Francisco, CA",
"ip": "192.168.1.2",
"port": 8081,
"download_port": 9091,
"object_storage_port": 10001,
"state": "inactive",
"os": "Linux",
"platform": "x86_64",
"platform_family": "ubuntu",
"platform_version": "18.04",
"kernel_version": "5.4.0-42-generic",
"git_version": "v1.2.4",
"git_commit": "e5f6g7h8",
"build_platform": "linux/amd64",
"scheduler_cluster_id": 2,
"scheduler_cluster": {
"id": 2,
"name": "Cluster B",
"state": "inactive",
"region": "us-west-2"
}
}
],
},
"scheduler_clusters": [
],
"seed_peer_clusters": [
],
"state": "string",
"task_id": "string",
"type": "get_task",
"updated_at": "string",
"user": {
},
"user_id": 0
} 2. delete task response, the response is in
|
8 tasks
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Feature request:
Use case:
UI Example:
The text was updated successfully, but these errors were encountered: