healchow commented on code in PR #8301:
URL: https://github.com/apache/inlong/pull/8301#discussion_r1236701047


##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/consume/DisplayMessage.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * 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.inlong.manager.pojo.consume;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+
+/**
+ * Inlong display message info
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel("Inlong display message info")
+public class DisplayMessage {

Review Comment:
   `DisplayMessage` is weired, maybe call it `InlongMessage` or 
`BriefMQMessage` is more clear.



##########
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongStreamApi.java:
##########
@@ -73,4 +74,8 @@ Call<Response<InlongStreamInfo>> getStream(@Query("groupId") 
String groupId,
 
     @POST("stream/parseFields")
     Call<Response<List<StreamField>>> parseFields(@Body ParseFieldRequest 
parseFieldRequest);
+
+    @GET("stream/queryMessage")

Review Comment:
   The interface style is consistent, it is recommended to use `listMessages`.



##########
inlong-common/src/main/java/org/apache/inlong/common/enums/MessageWrapType.java:
##########
@@ -0,0 +1,55 @@
+/*
+ * 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.inlong.common.enums;
+
+/**
+ * Enum of inlong component type.
+ */
+public enum MessageWrapType {
+
+    NONE(0, "NONE"),

Review Comment:
   Can these constants be consistent with the constants used by modules such as 
Agent, DataProxy, and Sort?
   
   In order to facilitate management, it is recommended to use a global class.



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/queue/QueueResourceOperator.java:
##########
@@ -71,4 +76,10 @@ default void createQueueForStream(InlongGroupInfo groupInfo, 
InlongStreamInfo st
     default void deleteQueueForStream(InlongGroupInfo groupInfo, 
InlongStreamInfo streamInfo, String operator) {
     }
 
+    default List<DisplayMessage> queryLastestMessage(InlongGroupInfo 
groupInfo, InlongStreamInfo streamInfo,
+            Integer messageNumber)

Review Comment:
   `queryMessage` is enough, and does the `messageNumber` mean `messageCount`?
   
   Please add more javadoc for the method under the interface, thanks.



##########
inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/consts/InlongConstants.java:
##########
@@ -183,4 +183,10 @@ public class InlongConstants {
      */
     public static final String BATCH_PARSING_FILED_JSON_COMMENT_PROP = "desc";
 
+    private static final int COMPRESS_TYPE_NONE = 0;

Review Comment:
   ditto



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to