Abyss-lord commented on code in PR #6461:
URL: https://github.com/apache/gravitino/pull/6461#discussion_r1960903482


##########
clients/cli/src/main/java/org/apache/gravitino/cli/outputs/BaseOutputFormat.java:
##########
@@ -0,0 +1,99 @@
+/*
+ * 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.gravitino.cli.outputs;
+
+import com.google.common.base.Preconditions;
+import java.io.BufferedOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.UncheckedIOException;
+import java.nio.charset.StandardCharsets;
+import org.apache.gravitino.cli.CommandContext;
+
+/**
+ * Abstract base implementation of {@link OutputFormat} interface providing 
common functionality for
+ * various output format implementations. This class handles basic output 
operations and provides
+ * configurable behavior for quiet mode, output limiting.
+ */
+public abstract class BaseOutputFormat<T> implements OutputFormat<T> {
+  protected int limit;
+  protected CommandContext context;
+
+  /**
+   * Creates a new {@link BaseOutputFormat} with specified configuration.
+   *
+   * @param context the command context, must not be null;
+   */
+  public BaseOutputFormat(CommandContext context) {
+    Preconditions.checkNotNull(context, "CommandContext cannot be null");
+    this.context = context;
+    this.limit = context.outputLimit();

Review Comment:
   I am worried that too many schemas or tables will affect the display
   



-- 
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...@gravitino.apache.org

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

Reply via email to