iotdb icon indicating copy to clipboard operation
iotdb copied to clipboard

Define a constant instead of duplicating this literal "total" 8 times.

Open AuroraLiu0823 opened this issue 3 years ago • 5 comments

Code Path:confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManagerMetrics.java 1660630501280 Duplicated string literals make the process of refactoring error-prone, since you must be sure to update all occurrences. On the other hand, constants can be referenced from many places, but only need to be updated in a single place.

AuroraLiu0823 avatar Aug 16 '22 06:08 AuroraLiu0823

Hi, this is your first issue in IoTDB project. Thanks for your report. Welcome to join the community!

github-actions[bot] avatar Aug 16 '22 06:08 github-actions[bot]

Has this issue been fixed? 'total' seems to be defined as METRIC_STATUS_ONELINE

try-agaaain avatar Oct 25 '22 12:10 try-agaaain

Has this issue been fixed? 'total' seems to be defined as METRIC_STATUS_ONELINE

i have seen too,it seems that is : METRIC_TAG_TOTAL

auula avatar Oct 25 '22 12:10 auula

So this issue can be closed?

try-agaaain avatar Oct 25 '22 13:10 try-agaaain

The current requirement seems fine, I additionally changed the other strings to constants #7835 .

auula avatar Oct 31 '22 15:10 auula