Skip to content

Commit d6d6d3c

Browse files
yuluo-yxtomsun28
andauthored
[chore] optimize code style (apache#2000)
Signed-off-by: yuluo-yx <[email protected]> Co-authored-by: tomsun28 <[email protected]>
1 parent 2d925eb commit d6d6d3c

File tree

19 files changed

+23
-25
lines changed

19 files changed

+23
-25
lines changed

hip/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,4 @@ It is advised to create a master GitHub issue to formulate the execution plan an
9090
- Merged PR means the HIP was accepted.
9191
- Closed PR means the HIP was rejected.
9292
- Open PR means the HIP was submitted and is in the process of discussion.
93-
2. You can also take a look at the file in the `hip` folder. Each one is an approved HIP.
93+
2. You can also take a look at the file in the `hip` folder. Each one is an approved HIP.

hip/TEMPLATE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -140,4 +140,4 @@ If there are alternatives that were already considered by the authors or, after
140140
Updated afterwards
141141
-->
142142
* Mailing List discussion thread:
143-
* Mailing List voting thread:
143+
* Mailing List voting thread:

hip/hip-01.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ Supplement the relevant unit tests.
5151
Updated afterwards
5252
-->
5353
* Mailing List discussion thread: https://lists.apache.org/thread/cvvo7xg35fxq7kml5ggdrcdygrx6yvyj
54-
* Mailing List voting thread: https://lists.apache.org/thread/1s7dhrb27qfdx1gsh29dvmo8frjbt619
54+
* Mailing List voting thread: https://lists.apache.org/thread/1s7dhrb27qfdx1gsh29dvmo8frjbt619

plugin/src/main/java/org/apache/hertzbeat/plugin/Plugin.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
1918
package org.apache.hertzbeat.plugin;
2019

2120
import org.apache.hertzbeat.common.entity.alerter.Alert;
@@ -25,8 +24,8 @@
2524
*/
2625
public interface Plugin {
2726

28-
/*
29-
* execute when alert
27+
/**
28+
* execute when alert
3029
*/
3130
void alert(Alert alert);
3231
}

plugin/src/main/java/org/apache/hertzbeat/plugin/impl/DemoPluginImpl.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
* limitations under the License.
1616
*/
1717

18-
1918
package org.apache.hertzbeat.plugin.impl;
2019

2120
import lombok.extern.slf4j.Slf4j;
@@ -27,11 +26,13 @@
2726
*/
2827
@Slf4j
2928
public class DemoPluginImpl implements Plugin {
30-
/*
31-
* execute when alert
29+
30+
/**
31+
* execute when alert
3232
*/
3333
@Override
3434
public void alert(Alert alert) {
3535
log.info("DemoPluginImpl alert: {}", alert);
3636
}
37+
3738
}
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
org.apache.hertzbeat.plugin.impl.DemoPluginImpl
1+
org.apache.hertzbeat.plugin.impl.DemoPluginImpl

push/src/main/resources/META-INF/spring.factories

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515

1616
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
17-
org.apache.hertzbeat.push.config.PushAutoConfiguration
17+
org.apache.hertzbeat.push.config.PushAutoConfiguration

remoting/src/main/java/org/apache/hertzbeat/remoting/RemotingServer.java

+4
Original file line numberDiff line numberDiff line change
@@ -51,5 +51,9 @@ public interface RemotingServer extends RemotingService {
5151
*/
5252
ClusterMsg.Message sendMsgSync(Channel channel, ClusterMsg.Message request, int timeoutMillis);
5353

54+
/**
55+
* register hook.
56+
* @param nettyHookList hook list
57+
*/
5458
void registerHook(List<NettyHook> nettyHookList);
5559
}

script/docker/server/README.md

-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ $ docker buildx build --platform linux/arm64,linux/amd64 -t quay.io/tancloud/her
2525

2626
# Inspect the image info
2727
$ docker buildx imagetools inspect apache/hertzbeat:v1.0.0
28-
2928
```

warehouse/src/main/java/org/apache/hertzbeat/warehouse/dao/HistoryDao.java

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.hertzbeat.warehouse.dao;
1919

20-
2120
import org.apache.hertzbeat.common.entity.warehouse.History;
2221
import org.springframework.data.jpa.repository.JpaRepository;
2322
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

warehouse/src/main/java/org/apache/hertzbeat/warehouse/listener/WareHouseApplicationReadyListener.java

+1-3
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
import org.springframework.context.event.EventListener;
2525
import org.springframework.stereotype.Component;
2626

27-
28-
2927
/**
30-
*
28+
* WareHouseApplicationReadyListener
3129
*/
3230
@Slf4j
3331
@Component

warehouse/src/main/java/org/apache/hertzbeat/warehouse/store/history/HistoryDataReader.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.apache.hertzbeat.common.entity.dto.Value;
2323

2424
/**
25-
*
25+
* history data reader
2626
*/
2727
public interface HistoryDataReader {
2828

warehouse/src/main/java/org/apache/hertzbeat/warehouse/store/history/HistoryDataWriter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.apache.hertzbeat.common.entity.message.CollectRep;
2121

2222
/**
23-
*
23+
* history data writer
2424
*/
2525
public interface HistoryDataWriter {
2626

warehouse/src/main/java/org/apache/hertzbeat/warehouse/store/history/vm/VictoriaMetricsClusterDataStorage.java

-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717

1818
package org.apache.hertzbeat.warehouse.store.history.vm;
1919

20-
2120
import com.fasterxml.jackson.databind.JsonNode;
2221
import java.math.BigDecimal;
2322
import java.math.RoundingMode;
@@ -59,7 +58,6 @@
5958
import org.springframework.web.client.RestTemplate;
6059
import org.springframework.web.util.UriComponentsBuilder;
6160

62-
6361
/**
6462
* tdengine data storage
6563
*/

warehouse/src/main/resources/META-INF/spring.factories

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@
1414
# limitations under the License.
1515

1616
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
17-
org.apache.hertzbeat.warehouse.WarehouseAutoConfiguration
17+
org.apache.hertzbeat.warehouse.WarehouseAutoConfiguration

warehouse/src/test/java/org/apache/hertzbeat/warehouse/store/MemoryDataStorageTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ void getCurrentMetricsData() {
3737
@Test
3838
void destroy() {
3939
}
40-
}
40+
}

warehouse/src/test/java/org/apache/hertzbeat/warehouse/store/MetricsDataRedisCodecTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ void encodeKey() {
4545
@Test
4646
void encodeValue() {
4747
}
48-
}
48+
}

warehouse/src/test/java/org/apache/hertzbeat/warehouse/store/RedisDataStorageTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,4 @@ void getCurrentMetricsData() {
3737
@Test
3838
void destroy() {
3939
}
40-
}
40+
}

warehouse/src/test/java/org/apache/hertzbeat/warehouse/store/TdEngineDataStorageTest.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,4 @@ void getHistoryMetricData() {
4949
@Test
5050
void getHistoryIntervalMetricData() {
5151
}
52-
}
52+
}

0 commit comments

Comments
 (0)