mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
[chore] optimize code style (#2000)
Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> Co-authored-by: tomsun28 <tomsun28@outlook.com>
This commit is contained in:
+1
-1
@@ -90,4 +90,4 @@ It is advised to create a master GitHub issue to formulate the execution plan an
|
||||
- Merged PR means the HIP was accepted.
|
||||
- Closed PR means the HIP was rejected.
|
||||
- Open PR means the HIP was submitted and is in the process of discussion.
|
||||
2. You can also take a look at the file in the `hip` folder. Each one is an approved HIP.
|
||||
2. You can also take a look at the file in the `hip` folder. Each one is an approved HIP.
|
||||
|
||||
+1
-1
@@ -140,4 +140,4 @@ If there are alternatives that were already considered by the authors or, after
|
||||
Updated afterwards
|
||||
-->
|
||||
* Mailing List discussion thread:
|
||||
* Mailing List voting thread:
|
||||
* Mailing List voting thread:
|
||||
|
||||
+1
-1
@@ -51,4 +51,4 @@ Supplement the relevant unit tests.
|
||||
Updated afterwards
|
||||
-->
|
||||
* Mailing List discussion thread: https://lists.apache.org/thread/cvvo7xg35fxq7kml5ggdrcdygrx6yvyj
|
||||
* Mailing List voting thread: https://lists.apache.org/thread/1s7dhrb27qfdx1gsh29dvmo8frjbt619
|
||||
* Mailing List voting thread: https://lists.apache.org/thread/1s7dhrb27qfdx1gsh29dvmo8frjbt619
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.hertzbeat.plugin;
|
||||
|
||||
import org.apache.hertzbeat.common.entity.alerter.Alert;
|
||||
@@ -25,8 +24,8 @@ import org.apache.hertzbeat.common.entity.alerter.Alert;
|
||||
*/
|
||||
public interface Plugin {
|
||||
|
||||
/*
|
||||
* execute when alert
|
||||
/**
|
||||
* execute when alert
|
||||
*/
|
||||
void alert(Alert alert);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
|
||||
package org.apache.hertzbeat.plugin.impl;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
@@ -27,11 +26,13 @@ import org.apache.hertzbeat.plugin.Plugin;
|
||||
*/
|
||||
@Slf4j
|
||||
public class DemoPluginImpl implements Plugin {
|
||||
/*
|
||||
* execute when alert
|
||||
|
||||
/**
|
||||
* execute when alert
|
||||
*/
|
||||
@Override
|
||||
public void alert(Alert alert) {
|
||||
log.info("DemoPluginImpl alert: {}", alert);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
org.apache.hertzbeat.plugin.impl.DemoPluginImpl
|
||||
org.apache.hertzbeat.plugin.impl.DemoPluginImpl
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
# limitations under the License.
|
||||
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.apache.hertzbeat.push.config.PushAutoConfiguration
|
||||
org.apache.hertzbeat.push.config.PushAutoConfiguration
|
||||
|
||||
@@ -51,5 +51,9 @@ public interface RemotingServer extends RemotingService {
|
||||
*/
|
||||
ClusterMsg.Message sendMsgSync(Channel channel, ClusterMsg.Message request, int timeoutMillis);
|
||||
|
||||
/**
|
||||
* register hook.
|
||||
* @param nettyHookList hook list
|
||||
*/
|
||||
void registerHook(List<NettyHook> nettyHookList);
|
||||
}
|
||||
|
||||
@@ -25,5 +25,4 @@ $ docker buildx build --platform linux/arm64,linux/amd64 -t quay.io/tancloud/her
|
||||
|
||||
# Inspect the image info
|
||||
$ docker buildx imagetools inspect apache/hertzbeat:v1.0.0
|
||||
|
||||
```
|
||||
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
package org.apache.hertzbeat.warehouse.dao;
|
||||
|
||||
|
||||
import org.apache.hertzbeat.common.entity.warehouse.History;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
|
||||
+1
-3
@@ -24,10 +24,8 @@ import org.springframework.boot.context.event.ApplicationReadyEvent;
|
||||
import org.springframework.context.event.EventListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* WareHouseApplicationReadyListener
|
||||
*/
|
||||
@Slf4j
|
||||
@Component
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ import java.util.Map;
|
||||
import org.apache.hertzbeat.common.entity.dto.Value;
|
||||
|
||||
/**
|
||||
*
|
||||
* history data reader
|
||||
*/
|
||||
public interface HistoryDataReader {
|
||||
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ package org.apache.hertzbeat.warehouse.store.history;
|
||||
import org.apache.hertzbeat.common.entity.message.CollectRep;
|
||||
|
||||
/**
|
||||
*
|
||||
* history data writer
|
||||
*/
|
||||
public interface HistoryDataWriter {
|
||||
|
||||
|
||||
-2
@@ -17,7 +17,6 @@
|
||||
|
||||
package org.apache.hertzbeat.warehouse.store.history.vm;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
@@ -59,7 +58,6 @@ import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
import org.springframework.web.util.UriComponentsBuilder;
|
||||
|
||||
|
||||
/**
|
||||
* tdengine data storage
|
||||
*/
|
||||
|
||||
@@ -14,4 +14,4 @@
|
||||
# limitations under the License.
|
||||
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.apache.hertzbeat.warehouse.WarehouseAutoConfiguration
|
||||
org.apache.hertzbeat.warehouse.WarehouseAutoConfiguration
|
||||
|
||||
+1
-1
@@ -37,4 +37,4 @@ class MemoryDataStorageTest {
|
||||
@Test
|
||||
void destroy() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -45,4 +45,4 @@ class MetricsDataRedisCodecTest {
|
||||
@Test
|
||||
void encodeValue() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -37,4 +37,4 @@ class RedisDataStorageTest {
|
||||
@Test
|
||||
void destroy() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -49,4 +49,4 @@ class TdEngineDataStorageTest {
|
||||
@Test
|
||||
void getHistoryIntervalMetricData() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user