baomingyu commented on code in PR #9915: URL: https://github.com/apache/inlong/pull/9915#discussion_r1547080719
########## inlong-audit/sql/audit-service/apcache_inlong_audit_aggregate.sql: ########## @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +SET NAMES utf8; +SET FOREIGN_KEY_CHECKS = 0; +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + +-- ---------------------------- +-- Database for InLong Audit +-- ---------------------------- +CREATE DATABASE IF NOT EXISTS apache_inlong_audit; + +USE apache_inlong_audit; + +-- ---------------------------- +-- Table structure for audit_data +-- ---------------------------- +CREATE TABLE IF NOT EXISTS `audit_data_temp` +( + `log_ts` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'log timestamp', + `inlong_group_id` varchar(100) NOT NULL DEFAULT '' COMMENT 'The target inlong group id', + `inlong_stream_id` varchar(100) NOT NULL DEFAULT '' COMMENT 'The target inlong stream id', + `audit_id` varchar(100) NOT NULL DEFAULT '' COMMENT 'Audit id', + `audit_tag` varchar(100) DEFAULT '' COMMENT 'Audit tag', + `count` BIGINT NOT NULL DEFAULT '0' COMMENT 'Message count', + `size` BIGINT NOT NULL DEFAULT '0' COMMENT 'Message size', + `delay` BIGINT NOT NULL DEFAULT '0' COMMENT 'Message delay count', + `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Update time', + PRIMARY KEY (`log_ts`,`inlong_group_id`,`inlong_stream_id`,`audit_id`,`audit_tag`) Review Comment: suggest add create_time column ########## inlong-audit/sql/audit-service/apcache_inlong_audit_aggregate.sql: ########## @@ -0,0 +1,61 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +SET NAMES utf8; +SET FOREIGN_KEY_CHECKS = 0; +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + +-- ---------------------------- +-- Database for InLong Audit +-- ---------------------------- +CREATE DATABASE IF NOT EXISTS apache_inlong_audit; + +USE apache_inlong_audit; + +-- ---------------------------- +-- Table structure for audit_data Review Comment: this table is metric water table ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
