| |
| DROP TABLE IF EXISTS internal_platform_db.t_app_apksafe_cont_res_detect_center_stat_di_prestosql_007; |
| DROP TABLE IF EXISTS internal_platform_db.t_threat_event_prestosql_007; |
| DROP TABLE IF EXISTS internal_platform_db.t_md_apksafe_res_detect_center_stat_prestosql_007; |
| DROP TABLE IF EXISTS internal_platform_db.t_md_apksafe_res_detect_center_stat_cand_prestosql_007; |
|
|
| CREATE DATABASE IF NOT EXISTS internal_platform_db; |
|
|
| |
| |
| |
| CREATE TABLE IF NOT EXISTS internal_platform_db.t_gpu_monitor_parsed_prestosql_007 ( |
| container STRING, |
| pod_name STRING, |
| pkg_time STRING, |
| gpu_name STRING, |
| metric STRING, |
| value STRING, |
| dt STRING |
| ) STORED AS ORC; |
|
|
| |
| |
| |
| |
| |
| |
| |
|
|
| INSERT INTO TABLE internal_platform_db.t_gpu_monitor_parsed_prestosql_007 VALUES |
| |
| ('ctr_a1_0', 'pod_scan_apk_a1', '1749331230', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.65', '2026060800'), |
| ('ctr_a1_0', 'pod_scan_apk_a1', '1749331290', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.70', '2026060800'), |
| ('ctr_a1_0', 'pod_scan_apk_a1', '1749331350', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.72', '2026060800'), |
| ('ctr_a1_0', 'pod_scan_apk_a1', '1749331530', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.68', '2026060800'), |
| |
| ('ctr_a1_1', 'pod_scan_apk_a1', '1749331230', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '45.2', '2026060800'), |
| ('ctr_a1_1', 'pod_scan_apk_a1', '1749331290', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '48.1', '2026060800'), |
| ('ctr_a1_1', 'pod_scan_apk_a1', '1749331350', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '50.3', '2026060800'), |
| ('ctr_a1_1', 'pod_scan_apk_a1', '1749331530', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '46.7', '2026060800'), |
| |
| ('ctr_a2_0', 'pod_scan_apk_a2', '1749331245', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.55', '2026060800'), |
| ('ctr_a2_0', 'pod_scan_apk_a2', '1749331305', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.58', '2026060800'), |
| ('ctr_a2_0', 'pod_scan_apk_a2', '1749331365', 'GPU-A100', 'k8s_container_vgpu_gpu_mem_usage', '0.60', '2026060800'), |
| |
| ('ctr_a2_1', 'pod_scan_apk_a2', '1749331245', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '40.1', '2026060800'), |
| ('ctr_a2_1', 'pod_scan_apk_a2', '1749331305', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '42.5', '2026060800'), |
| ('ctr_a2_1', 'pod_scan_apk_a2', '1749331365', 'GPU-A100', 'k8s_dcgm_fi_dev_fb_util', '44.0', '2026060800'), |
| |
| ('ctr_b1_0', 'pod_scan_apk_b1', '1749331260', 'GPU-V100', 'k8s_container_vgpu_gpu_mem_usage', '0.80', '2026060800'), |
| ('ctr_b1_0', 'pod_scan_apk_b1', '1749331320', 'GPU-V100', 'k8s_container_vgpu_gpu_mem_usage', '0.82', '2026060800'), |
| ('ctr_b1_0', 'pod_scan_apk_b1', '1749331560', 'GPU-V100', 'k8s_container_vgpu_gpu_mem_usage', '0.78', '2026060800'), |
| |
| ('ctr_b1_1', 'pod_scan_apk_b1', '1749331260', 'GPU-V100', 'k8s_dcgm_fi_dev_fb_util', '55.0', '2026060800'), |
| ('ctr_b1_1', 'pod_scan_apk_b1', '1749331320', 'GPU-V100', 'k8s_dcgm_fi_dev_fb_util', '58.3', '2026060800'), |
| ('ctr_b1_1', 'pod_scan_apk_b1', '1749331560', 'GPU-V100', 'k8s_dcgm_fi_dev_fb_util', '52.1', '2026060800'), |
| |
| ('ctr_b2_0', 'pod_scan_apk_b2', '1749331275', 'GPU-V100', 'k8s_container_vgpu_gpu_mem_usage', '0.75', '2026060800'), |
| ('ctr_b2_0', 'pod_scan_apk_b2', '1749331335', 'GPU-V100', 'k8s_container_vgpu_gpu_mem_usage', '0.77', '2026060800'), |
| |
| ('ctr_b2_1', 'pod_scan_apk_b2', '1749331275', 'GPU-V100', 'k8s_dcgm_fi_dev_fb_util', '50.8', '2026060800'), |
| ('ctr_b2_1', 'pod_scan_apk_b2', '1749331335', 'GPU-V100', 'k8s_dcgm_fi_dev_fb_util', '53.2', '2026060800'); |
|
|
| |
| |
| |
| CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_scan_instance_podname_prestosql_007 ( |
| dt STRING, |
| instance_uuid STRING, |
| pod_name STRING, |
| pod_phase STRING, |
| namespace STRING |
| ) STORED AS ORC; |
|
|
| INSERT INTO TABLE internal_platform_db.dwd_scan_instance_podname_prestosql_007 VALUES |
| ('2026060800', 'inst_apk_scan_001', 'pod_scan_apk_a1', 'Running', 'apk-threat-scan'), |
| ('2026060800', 'inst_apk_scan_001', 'pod_scan_apk_a2', 'Running', 'apk-threat-scan'), |
| ('2026060800', 'inst_apk_scan_002', 'pod_scan_apk_b1', 'Running', 'apk-threat-scan'), |
| ('2026060800', 'inst_apk_scan_002', 'pod_scan_apk_b2', 'Running', 'apk-threat-scan'); |
|
|
| |
| |
| |
| CREATE TABLE IF NOT EXISTS internal_platform_db.dwd_scan_task_instance_prestosql_007 ( |
| databus_imp_date STRING, |
| instance_uuid STRING, |
| host_gpu_num DOUBLE, |
| host_num DOUBLE, |
| last_modify DOUBLE, |
| gpu_name STRING |
| ) STORED AS ORC; |
|
|
| |
| |
| INSERT INTO TABLE internal_platform_db.dwd_scan_task_instance_prestosql_007 VALUES |
| ('2026060800', 'inst_apk_scan_001', 4.0, 2.0, 1717761600.0, 'GPU-A100'), |
| ('2026060800', 'inst_apk_scan_001', 8.0, 4.0, 1717848000.0, 'GPU-A100'), |
| ('2026060800', 'inst_apk_scan_002', 2.0, 1.0, 1717675200.0, 'GPU-V100'); |
|
|
| |
| |
| |
| CREATE TABLE IF NOT EXISTS internal_platform_db.scan_task_instance_prestosql_007 ( |
| databus_imp_date STRING, |
| instance_uuid STRING, |
| host_gpu_num DOUBLE, |
| host_num DOUBLE, |
| last_modify DOUBLE, |
| gpu_name STRING, |
| scan_type STRING |
| ) STORED AS ORC; |
|
|
| |
| |
| INSERT INTO TABLE internal_platform_db.scan_task_instance_prestosql_007 VALUES |
| ('2026060800', 'inst_apk_scan_002', 4.0, 2.0, 1717934400.0, 'GPU-V100', 'full_scan'), |
| ('2026060800', 'inst_apk_scan_003', 8.0, 4.0, 1717934400.0, 'GPU-A100', 'quick_scan'); |
|
|
| |
| |
| |
| CREATE TABLE IF NOT EXISTS internal_platform_db.t_scan_instance_gpu_time_stats_prestosql_007 ( |
| instance_uuid STRING, |
| time_5min BIGINT, |
| host_gpu_num DOUBLE, |
| sum_run_time_m DOUBLE, |
| gpu_hour DOUBLE, |
| gpu_name STRING, |
| pod_count BIGINT, |
| host_num DOUBLE |
| ) STORED AS ORC; |
|
|
| |
| |
| |
| CREATE TABLE IF NOT EXISTS internal_platform_db.t_scan_instance_gpu_time_stats_cand_prestosql_007 ( |
| instance_uuid STRING, |
| time_5min BIGINT, |
| host_gpu_num DOUBLE, |
| sum_run_time_m DOUBLE, |
| gpu_hour DOUBLE, |
| gpu_name STRING, |
| pod_count BIGINT, |
| host_num DOUBLE |
| ) STORED AS ORC; |
|
|