nizhikov commented on a change in pull request #8284:
URL: https://github.com/apache/ignite/pull/8284#discussion_r498668776



##########
File path: 
modules/control-utility/src/main/java/org/apache/ignite/internal/commandline/TablePrinter.java
##########
@@ -0,0 +1,149 @@
+/*
+ * 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.ignite.internal.commandline;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.logging.Logger;
+import java.util.stream.Collectors;
+import org.apache.ignite.util.SimpleType;
+
+import static java.util.Collections.nCopies;
+import static org.apache.ignite.util.SimpleType.DATE;
+import static org.apache.ignite.util.SimpleType.NUMBER;
+import static org.apache.ignite.util.SimpleType.STRING;
+
+/** Represents utility class for table content printing. */
+public class TablePrinter {
+    /** Column separator. */
+    public static final String COLUMN_SEPARATOR = "    ";
+
+    /** Titles of the table columns. */
+    private final List<String> titles;
+
+    /** Types of the table columns. */
+    private final List<SimpleType> types;
+
+    /** Number of table columns. */
+    private final int colsCnt;
+
+    /**
+     * @param titles Titles of the table columns. Number of titles determines 
the number of columns in table.
+     * @param types  Types of the table columns.
+     */
+    public TablePrinter(List<String> titles, List<SimpleType> types) {

Review comment:
       Le'ts just make static method in `SystemViewCommand` and use it in the 
`MetricCommand`.




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

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


Reply via email to