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

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


The following commit(s) were added to refs/heads/master by this push:
     new 509c3954382 Remove unused Airline dependency (#19216)
509c3954382 is described below

commit 509c39543828d084623cb455f38293a509f50328
Author: Haonan <[email protected]>
AuthorDate: Wed Nov 11 12:33:42 2026 +0800

    Remove unused Airline dependency (#19216)
---
 LICENSE-binary                                     |  1 -
 dependencies.json                                  |  1 -
 iotdb-core/datanode/pom.xml                        |  4 --
 .../apache/iotdb/db/i18n/DataNodeMiscMessages.java |  9 ----
 .../apache/iotdb/db/i18n/DataNodeMiscMessages.java |  9 ----
 .../org/apache/iotdb/db/utils/CommonUtils.java     | 62 ----------------------
 pom.xml                                            | 13 -----
 7 files changed, 99 deletions(-)

diff --git a/LICENSE-binary b/LICENSE-binary
index 8d4d7eb1e2b..83fd51f6e24 100644
--- a/LICENSE-binary
+++ b/LICENSE-binary
@@ -238,7 +238,6 @@ com.google.j2objc:j2objc-annotations:2.8
 com.zaxxer:HikariCP:2.4.7
 commons-cli:commons-cli:1.5.0
 commons-codec:commons-codec:1.16.1
-io.airlift:airline:0.9
 io.airlift:units:1.7
 io.dropwizard.metrics:metrics-core:4.2.19
 io.micrometer:micrometer-commons:1.11.4
diff --git a/dependencies.json b/dependencies.json
index 5977c12dfbc..609615c8a3f 100644
--- a/dependencies.json
+++ b/dependencies.json
@@ -30,7 +30,6 @@
         "commons-cli:commons-cli",
         "commons-codec:commons-codec",
         "commons-logging:commons-logging",
-        "io.airlift:airline",
         "io.airlift:units",
         "io.dropwizard.metrics:metrics-core",
         "io.github.classgraph:classgraph",
diff --git a/iotdb-core/datanode/pom.xml b/iotdb-core/datanode/pom.xml
index 16368a3a6ae..2dad06d8ba7 100644
--- a/iotdb-core/datanode/pom.xml
+++ b/iotdb-core/datanode/pom.xml
@@ -203,10 +203,6 @@
             <groupId>org.antlr</groupId>
             <artifactId>antlr4-runtime</artifactId>
         </dependency>
-        <dependency>
-            <groupId>io.airlift</groupId>
-            <artifactId>airline</artifactId>
-        </dependency>
         <dependency>
             <groupId>commons-cli</groupId>
             <artifactId>commons-cli</artifactId>
diff --git 
a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
 
b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
index c19b950208a..e731b7ad978 100644
--- 
a/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
+++ 
b/iotdb-core/datanode/src/main/i18n/en/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
@@ -1642,15 +1642,6 @@ public final class DataNodeMiscMessages {
           "Request name: TSFastLastDataQueryForOneDeviceReq, db: %s, deviceId: 
%s, sensorSize: %s,"
               + " sensors: %s";
 
-  public static final String LOG_NODE_TOOL_ARG_076E307A = "node-tool: %s";
-
-  public static final String 
LOG_SEE_NODE_TOOL_HELP_OR_NODE_TOOL_HELP_COMMAND_BB9F5146 =
-      "See 'node-tool help' or 'node-tool help <command>'.";
-
-  public static final String LOG_ERROR_ARG_76028BAA = "error: %s";
-
-  public static final String LOG_STACKTRACE_131CBB85 = "-- StackTrace --";
-
   public static final String
       
EXCEPTION_FAILED_TO_REGISTERED_TRIGGER_ARG_BECAUSE_EXISTED_MD5_OF_JAR_FILE_FOR_TRIGGER_ARG_IS_DIFFERENT_FROM_THE_NEW_JAR_FILE_4069F2F9
 =
           "Failed to registered trigger %s, because existed md5 of jar file 
for trigger %s is"
diff --git 
a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
 
b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
index 93384a3296e..efd55af5806 100644
--- 
a/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
+++ 
b/iotdb-core/datanode/src/main/i18n/zh/org/apache/iotdb/db/i18n/DataNodeMiscMessages.java
@@ -1620,15 +1620,6 @@ public final class DataNodeMiscMessages {
       
EXCEPTION_REQUEST_NAME_TSFASTLASTDATAQUERYFORONEDEVICEREQ_DB_ARG_DEVICEID_ARG_SENSORSIZE_ARG_SENSORS_ARG_D1F9A498
 =
           
"请求名称:TSFastLastDataQueryForOneDeviceReq,数据库:%s,deviceId:%s,传感器数:%s,传感器:%s";
 
-  public static final String LOG_NODE_TOOL_ARG_076E307A = "node-tool:%s";
-
-  public static final String 
LOG_SEE_NODE_TOOL_HELP_OR_NODE_TOOL_HELP_COMMAND_BB9F5146 =
-      "参见 'node-tool help' 或 'node-tool help <command>'。";
-
-  public static final String LOG_ERROR_ARG_76028BAA = "错误:%s";
-
-  public static final String LOG_STACKTRACE_131CBB85 = "-- 堆栈跟踪 --";
-
   public static final String
       
EXCEPTION_FAILED_TO_REGISTERED_TRIGGER_ARG_BECAUSE_EXISTED_MD5_OF_JAR_FILE_FOR_TRIGGER_ARG_IS_DIFFERENT_FROM_THE_NEW_JAR_FILE_4069F2F9
 =
           "注册触发器 %s 失败,因为触发器 %s 已有的 jar 文件 md5 与新 jar 文件不同。 ";
diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java
index 70fd9cd01a5..d562105db22 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/utils/CommonUtils.java
@@ -40,16 +40,6 @@ import org.apache.iotdb.service.rpc.thrift.TSFetchResultsReq;
 import org.apache.iotdb.service.rpc.thrift.TSLastDataQueryReq;
 import org.apache.iotdb.service.rpc.thrift.TSRawDataQueryReq;
 
-import com.google.common.base.Throwables;
-import io.airlift.airline.Cli;
-import io.airlift.airline.Help;
-import io.airlift.airline.ParseArgumentsMissingException;
-import io.airlift.airline.ParseArgumentsUnexpectedException;
-import io.airlift.airline.ParseCommandMissingException;
-import io.airlift.airline.ParseCommandUnrecognizedException;
-import io.airlift.airline.ParseOptionConversionException;
-import io.airlift.airline.ParseOptionMissingException;
-import io.airlift.airline.ParseOptionMissingValueException;
 import org.apache.tsfile.block.column.Column;
 import org.apache.tsfile.enums.TSDataType;
 import org.apache.tsfile.external.commons.lang3.StringUtils;
@@ -59,13 +49,10 @@ import 
org.apache.tsfile.read.common.block.column.TimeColumn;
 import org.apache.tsfile.read.common.type.Type;
 
 import java.time.ZoneId;
-import java.util.List;
-import java.util.Objects;
 import java.util.concurrent.TimeUnit;
 
 import static 
org.apache.iotdb.db.utils.TypeServices.ValueConversion.VALUE_PARSER_SERVICE;
 
-@SuppressWarnings("java:S106") // for console outputs
 public class CommonUtils {
 
   private static final int MAX_SLOW_NATIVE_API_OUTPUT_NUM = 10;
@@ -211,39 +198,6 @@ public class CommonUtils {
         req.getSensors());
   }
 
-  public static int runCli(
-      List<Class<? extends Runnable>> commands,
-      String[] args,
-      String cliName,
-      String cliDescription) {
-    Cli.CliBuilder<Runnable> builder = Cli.builder(cliName);
-
-    
builder.withDescription(cliDescription).withDefaultCommand(Help.class).withCommands(commands);
-
-    Cli<Runnable> parser = builder.build();
-
-    int status = 0;
-    try {
-      Runnable parse = parser.parse(args);
-      parse.run();
-    } catch (IllegalArgumentException
-        | IllegalStateException
-        | ParseArgumentsMissingException
-        | ParseArgumentsUnexpectedException
-        | ParseOptionConversionException
-        | ParseOptionMissingException
-        | ParseOptionMissingValueException
-        | ParseCommandMissingException
-        | ParseCommandUnrecognizedException e) {
-      badUse(e);
-      status = 1;
-    } catch (Exception e) {
-      err(Throwables.getRootCause(e));
-      status = 2;
-    }
-    return status;
-  }
-
   /**
    * Converts a string into a byte array based on the encoding format (hex or 
escape).
    *
@@ -260,22 +214,6 @@ public class CommonUtils {
     }
   }
 
-  private static void badUse(Exception e) {
-    System.out.println(
-        String.format(
-            DataNodeMiscMessages.LOG_NODE_TOOL_ARG_076E307A, 
Objects.toString(e.getMessage())));
-    System.out.println(
-        
DataNodeMiscMessages.LOG_SEE_NODE_TOOL_HELP_OR_NODE_TOOL_HELP_COMMAND_BB9F5146);
-  }
-
-  private static void err(Throwable e) {
-    System.err.println(
-        String.format(
-            DataNodeMiscMessages.LOG_ERROR_ARG_76028BAA, 
Objects.toString(e.getMessage())));
-    System.err.println(DataNodeMiscMessages.LOG_STACKTRACE_131CBB85);
-    System.err.println(Throwables.getStackTraceAsString(e));
-  }
-
   public static String[] deviceIdToStringArray(IDeviceID deviceID) {
     String[] ret = new String[deviceID.segmentNum()];
     for (int i = 0; i < ret.length; i++) {
diff --git a/pom.xml b/pom.xml
index 76e4c86fe42..9d72706f267 100644
--- a/pom.xml
+++ b/pom.xml
@@ -54,7 +54,6 @@
         <airlift-units.version>1.7</airlift-units.version>
         <airlift.version>206</airlift.version>
         <!--airlift-stats.version>235</airlift-stats.version-->
-        <airline.version>0.9</airline.version>
         <antlr4.version>4.13.2</antlr4.version>
         <!-- By default, the argLine is empty-->
         <argLine/>
@@ -354,18 +353,6 @@
                 <artifactId>units</artifactId>
                 <version>${airlift-units.version}</version>
             </dependency>
-            <!-- TODO: Deprecated: Use Airline 2 or Picocli instead -->
-            <dependency>
-                <groupId>io.airlift</groupId>
-                <artifactId>airline</artifactId>
-                <version>${airline.version}</version>
-                <exclusions>
-                    <exclusion>
-                        <groupId>javax.inject</groupId>
-                        <artifactId>javax.inject</artifactId>
-                    </exclusion>
-                </exclusions>
-            </dependency>
             <dependency>
                 <groupId>org.reflections</groupId>
                 <artifactId>reflections</artifactId>

Reply via email to