yiguolei commented on code in PR #33690:
URL: https://github.com/apache/doris/pull/33690#discussion_r1686112265


##########
fe/fe-core/src/main/java/org/apache/doris/common/util/Counter.java:
##########
@@ -17,14 +17,45 @@
 
 package org.apache.doris.common.util;
 
+import org.apache.doris.common.io.Text;
+import org.apache.doris.persist.gson.GsonUtils;
 import org.apache.doris.thrift.TUnit;
 
+import com.google.gson.annotations.SerializedName;
+
+import java.io.DataInput;
+import java.io.DataOutput;
+import java.io.IOException;
+
 // Counter means indicators field. The counter's name is key, the counter 
itself is value.
 public class Counter {
+    @SerializedName(value = "value")
     private volatile long value;
+    @SerializedName(value = "type")
     private volatile int type;
+    @SerializedName(value = "level")
     private volatile long level;
 
+    public static Counter read(DataInput input) throws IOException {
+        return GsonUtils.GSON.fromJson(Text.readString(input), Counter.class);

Review Comment:
   构造函数
   static 方法
   普通方法
   hashCode,equals,toString



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to