This is an automated email from the ASF dual-hosted git repository. luchunliang pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push: new 3746e3ffcc [INLONG-9907][Audit] Audit-service add codes of entities (#9911) 3746e3ffcc is described below commit 3746e3ffcc97e476fb0fc526a81b298d144607d8 Author: doleyzi <43397300+dole...@users.noreply.github.com> AuthorDate: Tue Apr 2 10:10:04 2024 +0800 [INLONG-9907][Audit] Audit-service add codes of entities (#9911) * Audit-service add codes of entities * Audit-service add codes of entities * Audit-service add codes of entities * Audit-service add codes of entities * Audit-service add codes of entities --- .../src/main/java/entities/AuditCycle.java | 36 ++++++++++++++++++++++ .../src/main/java/entities/Request.java | 31 +++++++++++++++++++ .../src/main/java/entities/SourceEntities.java | 34 ++++++++++++++++++++ .../src/main/java/entities/StartEndTime.java | 28 +++++++++++++++++ .../src/main/java/entities/StatData.java | 36 ++++++++++++++++++++++ 5 files changed, 165 insertions(+) diff --git a/inlong-audit/audit-service/src/main/java/entities/AuditCycle.java b/inlong-audit/audit-service/src/main/java/entities/AuditCycle.java new file mode 100644 index 0000000000..0b0bb82ce5 --- /dev/null +++ b/inlong-audit/audit-service/src/main/java/entities/AuditCycle.java @@ -0,0 +1,36 @@ +/* + * 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. + */ + +package entities; + +/** + * Audit cycle + */ +public enum AuditCycle { + + MINUTE_5(5), MINUTE_10(10), MINUTE_30(30), HOUR(60), DAY(1440); + + private final int cycle; + + AuditCycle(int cycle) { + this.cycle = cycle; + } + + public int getValue() { + return cycle; + } +} diff --git a/inlong-audit/audit-service/src/main/java/entities/Request.java b/inlong-audit/audit-service/src/main/java/entities/Request.java new file mode 100644 index 0000000000..0e9ec8a4da --- /dev/null +++ b/inlong-audit/audit-service/src/main/java/entities/Request.java @@ -0,0 +1,31 @@ +/* + * 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. + */ + +package entities; + +import lombok.Data; + +@Data +public class Request { + + String startTime; + String endTime; + String auditId; + String auditTag; + String inlongGroupId; + String inlongStreamId; +} diff --git a/inlong-audit/audit-service/src/main/java/entities/SourceEntities.java b/inlong-audit/audit-service/src/main/java/entities/SourceEntities.java new file mode 100644 index 0000000000..9e079a875b --- /dev/null +++ b/inlong-audit/audit-service/src/main/java/entities/SourceEntities.java @@ -0,0 +1,34 @@ +/* + * 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. + */ + +package entities; + +import lombok.Data; + +@Data +public class SourceEntities { + + private AuditCycle auditCycle; + private String sourceTable; + private int beforeTimes; + + public SourceEntities(AuditCycle auditCycle, String sourceTable, int beforeTimes) { + this.auditCycle = auditCycle; + this.sourceTable = sourceTable; + this.beforeTimes = beforeTimes; + } +} diff --git a/inlong-audit/audit-service/src/main/java/entities/StartEndTime.java b/inlong-audit/audit-service/src/main/java/entities/StartEndTime.java new file mode 100644 index 0000000000..7b7944320e --- /dev/null +++ b/inlong-audit/audit-service/src/main/java/entities/StartEndTime.java @@ -0,0 +1,28 @@ +/* + * 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. + */ + +package entities; + +import lombok.Data; + +@Data +public class StartEndTime { + + String startTime; + String endTime; + long endTimeStamp; +} diff --git a/inlong-audit/audit-service/src/main/java/entities/StatData.java b/inlong-audit/audit-service/src/main/java/entities/StatData.java new file mode 100644 index 0000000000..aefc828efe --- /dev/null +++ b/inlong-audit/audit-service/src/main/java/entities/StatData.java @@ -0,0 +1,36 @@ +/* + * 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. + */ + +package entities; + +import lombok.Data; + +import java.sql.Timestamp; + +@Data +public class StatData { + + private String logTs; + private String inlongGroupId; + private String inlongStreamId; + private String auditId; + private String auditTag; + private Long count; + private Long size; + private Long delay; + private Timestamp updateTime; +}