You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2024/03/14 06:24:50 UTC

(inlong) branch master updated: [INLONG-9816][Agent] Add config class for installer (#9817)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang 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 b6e1064dcf [INLONG-9816][Agent] Add config class for installer (#9817)
b6e1064dcf is described below

commit b6e1064dcfa93052181451ef2b94cbb68f89a8a5
Author: justinwwhuang <hw...@163.com>
AuthorDate: Thu Mar 14 14:24:44 2024 +0800

    [INLONG-9816][Agent] Add config class for installer (#9817)
---
 .../common/pojo/agent/installer/ConfigResult.java  | 52 ++++++++++++++++++
 .../common/pojo/agent/installer/ModuleConfig.java  | 62 ++++++++++++++++++++++
 .../common/pojo/agent/installer/PackageConfig.java | 40 ++++++++++++++
 3 files changed, 154 insertions(+)

diff --git a/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/ConfigResult.java b/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/ConfigResult.java
new file mode 100644
index 0000000000..629ee879e5
--- /dev/null
+++ b/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/ConfigResult.java
@@ -0,0 +1,52 @@
+/*
+ * 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 org.apache.inlong.common.pojo.agent.installer;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+import java.util.List;
+
+/**
+ * The config result pulled by the agent from the manager.
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class ConfigResult {
+
+    /**
+     * The md5 of the config result
+     */
+    private String md5;
+    /**
+     * Number of module
+     */
+    private Integer moduleNum;
+    /**
+     * The list of module config list
+     */
+    private List<ModuleConfig> moduleList;
+    /**
+     * Installation package storage path
+     */
+    private String storagePath;
+}
\ No newline at end of file
diff --git a/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/ModuleConfig.java b/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/ModuleConfig.java
new file mode 100644
index 0000000000..2388cb3825
--- /dev/null
+++ b/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/ModuleConfig.java
@@ -0,0 +1,62 @@
+/*
+ * 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 org.apache.inlong.common.pojo.agent.installer;
+
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * The Module config for installer.
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+public class ModuleConfig {
+
+    private Integer id;
+    private String name;
+    /**
+     * The md5 of the module config
+     */
+    private String md5;
+    private String version;
+    /**
+     * Number of processes in one node
+     */
+    private Integer processesNum;
+    /**
+     * The command to start the module
+     */
+    private String startCommand;
+    /**
+     * The command to stop the module
+     */
+    private String stopCommand;
+    /**
+     * The command to check the processes num of the module
+     */
+    private String checkCommand;
+    /**
+     * The command to uninstall the module
+     */
+    private String uninstallCommand;
+    private PackageConfig packageConfig;
+}
\ No newline at end of file
diff --git a/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/PackageConfig.java b/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/PackageConfig.java
new file mode 100644
index 0000000000..03c16d9f0b
--- /dev/null
+++ b/inlong-common/src/main/java/org/apache/inlong/common/pojo/agent/installer/PackageConfig.java
@@ -0,0 +1,40 @@
+/*
+ * 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 org.apache.inlong.common.pojo.agent.installer;
+
+import lombok.Data;
+
+/**
+ * The package config for installer.
+ */
+@Data
+public class PackageConfig {
+
+    /**
+     * The md5 of the package config
+     */
+    private String md5;
+    /**
+     * The file name saved after downloading the installation package
+     */
+    private String fileName;
+    /**
+     * The download url of the installation package
+     */
+    private String downloadUrl;
+}
\ No newline at end of file