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

sadadw1 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozhera.git


The following commit(s) were added to refs/heads/master by this push:
     new a85a154d fix: Fix the Apache file header. (#667)
a85a154d is described below

commit a85a154dfb1d882955ec5551d981590e24f81fbb
Author: Xue <[email protected]>
AuthorDate: Thu Jun 4 14:00:19 2026 +0800

    fix: Fix the Apache file header. (#667)
    
    * fix: Addressing issues that arise during release deployment
    
    * fix: add apache header
---
 .github/workflows/ozhera-demo-client-package.yml   |  2 +-
 .github/workflows/ozhera-intelligence-package.yml  |  2 +-
 .../porcessor/AgentCollectProgressProcessor.java   | 25 ++++----------
 .../service/DefaultPublishConfigService.java       | 38 +---------------------
 .../ozhera/log/agent/channel/ChannelEngine.java    | 22 -------------
 .../channel/listener/InodeChangeDetectionTest.java | 19 +++++++++++
 .../log/manager/model/dto/LogAiAnalysisDTO.java    | 19 +++++++++++
 .../manager/model/vo/LogAiAnalysisResponse.java    | 19 +++++++++++
 .../ozhera/metrics/config/LogFileNameUtil.java     | 19 +++++++++++
 .../apache/ozhera/metrics/config/PromEnvEnum.java  | 19 +++++++++++
 .../metrics/config/SdkLoggerInitializer.java       | 19 +++++++++++
 11 files changed, 123 insertions(+), 80 deletions(-)

diff --git a/.github/workflows/ozhera-demo-client-package.yml 
b/.github/workflows/ozhera-demo-client-package.yml
index c58e3416..b74c54f7 100644
--- a/.github/workflows/ozhera-demo-client-package.yml
+++ b/.github/workflows/ozhera-demo-client-package.yml
@@ -44,4 +44,4 @@ jobs:
 
       - run: echo '<settings>    <interactiveMode>false</interactiveMode>    
<profiles>        <profile>            <repositories>                
<repository>                    <snapshots />                    <id>ossrh</id> 
                   <name>ossrh-snapshot</name>                    
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>          
      </repository>            </repositories>            <pluginRepositories>  
              <pluginRepository>         [...]
 
-      - run: cd ozhera-demo-client; mvn -U clean package
+      - run: mvn -U clean install -pl 
ozhera-demo-server/ozhera-demo-server-api -am -DskipTests && cd 
ozhera-demo-client && mvn -U clean package
diff --git a/.github/workflows/ozhera-intelligence-package.yml 
b/.github/workflows/ozhera-intelligence-package.yml
index 3e8a5741..ea6762a0 100644
--- a/.github/workflows/ozhera-intelligence-package.yml
+++ b/.github/workflows/ozhera-intelligence-package.yml
@@ -44,4 +44,4 @@ jobs:
 
       - run: echo '<settings>    <interactiveMode>false</interactiveMode>    
<profiles>        <profile>            <repositories>                
<repository>                    <snapshots />                    <id>ossrh</id> 
                   <name>ossrh-snapshot</name>                    
<url>https://s01.oss.sonatype.org/content/repositories/snapshots</url>          
      </repository>            </repositories>            <pluginRepositories>  
              <pluginRepository>         [...]
 
-      - run: cd ozhera-intelligence; mvn -U clean package
+      - run: mvn -U clean install -pl trace-etl/trace-etl-domain -am 
-DskipTests && cd ozhera-intelligence && mvn -U clean package
diff --git 
a/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/porcessor/AgentCollectProgressProcessor.java
 
b/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/porcessor/AgentCollectProgressProcessor.java
index 3732dd10..bafc58a4 100644
--- 
a/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/porcessor/AgentCollectProgressProcessor.java
+++ 
b/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/porcessor/AgentCollectProgressProcessor.java
@@ -20,7 +20,6 @@ package org.apache.ozhera.log.server.porcessor;
 
 import cn.hutool.json.JSONUtil;
 import com.google.common.util.concurrent.RateLimiter;
-import com.xiaomi.data.push.rpc.common.CompressionUtil;
 import com.xiaomi.data.push.rpc.netty.NettyRequestProcessor;
 import com.xiaomi.data.push.rpc.protocol.RemotingCommand;
 import com.xiaomi.youpin.docean.Ioc;
@@ -88,32 +87,20 @@ public class AgentCollectProgressProcessor implements 
NettyRequestProcessor {
      * try to parse the request body
      */
     private UpdateLogProcessCmd parseRequestBody(byte[] bodyBytes, 
ChannelHandlerContext ctx) {
-        String bodyStr = null;
-
-        try {
-            bodyStr = new String(bodyBytes, StandardCharsets.UTF_8);
-            if (JSONUtil.isTypeJSON(bodyStr)) {
-                UpdateLogProcessCmd cmd = GSON.fromJson(bodyStr, 
UpdateLogProcessCmd.class);
-                if (StringUtils.isBlank(cmd.getIp())) {
-                    log.warn("Invalid agent request, ip={}, body={}", 
getIp(ctx), brief(bodyStr));
-                    return null;
-                }
-                log.debug("Parsed request from agent: ip={}", cmd.getIp());
-                return cmd;
-            }
-        } catch (Exception ignored) {
-        }
+        String bodyStr = new String(bodyBytes, StandardCharsets.UTF_8);
         try {
-            bodyStr = new String(CompressionUtil.decompress(bodyBytes), 
StandardCharsets.UTF_8);
             if (!JSONUtil.isTypeJSON(bodyStr)) {
                 log.warn("Invalid agent request, ip={}, body={}", getIp(ctx), 
brief(bodyStr));
                 return null;
             }
             UpdateLogProcessCmd cmd = GSON.fromJson(bodyStr, 
UpdateLogProcessCmd.class);
-            log.debug("Parsed decompressed request from agent: ip={}", 
cmd.getIp());
+            if (StringUtils.isBlank(cmd.getIp())) {
+                log.warn("Invalid agent request, ip={}, body={}", getIp(ctx), 
brief(bodyStr));
+                return null;
+            }
+            log.debug("Parsed request from agent: ip={}", cmd.getIp());
             return cmd;
         } catch (Exception e) {
-            assert bodyStr != null;
             log.error("processRequest error, ip={}, body={}", getIp(ctx), 
brief(bodyStr), e);
             return null;
         }
diff --git 
a/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/service/DefaultPublishConfigService.java
 
b/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/service/DefaultPublishConfigService.java
index 9c29d2b0..32223241 100644
--- 
a/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/service/DefaultPublishConfigService.java
+++ 
b/ozhera-log/log-agent-server/src/main/java/org/apache/ozhera/log/server/service/DefaultPublishConfigService.java
@@ -45,7 +45,6 @@ import java.util.concurrent.atomic.AtomicInteger;
 
 import static org.apache.ozhera.log.common.Constant.GSON;
 import static org.apache.ozhera.log.common.Constant.SYMBOL_COLON;
-import static org.apache.ozhera.log.server.common.Utils.getConfig;
 
 /**
  * @author wtt
@@ -61,13 +60,6 @@ public class DefaultPublishConfigService implements 
PublishConfigService {
     @Resource
     private RpcServer rpcServer;
 
-    private static final String CONFIG_COMPRESS_KEY = 
"CONFIG_COMPRESS_ENABLED";
-    private static final String CONFIG_COMPRESS_MACHINE_KEY = 
"CONFIG_COMPRESS_MACHINE";
-
-    private volatile boolean configCompressValue = false;
-
-    private volatile String configCompressMachine;
-
     private final Random random = new Random();
 
     private static final ExecutorService SEND_CONFIG_EXECUTOR;
@@ -110,20 +102,6 @@ public class DefaultPublishConfigService implements 
PublishConfigService {
         );
     }
 
-    public void init() {
-        String compressRaw = getConfig(CONFIG_COMPRESS_KEY);
-        configCompressMachine = getConfig(CONFIG_COMPRESS_MACHINE_KEY);
-        log.info("init configCompressValue {},configCompressMachine {}", 
configCompressValue, configCompressMachine);
-        if (StringUtils.isNotBlank(compressRaw)) {
-            try {
-                configCompressValue = Boolean.parseBoolean(compressRaw);
-                log.info("configCompressValue {},configCompressMachine{}", 
configCompressValue, configCompressMachine);
-            } catch (Exception e) {
-                log.error("parse {} error,use default value:{},config 
value:{}", CONFIG_COMPRESS_KEY, configCompressValue, compressRaw);
-            }
-        }
-    }
-
     /**
      * dubbo interface, the timeout period cannot be too long
      *
@@ -164,13 +142,6 @@ public class DefaultPublishConfigService implements 
PublishConfigService {
                     RemotingCommand req = 
RemotingCommand.createRequestCommand(LogCmd.LOG_REQ);
                     req.setBody(sendStr.getBytes());
 
-                    if (configCompressValue || 
(StringUtils.isNotBlank(configCompressMachine) &&
-                            StringUtils.isNotBlank(meta.getAgentMachine()) &&
-                            
configCompressMachine.contains(meta.getAgentMachine()))) {
-                        req.enableCompression();
-                        log.info("The configuration is compressed,agent 
ip:{},Configuration information:{}", agentCurrentIp, sendStr);
-                    }
-
                     log.info("Send the configuration,agent ip:{},Configuration 
information:{}", agentCurrentIp, sendStr);
                     Stopwatch started = Stopwatch.createStarted();
                     RemotingCommand res = 
rpcServer.sendMessage(logAgentMap.get(agentCurrentIp), req, 10000);
@@ -301,13 +272,6 @@ public class DefaultPublishConfigService implements 
PublishConfigService {
         RemotingCommand req = 
RemotingCommand.createRequestCommand(LogCmd.LOG_REQ);
         req.setBody(sendStr.getBytes());
 
-        if (configCompressValue || 
(StringUtils.isNotBlank(configCompressMachine) &&
-                StringUtils.isNotBlank(meta.getAgentMachine()) &&
-                configCompressMachine.contains(meta.getAgentMachine()))) {
-            req.enableCompression();
-            log.info("The configuration is compressed,agent 
ip:{},Configuration information:{}", agentCurrentIp, sendStr);
-        }
-
         Stopwatch started = Stopwatch.createStarted();
 
         log.info("Send the configuration asynchronously,agent 
ip:{},Configuration information:{}", agentCurrentIp, sendStr);
@@ -317,7 +281,7 @@ public class DefaultPublishConfigService implements 
PublishConfigService {
         try {
 
             rpcServer.send(
-                    logAgentMap.get(agentCurrentIp).getChannel(),
+                    agentCurrentIp,
                     req,
                     10000,
                     response -> {
diff --git 
a/ozhera-log/log-agent/src/main/java/org/apache/ozhera/log/agent/channel/ChannelEngine.java
 
b/ozhera-log/log-agent/src/main/java/org/apache/ozhera/log/agent/channel/ChannelEngine.java
index cf67339a..a8dfde29 100644
--- 
a/ozhera-log/log-agent/src/main/java/org/apache/ozhera/log/agent/channel/ChannelEngine.java
+++ 
b/ozhera-log/log-agent/src/main/java/org/apache/ozhera/log/agent/channel/ChannelEngine.java
@@ -101,12 +101,8 @@ public class ChannelEngine {
 
     private static final String PROGRESS_ENV_KEY = 
"CHANNEL_STATE_PERIOD_SECONDS";
 
-    private static final String COMPRESS_KEY = 
"CHANNEL_STATE_COMPRESS_ENABLED";
-
     private static final long DEFAULT_PERIOD_SECONDS = 10L;
 
-    private volatile boolean progressCompressValue = false;
-
     @Getter
     private volatile boolean initComplete;
 
@@ -153,7 +149,6 @@ public class ChannelEngine {
             log.info("current channelDefineList:{},current 
channelServiceList:{}", gson.toJson(this.channelDefineList), 
gson.toJson(this.channelServiceList.stream().map(ChannelService::instanceId).collect(Collectors.toList())));
             monitorFilesClean();
             executorFileClean();
-            resolveCompressEnabled();
         } catch (Exception e) {
             log.error("ChannelEngine init exception", e);
         } finally {
@@ -161,18 +156,6 @@ public class ChannelEngine {
         }
     }
 
-    private void resolveCompressEnabled() {
-        String raw = ChannelUtil.getConfig(COMPRESS_KEY, config);
-        if (StringUtils.isNotBlank(raw)) {
-            try {
-                progressCompressValue = Boolean.parseBoolean(raw);
-                log.info("progressCompressValue {}", progressCompressValue);
-            } catch (Exception e) {
-                log.error("parse {} error,use default value:{},config 
value:{}", COMPRESS_KEY, progressCompressValue, raw);
-            }
-        }
-    }
-
     /**
      * Thread pool cleaning, many wasted files don't need to keep wasting 
threads, they should be cleaned up directly.
      */
@@ -680,11 +663,6 @@ public class ChannelEngine {
         RpcClient rpcClient = Ioc.ins().getBean(RpcClient.class);
         RemotingCommand req = 
RemotingCommand.createRequestCommand(Constant.RPCCMD_AGENT_CODE);
 
-        if (progressCompressValue) {
-            // enable collection progress compression
-            req.enableCompression();
-        }
-
         req.setBody(GSON.toJson(processCmd).getBytes());
         rpcClient.sendToAllMessage(req);
         log.debug("send collect progress,data:{}", gson.toJson(processCmd));
diff --git 
a/ozhera-log/log-agent/src/test/java/org/apache/ozhera/log/agent/channel/listener/InodeChangeDetectionTest.java
 
b/ozhera-log/log-agent/src/test/java/org/apache/ozhera/log/agent/channel/listener/InodeChangeDetectionTest.java
index acedefaa..2271ae60 100644
--- 
a/ozhera-log/log-agent/src/test/java/org/apache/ozhera/log/agent/channel/listener/InodeChangeDetectionTest.java
+++ 
b/ozhera-log/log-agent/src/test/java/org/apache/ozhera/log/agent/channel/listener/InodeChangeDetectionTest.java
@@ -1,3 +1,22 @@
+/*
+ * 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.ozhera.log.agent.channel.listener;
 
 import org.apache.ozhera.log.agent.channel.AbstractChannelService;
diff --git 
a/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/dto/LogAiAnalysisDTO.java
 
b/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/dto/LogAiAnalysisDTO.java
index f6312b81..73a2b5c0 100644
--- 
a/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/dto/LogAiAnalysisDTO.java
+++ 
b/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/dto/LogAiAnalysisDTO.java
@@ -1,3 +1,22 @@
+/*
+ * 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.ozhera.log.manager.model.dto;
 
 import lombok.Data;
diff --git 
a/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/vo/LogAiAnalysisResponse.java
 
b/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/vo/LogAiAnalysisResponse.java
index 62bfef76..fb87cf61 100644
--- 
a/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/vo/LogAiAnalysisResponse.java
+++ 
b/ozhera-log/log-manager/src/main/java/org/apache/ozhera/log/manager/model/vo/LogAiAnalysisResponse.java
@@ -1,3 +1,22 @@
+/*
+ * 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.ozhera.log.manager.model.vo;
 
 import lombok.Data;
diff --git 
a/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/LogFileNameUtil.java
 
b/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/LogFileNameUtil.java
index 5fdb3944..a41eef9c 100644
--- 
a/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/LogFileNameUtil.java
+++ 
b/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/LogFileNameUtil.java
@@ -1,3 +1,22 @@
+/*
+ * 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.ozhera.metrics.config;
 
 /**
diff --git 
a/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/PromEnvEnum.java
 
b/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/PromEnvEnum.java
index 84feef3f..2a8fc373 100644
--- 
a/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/PromEnvEnum.java
+++ 
b/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/PromEnvEnum.java
@@ -1,3 +1,22 @@
+/*
+ * 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.ozhera.metrics.config;
 
 public enum PromEnvEnum {
diff --git 
a/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/SdkLoggerInitializer.java
 
b/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/SdkLoggerInitializer.java
index df07d80f..45b60bcb 100644
--- 
a/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/SdkLoggerInitializer.java
+++ 
b/ozhera-metrics-all/ozhera-metrics-sdk-config/src/main/java/org/apache/ozhera/metrics/config/SdkLoggerInitializer.java
@@ -1,3 +1,22 @@
+/*
+ * 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.ozhera.metrics.config;
 
 import ch.qos.logback.classic.AsyncAppender;


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to