You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2023/03/27 05:42:24 UTC

[iotdb] branch jira5731 created (now 2e0c1dd7c6)

This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a change to branch jira5731
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 2e0c1dd7c6 finish

This branch includes the following new commits:

     new 2e0c1dd7c6 finish

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: finish

Posted by ta...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tanxinyu pushed a commit to branch jira5731
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 2e0c1dd7c6c106fe1921ae9352d2396ac9c6880e
Author: OneSizeFitQuorum <ta...@apache.org>
AuthorDate: Mon Mar 27 13:42:10 2023 +0800

    finish
    
    Signed-off-by: OneSizeFitQuorum <ta...@apache.org>
---
 cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java | 17 ++++++++++-------
 cli/src/main/java/org/apache/iotdb/cli/Cli.java         |  2 +-
 .../org/apache/iotdb/commons/conf/IoTDBConstant.java    |  8 ++++++++
 .../db/service/thrift/impl/ClientRPCServiceImpl.java    |  1 +
 thrift/src/main/thrift/client.thrift                    |  5 +++--
 5 files changed, 23 insertions(+), 10 deletions(-)

diff --git a/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java b/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
index 74161ffcb3..fdac8cb892 100644
--- a/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
+++ b/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java
@@ -341,14 +341,17 @@ public abstract class AbstractCli {
     }
   }
 
-  static void displayLogo(String version, String buildInfo) {
+  static void displayLogo(String logo, String version, String buildInfo) {
     println(
-        " _____       _________  ______   ______    \n"
-            + "|_   _|     |  _   _  ||_   _ `.|_   _ \\   \n"
-            + "  | |   .--.|_/ | | \\_|  | | `. \\ | |_) |  \n"
-            + "  | | / .'`\\ \\  | |      | |  | | |  __'.  \n"
-            + " _| |_| \\__. | _| |_    _| |_.' /_| |__) | \n"
-            + "|_____|'.__.' |_____|  |______.'|_______/  version "
+        (logo != null
+                ? logo
+                : (" _____       _________  ______   ______    \n"
+                    + "|_   _|     |  _   _  ||_   _ `.|_   _ \\   \n"
+                    + "  | |   .--.|_/ | | \\_|  | | `. \\ | |_) |  \n"
+                    + "  | | / .'`\\ \\  | |      | |  | | |  __'.  \n"
+                    + " _| |_| \\__. | _| |_    _| |_.' /_| |__) | \n"
+                    + "|_____|'.__.' |_____|  |______.'|_______/  "))
+            + "version "
             + version
             + " (Build: "
             + (buildInfo != null ? buildInfo : "UNKNOWN")
diff --git a/cli/src/main/java/org/apache/iotdb/cli/Cli.java b/cli/src/main/java/org/apache/iotdb/cli/Cli.java
index 5c663b3897..eed94eefb5 100644
--- a/cli/src/main/java/org/apache/iotdb/cli/Cli.java
+++ b/cli/src/main/java/org/apache/iotdb/cli/Cli.java
@@ -170,7 +170,7 @@ public class Cli extends AbstractCli {
       timestampPrecision = properties.getTimestampPrecision();
 
       echoStarting();
-      displayLogo(properties.getVersion(), properties.getBuildInfo());
+      displayLogo(properties.getLogo(), properties.getVersion(), properties.getBuildInfo());
       println(String.format("Successfully login at %s:%s", host, port));
       while (true) {
         try {
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java b/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
index 293913aa8a..37321694d2 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/conf/IoTDBConstant.java
@@ -71,6 +71,14 @@ public class IoTDBConstant {
 
   public static final String CLUSTER_NAME = "cluster_name";
   public static final String DEFAULT_CLUSTER_NAME = "defaultCluster";
+  public static final String LOGO =
+      ""
+          + " _____       _________  ______   ______    \n"
+          + "|_   _|     |  _   _  ||_   _ `.|_   _ \\   \n"
+          + "  | |   .--.|_/ | | \\_|  | | `. \\ | |_) |  \n"
+          + "  | | / .'`\\ \\  | |      | |  | | |  __'.  \n"
+          + " _| |_| \\__. | _| |_    _| |_.' /_| |__) | \n"
+          + "|_____|'.__.' |_____|  |______.'|_______/  ";
 
   // when running the program in IDE, we can not get the version info using
   // getImplementationVersion()
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index 2d56e0719c..e06d03ea76 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -628,6 +628,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
   public ServerProperties getProperties() {
     ServerProperties properties = new ServerProperties();
     properties.setVersion(IoTDBConstant.VERSION);
+    properties.setLogo(IoTDBConstant.LOGO);
     properties.setBuildInfo(IoTDBConstant.BUILD_INFO);
     LOGGER.info("IoTDB server version: {}", IoTDBConstant.VERSION_WITH_BUILD);
     properties.setSupportedTimeAggregationOperations(new ArrayList<>());
diff --git a/thrift/src/main/thrift/client.thrift b/thrift/src/main/thrift/client.thrift
index 09ed33ac53..2b58daff0f 100644
--- a/thrift/src/main/thrift/client.thrift
+++ b/thrift/src/main/thrift/client.thrift
@@ -371,8 +371,9 @@ struct ServerProperties {
   7: optional i32 watermarkParamMarkRate;
   8: optional i32 watermarkParamMaxRightBit;
   9: optional i32 thriftMaxFrameSize;
-  10:optional bool isReadOnly;
-  11:optional string buildInfo;
+  10: optional bool isReadOnly;
+  11: optional string buildInfo;
+  12: optional string logo;
 }
 
 struct TSSetSchemaTemplateReq {