kipshi commented on code in PR #3525:
URL: https://github.com/apache/incubator-inlong/pull/3525#discussion_r845165339


##########
inlong-manager/manager-client-tools/src/main/java/org/apache/inlong/manager/client/cli/CommandList.java:
##########
@@ -0,0 +1,143 @@
+/*
+ * 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.client.cli;
+
+import com.beust.jcommander.Parameter;
+import com.beust.jcommander.Parameters;
+import com.github.pagehelper.PageInfo;
+import org.apache.inlong.manager.client.api.inner.InnerInlongManagerClient;
+import org.apache.inlong.manager.common.pojo.group.InlongGroupListResponse;
+import org.apache.inlong.manager.common.pojo.sink.SinkListResponse;
+import org.apache.inlong.manager.common.pojo.source.SourceListResponse;
+import org.apache.inlong.manager.common.pojo.stream.FullStreamResponse;
+
+import java.util.List;
+
+@Parameters(commandDescription = "Displays main information for one or more 
resources.")
+public class CommandList extends CommandBase {
+
+    public CommandList() {
+        super("list");
+        jcommander.addCommand("stream", new CommandList.ListStream());
+        jcommander.addCommand("group", new CommandList.ListGroup());
+        jcommander.addCommand("sink", new CommandList.ListSink());
+        jcommander.addCommand("source", new CommandList.ListSource());
+    }
+
+    @Parameter()
+    private java.util.List<String> params;
+
+    @Parameters(commandDescription = "Get stream main information")
+    private class ListStream extends CommandUtil {
+
+        @Parameter()
+        private java.util.List<String> params;
+
+        @Parameter(names = {"-g", "--group"}, required = true, description = 
"Get stream main information by group id.")
+        private String groupId;
+
+        @Override
+        void run() {
+            InnerInlongManagerClient managerClient = connect();
+            try {
+                List<FullStreamResponse> fullStreamResponseList = 
managerClient.listStreamInfo(groupId);
+                print(fullStreamResponseList, FullStreamResponse.class);
+            } catch (Exception e) {
+                System.out.println(e.getMessage());
+            }
+        }
+    }
+
+    @Parameters(commandDescription = "Get group details")
+    private class ListGroup extends CommandUtil {
+
+        @Parameter()
+        private java.util.List<String> params;
+
+        @Parameter(names = {"-s", "--status"})

Review Comment:
   status must be more abstract, such as INIT, FAIL, rather than int enum



-- 
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