@@ -8,17 +8,17 @@ var TFVersionMigrationMap = []struct {
8
8
}{
9
9
// init version, just run init SQL
10
10
{"1.0" , []string {
11
- "CREATE TABLE IF NOT EXISTS tf_worker_resources (\n `worker` String NULL SKIPPING INDEX,\n `workload` String NULL INVERTED INDEX,\n `pool` String NULL INVERTED INDEX,\n `namespace` String NULL INVERTED INDEX,\n `qos` String NULL,\n `tflops_request` Double NULL,\n `tflops_limit` Double NULL,\n `vram_bytes_request` Double NULL,\n `vram_bytes_limit` Double NULL,\n `gpu_count` BigInt NULL,\n `raw_cost` Double NULL,\n `ts` Timestamp_ms TIME INDEX,\n PRIMARY KEY (`worker`, `workload`, `pool`, `namespace`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
11
+ "CREATE TABLE IF NOT EXISTS tf_worker_resources (\n `worker` String NULL SKIPPING INDEX,\n `workload` String NULL INVERTED INDEX,\n `pool` String NULL INVERTED INDEX,\n `namespace` String NULL INVERTED INDEX,\n `qos` String NULL,\n `tflops_request` Double NULL,\n `tflops_limit` Double NULL,\n `vram_bytes_request` Double NULL,\n `vram_bytes_limit` Double NULL,\n `gpu_count` BigInt NULL,\n `raw_cost` Double NULL,\n `ts` Timestamp_ns TIME INDEX,\n PRIMARY KEY (`worker`, `workload`, `pool`, `namespace`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
12
12
13
- "CREATE TABLE IF NOT EXISTS tf_node_resources (\n `node_name` String NULL INVERTED INDEX,\n `pool` String NULL INVERTED INDEX,\n `allocated_tflops` Double NULL,\n `allocated_tflops_percent` Double NULL,\n `allocated_vram_bytes` Double NULL,\n `allocated_vram_percent` Double NULL,\n `allocated_tflops_percent_virtual` Double NULL,\n `allocated_vram_percent_virtual` Double NULL,\n `raw_cost` Double NULL,\n `gpu_count` BigInt NULL,\n `ts` Timestamp_ms TIME INDEX,\n PRIMARY KEY (`node_name`, `pool`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
13
+ "CREATE TABLE IF NOT EXISTS tf_node_resources (\n `node_name` String NULL INVERTED INDEX,\n `pool` String NULL INVERTED INDEX,\n `allocated_tflops` Double NULL,\n `allocated_tflops_percent` Double NULL,\n `allocated_vram_bytes` Double NULL,\n `allocated_vram_percent` Double NULL,\n `allocated_tflops_percent_virtual` Double NULL,\n `allocated_vram_percent_virtual` Double NULL,\n `raw_cost` Double NULL,\n `gpu_count` BigInt NULL,\n `ts` Timestamp_ns TIME INDEX,\n PRIMARY KEY (`node_name`, `pool`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
14
14
15
- "CREATE TABLE IF NOT EXISTS tf_system_metrics (\n `pool` String NULL INVERTED INDEX,\n `total_workers_cnt` BigInt NULL,\n `total_nodes_cnt` BigInt NULL,\n `total_allocation_fail_cnt` BigInt NULL,\n `total_allocation_success_cnt` BigInt NULL,\n `total_scale_up_cnt` BigInt NULL,\n `total_scale_down_cnt` BigInt NULL,\n `ts` Timestamp_ms TIME INDEX,\n PRIMARY KEY (`pool`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
15
+ "CREATE TABLE IF NOT EXISTS tf_system_metrics (\n `pool` String NULL INVERTED INDEX,\n `total_workers_cnt` BigInt NULL,\n `total_nodes_cnt` BigInt NULL,\n `total_allocation_fail_cnt` BigInt NULL,\n `total_allocation_success_cnt` BigInt NULL,\n `total_scale_up_cnt` BigInt NULL,\n `total_scale_down_cnt` BigInt NULL,\n `ts` Timestamp_ns TIME INDEX,\n PRIMARY KEY (`pool`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
16
16
17
17
"CREATE TABLE IF NOT EXISTS tf_system_log (\n `component` String NULL INVERTED INDEX,\n `container` String NULL INVERTED INDEX,\n `message` String NULL FULLTEXT INDEX WITH (analyzer = 'English' , case_sensitive = 'false'),\n `namespace` String NULL INVERTED INDEX,\n `pod` String NULL SKIPPING INDEX,\n `stream` String NULL,\n `timestamp` String NULL,\n `greptime_timestamp` Timestamp_ms TIME INDEX,\n PRIMARY KEY (`component`, `container`, `namespace`, `pod`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
18
18
19
- "CREATE TABLE IF NOT EXISTS tf_worker_usage (\n `workload` String NULL INVERTED INDEX,\n `worker` String NULL SKIPPING INDEX,\n `pool` String NULL INVERTED INDEX,\n `node_name` String NULL INVERTED INDEX,\n `uuid` String NULL INVERTED INDEX,\n `compute_percentage` Double NULL,\n `memory_bytes` BigInt UNSIGNED NULL,\n `compute_tflops` Double NULL,\n `compute_throttled_cnt` BigInt NULL,\n `vram_freezed_cnt` BigInt NULL,\n `vram_resumed_cnt` BigInt NULL,\n `ts` Timestamp_ms TIME INDEX,\n PRIMARY KEY (`workload`, `worker`, `pool`, `node_name`, `uuid`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
19
+ "CREATE TABLE IF NOT EXISTS tf_worker_usage (\n `workload` String NULL INVERTED INDEX,\n `worker` String NULL SKIPPING INDEX,\n `pool` String NULL INVERTED INDEX,\n `node_name` String NULL INVERTED INDEX,\n `uuid` String NULL INVERTED INDEX,\n `compute_percentage` Double NULL,\n `memory_bytes` BigInt UNSIGNED NULL,\n `compute_tflops` Double NULL,\n `compute_throttled_cnt` BigInt NULL,\n `vram_freezed_cnt` BigInt NULL,\n `vram_resumed_cnt` BigInt NULL,\n `ts` Timestamp_ns TIME INDEX,\n PRIMARY KEY (`workload`, `worker`, `pool`, `node_name`, `uuid`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
20
20
21
- "CREATE TABLE IF NOT EXISTS tf_gpu_usage (\n `node_name` String NULL INVERTED INDEX,\n `pool` String NULL INVERTED INDEX,\n `uuid` String NULL INVERTED INDEX,\n `compute_percentage` Double NULL,\n `memory_percentage` Double NULL,\n `memory_bytes` BigInt UNSIGNED NULL,\n `compute_tflops` Double NULL,\n `rx` Double NULL,\n `tx` Double NULL,\n `temperature` Double NULL,\n `ts` Timestamp_ms TIME INDEX,\n PRIMARY KEY (`node_name`, `pool`, `uuid`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
21
+ "CREATE TABLE IF NOT EXISTS tf_gpu_usage (\n `node_name` String NULL INVERTED INDEX,\n `pool` String NULL INVERTED INDEX,\n `uuid` String NULL INVERTED INDEX,\n `compute_percentage` Double NULL,\n `memory_percentage` Double NULL,\n `memory_bytes` BigInt UNSIGNED NULL,\n `compute_tflops` Double NULL,\n `rx` Double NULL,\n `tx` Double NULL,\n `temperature` Double NULL,\n `ts` Timestamp_ns TIME INDEX,\n PRIMARY KEY (`node_name`, `pool`, `uuid`))\n ENGINE=mito WITH( ttl='30d', merge_mode = 'last_non_null')" ,
22
22
}},
23
23
24
24
// add alter SQL in future
0 commit comments