You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by ca...@apache.org on 2022/08/11 06:52:05 UTC

[incubator-linkis] branch dev-1.2.1 updated: Add an engineconn-plugin for Trino (#2639)

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

casion pushed a commit to branch dev-1.2.1
in repository https://gitbox.apache.org/repos/asf/incubator-linkis.git


The following commit(s) were added to refs/heads/dev-1.2.1 by this push:
     new 36f3b56b6 Add an engineconn-plugin for Trino (#2639)
36f3b56b6 is described below

commit 36f3b56b618f5736814d8b6256d25ec792b781de
Author: Knypys <si...@qq.com>
AuthorDate: Thu Aug 11 14:52:00 2022 +0800

    Add an engineconn-plugin for Trino (#2639)
    
    * add linkis-engineconn-plugin for trino
    
    * fix sql import
    
    * change default value
    
    Co-authored-by: Casion <ca...@gmail.com>
---
 docs/info-1.2.1.md                                 |  18 +
 .../ujes/client/request/JobExecuteAction.scala     |   8 +
 .../linkis/ujes/client/utils/UJESClientUtils.scala |   2 +
 .../release-docs/licenses/LICENSE-failsafe.txt     | 177 +++++++++
 .../release-docs/licenses/LICENSE-trino-client.txt | 202 ++++++++++
 .../release-docs/licenses/LICENSE-units.txt        | 202 ++++++++++
 linkis-engineconn-plugins/pom.xml                  |   1 +
 linkis-engineconn-plugins/trino/pom.xml            | 131 +++++++
 .../trino/src/main/assembly/distribution.xml       |  72 ++++
 .../trino/interceptor/PasswordInterceptor.java     |  56 +++
 .../trino/password/CommandPasswordCallback.java    |  74 ++++
 .../trino/password/StaticPasswordCallback.java     |  39 ++
 .../trino/socket/SocketChannelSocketFactory.java   |  58 +++
 .../main/resources/linkis-engineconn.properties    |  22 ++
 .../trino/src/main/resources/log4j2.xml            |  75 ++++
 .../engineplugin/trino/TrinoEngineConnPlugin.scala |  70 ++++
 .../TrinoProcessEngineConnLaunchBuilder.scala      |  32 ++
 .../trino/conf/TrinoConfiguration.scala            |  55 +++
 .../trino/conf/TrinoEngineConfig.scala             |  37 ++
 .../trino/exception/TrinoException.scala           |  30 ++
 .../trino/executor/TrinoEngineConnExecutor.scala   | 405 +++++++++++++++++++++
 .../trino/factory/TrinoEngineConnFactory.scala     |  40 ++
 .../engineplugin/trino/utils/TrinoCode.scala       |  44 +++
 tool/dependencies/known-dependencies.txt           |   3 +
 24 files changed, 1853 insertions(+)

diff --git a/docs/info-1.2.1.md b/docs/info-1.2.1.md
index 70451d4c9..e2da12446 100644
--- a/docs/info-1.2.1.md
+++ b/docs/info-1.2.1.md
@@ -4,8 +4,26 @@
 | 模块名(服务名)| 类型  |     参数名                                                | 默认值             | 描述                                                    |
 | ----------- | ----- | -------------------------------------------------------- | ---------------- | ------------------------------------------------------- |
 |ps-metadataquery | 新增  |   wds.linkis.server.mdq.mysql.relationship    | oracle,kingbase,postgresql,sqlserver,db2,greenplum,dm,mysql | 在mysql元数据服务兼容oracle,kingbase,postgresql,sqlserver,db2,greenplum,dm,驱动外部引入 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.default.limit    | 5000 | Trino查询的结果集返回条数限制 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.http.connectTimeout    | 60 | 连接Trino服务器的超时时间 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.http.readTimeout    | 60 | 等待Trino服务器返回数据的超时时间 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.resultSet.cache.max    | 512k | Trino结果集缓冲区大小 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.url    | http://127.0.0.1:8080 | Trino服务器URL |
+|cg-engineplugin | 新增  |   wds.linkis.trino.user    | null | 用于连接Trino查询服务的用户名 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.password    | null | 用于连接Trino查询服务的密码 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.passwordCmd    | null | 用于连接Trino查询服务的密码回调命令 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.catalog    | system | 连接Trino查询时使用的catalog |
+|cg-engineplugin | 新增  |   wds.linkis.trino.schema    |  | 连接Trino查询服务的默认schema |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.insecured    | false | 是否忽略服务器的SSL证书 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.keystore    | null | keystore路径 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.keystore.type    | null | keystore类型 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.keystore.password    | null | keystore密码 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.truststore    | null | truststore路径 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.truststore.type    | null | truststore类型 |
+|cg-engineplugin | 新增  |   wds.linkis.trino.ssl.truststore.password    | null | truststore密码 |
 
 ## 特性说明
 | 模块名(服务名)| 类型   | 特性                                                    |
 | ----------- | ---------------- | ------------------------------------------------------- |
 |linkis-metadata-query-service-mysql | 新增  |  基于mysql 模块融合dm,greenplum,kingbase,oracle,postgres,sqlserver ,协议和sql 区分开,metadata-query 反射多个数据源,基于mysql模块扩展,融合为一个模块。|
+|linkis-engineconn-plugins-trino | 新增  |  基于trino-client实现的Trino查询引擎。|
diff --git a/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/JobExecuteAction.scala b/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/JobExecuteAction.scala
index 631f6833d..3a793ad30 100644
--- a/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/JobExecuteAction.scala
+++ b/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/request/JobExecuteAction.scala
@@ -220,5 +220,13 @@ object JobExecuteAction {
       }
       override def getDefaultRunType: RunType = PSQL
     }
+
+    val TRINO = new EngineType {
+      override val toString: String = "trino"
+      val TSQL = new RunType {
+        override val toString: String = "tsql"
+      }
+      override def getDefaultRunType: RunType = TSQL
+    }
   }
 }
diff --git a/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/utils/UJESClientUtils.scala b/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/utils/UJESClientUtils.scala
index 34b5e8521..31c7428fd 100644
--- a/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/utils/UJESClientUtils.scala
+++ b/linkis-computation-governance/linkis-client/linkis-computation-client/src/main/scala/org/apache/linkis/ujes/client/utils/UJESClientUtils.scala
@@ -25,6 +25,7 @@ object UJESClientUtils {
     case "hive" => EngineType.HIVE
     case "shell" => EngineType.SHELL
     case "python" => EngineType.PYTHON
+    case "trino" => EngineType.TRINO
     case _ => EngineType.SPARK
   }
 
@@ -42,6 +43,7 @@ object UJESClientUtils {
     case "hql" => EngineType.HIVE.HQL
     case "shell" => EngineType.SHELL.SH
     case "python" => EngineType.PYTHON.PY
+    case "tsql" => EngineType.TRINO.TSQL
     case _ => EngineType.SPARK.SQL
   }
 
diff --git a/linkis-dist/release-docs/licenses/LICENSE-failsafe.txt b/linkis-dist/release-docs/licenses/LICENSE-failsafe.txt
new file mode 100644
index 000000000..51910cf0b
--- /dev/null
+++ b/linkis-dist/release-docs/licenses/LICENSE-failsafe.txt
@@ -0,0 +1,177 @@
+Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
diff --git a/linkis-dist/release-docs/licenses/LICENSE-trino-client.txt b/linkis-dist/release-docs/licenses/LICENSE-trino-client.txt
new file mode 100644
index 000000000..8f71f43fe
--- /dev/null
+++ b/linkis-dist/release-docs/licenses/LICENSE-trino-client.txt
@@ -0,0 +1,202 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed 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.
+
diff --git a/linkis-dist/release-docs/licenses/LICENSE-units.txt b/linkis-dist/release-docs/licenses/LICENSE-units.txt
new file mode 100644
index 000000000..8f71f43fe
--- /dev/null
+++ b/linkis-dist/release-docs/licenses/LICENSE-units.txt
@@ -0,0 +1,202 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "{}"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright {yyyy} {name of copyright owner}
+
+   Licensed 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.
+
diff --git a/linkis-engineconn-plugins/pom.xml b/linkis-engineconn-plugins/pom.xml
index 7beacd993..0f1a38f72 100644
--- a/linkis-engineconn-plugins/pom.xml
+++ b/linkis-engineconn-plugins/pom.xml
@@ -41,6 +41,7 @@
         <module>flink</module>
         <module>sqoop</module>
         <module>presto</module>
+        <module>trino</module>
         <module>elasticsearch</module>
     </modules>
 
diff --git a/linkis-engineconn-plugins/trino/pom.xml b/linkis-engineconn-plugins/trino/pom.xml
new file mode 100644
index 000000000..5d1dcec65
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/pom.xml
@@ -0,0 +1,131 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+  
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>linkis</artifactId>
+        <groupId>org.apache.linkis</groupId>
+        <version>1.2.0</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>linkis-engineplugin-trino</artifactId>
+    <properties>
+        <trino.version>371</trino.version>
+    </properties>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.linkis</groupId>
+            <artifactId>linkis-engineconn-plugin-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.linkis</groupId>
+            <artifactId>linkis-computation-engineconn</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.linkis</groupId>
+            <artifactId>linkis-storage</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.linkis</groupId>
+            <artifactId>linkis-common</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.linkis</groupId>
+            <artifactId>linkis-rpc</artifactId>
+            <version>${project.version}</version>
+            <scope>provided</scope>
+        </dependency>
+
+        <!-- trino -->
+        <dependency>
+            <groupId>io.trino</groupId>
+            <artifactId>trino-client</artifactId>
+            <version>${trino.version}</version>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-deploy-plugin</artifactId>
+            </plugin>
+
+            <plugin>
+                <groupId>net.alchim31.maven</groupId>
+                <artifactId>scala-maven-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-jar-plugin</artifactId>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-assembly-plugin</artifactId>
+                <version>3.2.0</version>
+                <inherited>false</inherited>
+                <executions>
+                    <execution>
+                        <id>make-assembly</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>single</goal>
+                        </goals>
+                        <configuration>
+                            <descriptors>
+                                <descriptor>src/main/assembly/distribution.xml</descriptor>
+                            </descriptors>
+                        </configuration>
+                    </execution>
+                </executions>
+                <configuration>
+                    <skipAssembly>false</skipAssembly>
+                    <finalName>out</finalName>
+                    <appendAssemblyId>false</appendAssemblyId>
+                    <attach>false</attach>
+                    <descriptors>
+                        <descriptor>src/main/assembly/distribution.xml</descriptor>
+                    </descriptors>
+                </configuration>
+            </plugin>
+        </plugins>
+        <resources>
+            <resource>
+                <directory>${basedir}/src/main/resources</directory>
+                <includes>
+                    <include>**/*.properties</include>
+                    <include>**/*.xml</include>
+                    <include>**/*.yml</include>
+                </includes>
+            </resource>
+        </resources>
+        <finalName>${project.artifactId}-${project.version}</finalName>
+    </build>
+</project>
diff --git a/linkis-engineconn-plugins/trino/src/main/assembly/distribution.xml b/linkis-engineconn-plugins/trino/src/main/assembly/distribution.xml
new file mode 100644
index 000000000..6ff60eb3d
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/assembly/distribution.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+
+<assembly
+        xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3"
+        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+        xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/2.3 http://maven.apache.org/xsd/assembly-1.1.2.xsd">
+    <id>linkis-manager-enginePlugin-trino</id>
+    <formats>
+        <format>dir</format>
+        <format>zip</format>
+    </formats>
+    <includeBaseDirectory>true</includeBaseDirectory>
+    <baseDirectory>trino</baseDirectory>
+
+    <dependencySets>
+        <dependencySet>
+            <!-- Enable access to all projects in the current multimodule build! <useAllReactorProjects>true</useAllReactorProjects> -->
+            <!-- Now, select which projects to include in this module-set. -->
+            <outputDirectory>/dist/v${trino.version}/lib</outputDirectory>
+            <useProjectArtifact>true</useProjectArtifact>
+            <useTransitiveDependencies>true</useTransitiveDependencies>
+            <unpack>false</unpack>
+            <useStrictFiltering>false</useStrictFiltering>
+            <useTransitiveFiltering>true</useTransitiveFiltering>
+
+        </dependencySet>
+    </dependencySets>
+
+    <fileSets>
+        <fileSet>
+            <directory>${basedir}/src/main/resources</directory>
+            <includes>
+                <include>linkis-engineconn.properties</include>
+                <include>log4j2.xml</include>
+            </includes>
+            <fileMode>0777</fileMode>
+            <outputDirectory>/dist/v${trino.version}/conf</outputDirectory>
+            <lineEnding>unix</lineEnding>
+        </fileSet>
+
+        <fileSet>
+            <directory>${basedir}/target</directory>
+            <includes>
+                <include>*.jar</include>
+            </includes>
+            <excludes>
+                <exclude>*doc.jar</exclude>
+            </excludes>
+            <fileMode>0777</fileMode>
+            <outputDirectory>/plugin/${trino.version}</outputDirectory>
+        </fileSet>
+
+    </fileSets>
+
+</assembly>
+
diff --git a/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/interceptor/PasswordInterceptor.java b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/interceptor/PasswordInterceptor.java
new file mode 100644
index 000000000..73c58d908
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/interceptor/PasswordInterceptor.java
@@ -0,0 +1,56 @@
+/*
+ * 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.linkis.engineplugin.trino.interceptor;
+
+import javax.security.auth.callback.PasswordCallback;
+
+import okhttp3.Credentials;
+import okhttp3.Interceptor;
+import okhttp3.Response;
+
+import java.io.IOException;
+
+import static com.google.common.net.HttpHeaders.AUTHORIZATION;
+
+public class PasswordInterceptor implements Interceptor {
+    private final String user;
+    private final PasswordCallback callback;
+    private volatile String credentials = null;
+    private volatile long expiredTimestamp = 0;
+
+    public PasswordInterceptor(String user, PasswordCallback callback) {
+        this.user = user;
+        this.callback = callback;
+    }
+
+    @Override
+    public Response intercept(Chain chain) throws IOException {
+        return chain.proceed(
+                chain.request().newBuilder().header(AUTHORIZATION, credentials()).build());
+    }
+
+    private synchronized String credentials() {
+        long timeMillis = System.currentTimeMillis();
+        if (credentials == null || timeMillis > expiredTimestamp) {
+            /* expired for 10 minutes */
+            expiredTimestamp = timeMillis + 600000L;
+            credentials = Credentials.basic(user, new String(callback.getPassword()));
+        }
+        return credentials;
+    }
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/password/CommandPasswordCallback.java b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/password/CommandPasswordCallback.java
new file mode 100644
index 000000000..bfab9585a
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/password/CommandPasswordCallback.java
@@ -0,0 +1,74 @@
+/*
+ * 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.linkis.engineplugin.trino.password;
+
+import org.apache.commons.io.IOUtils;
+
+import javax.security.auth.callback.PasswordCallback;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.charset.Charset;
+
+public class CommandPasswordCallback extends PasswordCallback {
+    private static final Charset CHARSET = Charset.defaultCharset();
+
+    public CommandPasswordCallback(String prompt) {
+        this(prompt, false);
+    }
+
+    public CommandPasswordCallback(String prompt, boolean echoOn) {
+        super(prompt, echoOn);
+    }
+
+    private static String string(InputStream inputStream) throws IOException {
+        try {
+            return IOUtils.toString(inputStream, CHARSET);
+        } finally {
+            inputStream.close();
+        }
+    }
+
+    private static char[] array(InputStream inputStream) throws IOException {
+        try {
+            return IOUtils.toCharArray(inputStream, CHARSET);
+        } finally {
+            inputStream.close();
+        }
+    }
+
+    @Override
+    public char[] getPassword() {
+        Process process = null;
+        String prompt = getPrompt();
+        try {
+            process = new ProcessBuilder().command(prompt).start();
+            int ret = process.waitFor();
+            if (ret != 0) throw new RuntimeException(string(process.getErrorStream()));
+            return array(process.getInputStream());
+        } catch (RuntimeException e) {
+            throw e;
+        } catch (Exception e) {
+            throw new RuntimeException("Failed to authenticate with command: " + prompt, e);
+        } finally {
+            if (process != null) {
+                process.destroy();
+            }
+        }
+    }
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/password/StaticPasswordCallback.java b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/password/StaticPasswordCallback.java
new file mode 100644
index 000000000..3222cfea5
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/password/StaticPasswordCallback.java
@@ -0,0 +1,39 @@
+/*
+ * 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.linkis.engineplugin.trino.password;
+
+import javax.security.auth.callback.PasswordCallback;
+
+public class StaticPasswordCallback extends PasswordCallback {
+    private final char[] password;
+
+    public StaticPasswordCallback(String prompt, boolean echoOn) {
+        super(prompt, echoOn);
+        this.password = prompt.toCharArray();
+    }
+
+    public StaticPasswordCallback(String prompt) {
+        super(prompt, false);
+        this.password = prompt.toCharArray();
+    }
+
+    @Override
+    public char[] getPassword() {
+        return password;
+    }
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/socket/SocketChannelSocketFactory.java b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/socket/SocketChannelSocketFactory.java
new file mode 100644
index 000000000..f72f27a58
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/java/org/apache/linkis/engineplugin/trino/socket/SocketChannelSocketFactory.java
@@ -0,0 +1,58 @@
+/*
+ * 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.linkis.engineplugin.trino.socket;
+
+import javax.net.SocketFactory;
+
+import java.io.IOException;
+import java.net.InetAddress;
+import java.net.InetSocketAddress;
+import java.net.Socket;
+import java.net.SocketException;
+import java.nio.channels.SocketChannel;
+
+public class SocketChannelSocketFactory extends SocketFactory {
+
+    @Override
+    public Socket createSocket() throws IOException {
+        return SocketChannel.open().socket();
+    }
+
+    @Override
+    public Socket createSocket(String host, int port) throws IOException {
+        return SocketChannel.open(new InetSocketAddress(host, port)).socket();
+    }
+
+    @Override
+    public Socket createSocket(String host, int port, InetAddress localAddress, int localPort)
+            throws IOException {
+        throw new SocketException("not supported");
+    }
+
+    @Override
+    public Socket createSocket(InetAddress address, int port) throws IOException {
+        return SocketChannel.open(new InetSocketAddress(address, port)).socket();
+    }
+
+    @Override
+    public Socket createSocket(
+            InetAddress address, int port, InetAddress localAddress, int localPort)
+            throws IOException {
+        throw new SocketException("not supported");
+    }
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/resources/linkis-engineconn.properties b/linkis-engineconn-plugins/trino/src/main/resources/linkis-engineconn.properties
new file mode 100644
index 000000000..ab1c51b2a
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/resources/linkis-engineconn.properties
@@ -0,0 +1,22 @@
+# 
+# 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.
+#
+
+#
+wds.linkis.server.version=v1
+#wds.linkis.engineconn.debug.enable=true
+#wds.linkis.keytab.enable=true
+wds.linkis.engineconn.plugin.default.class=org.apache.linkis.engineplugin.trino.TrinoEngineConnPlugin
+
+wds.linkis.trino.url=http://127.0.0.1:8080
diff --git a/linkis-engineconn-plugins/trino/src/main/resources/log4j2.xml b/linkis-engineconn-plugins/trino/src/main/resources/log4j2.xml
new file mode 100644
index 000000000..b347fcb84
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/resources/log4j2.xml
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ 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.
+  -->
+  
+<configuration status="error" monitorInterval="30">
+    <appenders>
+        <Console name="Console" target="SYSTEM_OUT">
+            <ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
+        </Console>
+        <Send name="Send" >
+            <Filters>
+                <ThresholdFilter level="WARN" onMatch="ACCEPT" onMismatch="DENY" />
+            </Filters>
+            <PatternLayout pattern="%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level [%t] %logger{36} %L %M - %msg%xEx%n"/>
+        </Send>
+        <File name="stderr" fileName="${env:PWD}/logs/stderr" append="true">
+            <PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>
+        </File>
+    </appenders>
+    <loggers>
+      <root level="INFO">
+            <appender-ref ref="Console"/>
+            <appender-ref ref="Send"/>
+        </root>
+        <logger name="org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter " level="error" additivity="true">
+            <appender-ref ref="stderr"/>
+        </logger>
+        <logger name="com.netflix.discovery" level="warn" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.apache.hadoop.yarn" level="warn" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.springframework" level="warn" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.apache.linkis.server.security" level="warn" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.apache.hadoop.hive.ql.exec.mr.ExecDriver" level="fatal" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.apache.hadoop.hdfs.KeyProviderCache" level="fatal" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.spark_project.jetty" level="ERROR" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.eclipse.jetty" level="ERROR" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.springframework" level="ERROR" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+        <logger name="org.reflections.Reflections" level="ERROR" additivity="true">
+            <appender-ref ref="Send"/>
+        </logger>
+
+   </loggers>
+</configuration>
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/TrinoEngineConnPlugin.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/TrinoEngineConnPlugin.scala
new file mode 100644
index 000000000..5bf9c23be
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/TrinoEngineConnPlugin.scala
@@ -0,0 +1,70 @@
+/*
+ * 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.linkis.engineplugin.trino
+
+import org.apache.linkis.engineplugin.trino.builder.TrinoProcessEngineConnLaunchBuilder
+import org.apache.linkis.engineplugin.trino.factory.TrinoEngineConnFactory
+import org.apache.linkis.manager.engineplugin.common.EngineConnPlugin
+import org.apache.linkis.manager.engineplugin.common.creation.EngineConnFactory
+import org.apache.linkis.manager.engineplugin.common.launch.EngineConnLaunchBuilder
+import org.apache.linkis.manager.engineplugin.common.resource.{EngineResourceFactory, GenericEngineResourceFactory}
+import org.apache.linkis.manager.label.entity.Label
+
+import java.util
+
+class TrinoEngineConnPlugin extends EngineConnPlugin {
+
+  private val resourceLocker = new Object()
+
+  private val engineLaunchBuilderLocker = new Object()
+
+  private val engineFactoryLocker = new Object()
+
+  private var engineResourceFactory: EngineResourceFactory = _
+
+  private var engineLaunchBuilder: EngineConnLaunchBuilder = _
+
+  private var engineFactory: EngineConnFactory = _
+
+  private val defaultLabels: util.List[Label[_]] = new util.ArrayList[Label[_]]()
+
+  override def init(params: util.Map[String, Any]): Unit = {
+
+  }
+
+  override def getEngineResourceFactory: EngineResourceFactory = {
+    if (null == engineResourceFactory) resourceLocker synchronized {
+      engineResourceFactory = new GenericEngineResourceFactory
+    }
+    engineResourceFactory
+  }
+
+  override def getEngineConnLaunchBuilder: EngineConnLaunchBuilder = {
+    new TrinoProcessEngineConnLaunchBuilder
+  }
+
+  override def getEngineConnFactory: EngineConnFactory = {
+    if (null == engineFactory) engineFactoryLocker synchronized {
+      engineFactory = new TrinoEngineConnFactory
+    }
+    engineFactory
+  }
+
+  override def getDefaultLabels: util.List[Label[_]] = defaultLabels
+
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/builder/TrinoProcessEngineConnLaunchBuilder.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/builder/TrinoProcessEngineConnLaunchBuilder.scala
new file mode 100644
index 000000000..db90207cc
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/builder/TrinoProcessEngineConnLaunchBuilder.scala
@@ -0,0 +1,32 @@
+/*
+ * 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.linkis.engineplugin.trino.builder
+
+import org.apache.commons.lang3.StringUtils
+import org.apache.linkis.engineplugin.trino.conf.TrinoConfiguration
+import org.apache.linkis.manager.engineplugin.common.launch.process.JavaProcessEngineConnLaunchBuilder
+import org.apache.linkis.manager.label.entity.engine.UserCreatorLabel
+
+class TrinoProcessEngineConnLaunchBuilder extends JavaProcessEngineConnLaunchBuilder {
+
+  override def getEngineStartUser(label: UserCreatorLabel): String = {
+    /* using user label if user is blank */
+    StringUtils.defaultIfBlank(TrinoConfiguration.TRINO_USER.getValue, label.getUser)
+  }
+
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/conf/TrinoConfiguration.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/conf/TrinoConfiguration.scala
new file mode 100644
index 000000000..63fcc7059
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/conf/TrinoConfiguration.scala
@@ -0,0 +1,55 @@
+/*
+ * 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.linkis.engineplugin.trino.conf
+
+import org.apache.linkis.common.conf.{ByteType, CommonVars}
+
+import java.lang
+
+object TrinoConfiguration {
+
+  val ENGINE_CONCURRENT_LIMIT = CommonVars[Int]("wds.linkis.engineconn.concurrent.limit", 100)
+
+  val ENTRANCE_MAX_JOB_INSTANCE = CommonVars[Int]("wds.linkis.entrance.max.job.instance", 100)
+  val ENTRANCE_PROTECTED_JOB_INSTANCE = CommonVars[Int]("wds.linkis.entrance.protected.job.instance", 0)
+  val ENTRANCE_RESULTS_MAX_CACHE = CommonVars("wds.linkis.trino.resultSet.cache.max", new ByteType("512k"))
+
+  val DEFAULT_LIMIT = CommonVars[Int]("wds.linkis.trino.default.limit", 5000)
+
+  val TRINO_HTTP_CONNECT_TIME_OUT = CommonVars[java.lang.Long]("wds.linkis.trino.http.connectTimeout", new lang.Long(60)) //seconds
+  val TRINO_HTTP_READ_TIME_OUT = CommonVars[java.lang.Long]("wds.linkis.trino.http.readTimeout", new lang.Long(60))
+
+  val TRINO_URL = CommonVars[String]("wds.linkis.trino.url", "http://127.0.0.1:8080")
+  val TRINO_USER = CommonVars[String]("wds.linkis.trino.user", null)
+  val TRINO_PASSWORD = CommonVars[String]("wds.linkis.trino.password", null)
+  val TRINO_PASSWORD_CMD = CommonVars[String]("wds.linkis.trino.passwordCmd", null)
+  val TRINO_CATALOG = CommonVars[String]("wds.linkis.trino.catalog", "system")
+  val TRINO_SCHEMA = CommonVars[String]("wds.linkis.trino.schema", "")
+  val TRINO_SOURCE = CommonVars[String]("wds.linkis.trino.source", "global")
+
+  val TRINO_SSL_INSECURED = CommonVars[Boolean]("wds.linkis.trino.ssl.insecured", false)
+  val TRINO_SSL_KEYSTORE = CommonVars[String]("wds.linkis.trino.ssl.keystore", null)
+  val TRINO_SSL_KEYSTORE_TYPE = CommonVars[String]("wds.linkis.trino.ssl.keystore.type", null)
+  val TRINO_SSL_KEYSTORE_PASSWORD = CommonVars[String]("wds.linkis.trino.ssl.keystore.password", null)
+  val TRINO_SSL_TRUSTSTORE = CommonVars[String]("wds.linkis.trino.ssl.truststore", null)
+  val TRINO_SSL_TRUSTSTORE_TYPE = CommonVars[String]("wds.linkis.trino.ssl.truststore.type", null)
+  val TRINO_SSL_TRUSTSTORE_PASSWORD = CommonVars[String]("wds.linkis.trino.ssl.truststore.password", null)
+
+  val TRINO_FORBID_GRANT = CommonVars[Boolean]("wds.linkis.trino.forbid.grant", true)
+  val TRINO_FORBID_MODIFY_SCHEMA = CommonVars[Boolean]("wds.linkis.trino.forbid.modifySchema", true)
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/conf/TrinoEngineConfig.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/conf/TrinoEngineConfig.scala
new file mode 100644
index 000000000..054f4eea0
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/conf/TrinoEngineConfig.scala
@@ -0,0 +1,37 @@
+/*
+ * 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.linkis.engineplugin.trino.conf
+
+import org.apache.linkis.common.conf.Configuration
+import org.apache.linkis.governance.common.protocol.conf.{RequestQueryEngineConfigWithGlobalConfig, ResponseQueryConfig}
+import org.apache.linkis.manager.label.entity.engine.{EngineTypeLabel, UserCreatorLabel}
+import org.apache.linkis.protocol.CacheableProtocol
+import org.apache.linkis.rpc.RPCMapCache
+
+import java.util
+
+object TrinoEngineConfig extends RPCMapCache[(UserCreatorLabel, EngineTypeLabel), String, String](Configuration.CLOUD_CONSOLE_CONFIGURATION_SPRING_APPLICATION_NAME.getValue) {
+
+  override protected def createRequest(labelTuple: (UserCreatorLabel, EngineTypeLabel)): CacheableProtocol = {
+    RequestQueryEngineConfigWithGlobalConfig(labelTuple._1, labelTuple._2)
+  }
+  override protected def createMap(any: Any): util.Map[String, String] = any match {
+    case response: ResponseQueryConfig => response.getKeyAndValue
+  }
+
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/exception/TrinoException.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/exception/TrinoException.scala
new file mode 100644
index 000000000..5efa21477
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/exception/TrinoException.scala
@@ -0,0 +1,30 @@
+/*
+ * 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.linkis.engineplugin.trino.exception
+
+import org.apache.linkis.common.exception.ErrorException
+
+case class TrinoStateInvalidException(message: String) extends ErrorException(60011, message: String)
+
+case class TrinoClientException(message: String) extends ErrorException(60012, message: String)
+
+case class TrinoSourceGroupException(message: String) extends ErrorException(60013, message: String)
+
+case class TrinoModifySchemaException(message: String) extends ErrorException(60014, message: String)
+
+case class TrinoGrantmaException(message: String) extends ErrorException(60015, message: String)
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/executor/TrinoEngineConnExecutor.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/executor/TrinoEngineConnExecutor.scala
new file mode 100644
index 000000000..b80dc03a5
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/executor/TrinoEngineConnExecutor.scala
@@ -0,0 +1,405 @@
+/*
+ * 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.linkis.engineplugin.trino.executor
+
+import com.google.common.cache.{Cache, CacheBuilder}
+import io.trino.client._
+import okhttp3.OkHttpClient
+import org.apache.commons.io.IOUtils
+import org.apache.commons.lang.exception.ExceptionUtils
+import org.apache.commons.lang3.StringUtils
+import org.apache.linkis.common.log.LogUtils
+import org.apache.linkis.common.utils.{OverloadUtils, Utils}
+import org.apache.linkis.engineconn.common.conf.{EngineConnConf, EngineConnConstant}
+import org.apache.linkis.engineconn.computation.executor.entity.EngineConnTask
+import org.apache.linkis.engineconn.computation.executor.execute.{ConcurrentComputationExecutor, EngineExecutionContext}
+import org.apache.linkis.engineconn.core.EngineConnObject
+import org.apache.linkis.engineplugin.trino.conf.TrinoConfiguration._
+import org.apache.linkis.engineplugin.trino.conf.{TrinoConfiguration, TrinoEngineConfig}
+import org.apache.linkis.engineplugin.trino.exception.{TrinoClientException, TrinoGrantmaException, TrinoModifySchemaException, TrinoStateInvalidException}
+import org.apache.linkis.engineplugin.trino.interceptor.PasswordInterceptor
+import org.apache.linkis.engineplugin.trino.password.{CommandPasswordCallback, StaticPasswordCallback}
+import org.apache.linkis.engineplugin.trino.socket.SocketChannelSocketFactory
+import org.apache.linkis.engineplugin.trino.utils.TrinoCode
+import org.apache.linkis.governance.common.paser.SQLCodeParser
+import org.apache.linkis.manager.common.entity.resource.{CommonNodeResource, LoadResource, NodeResource}
+import org.apache.linkis.manager.engineplugin.common.conf.EngineConnPluginConf
+import org.apache.linkis.manager.label.entity.Label
+import org.apache.linkis.manager.label.entity.engine.{EngineTypeLabel, UserCreatorLabel}
+import org.apache.linkis.protocol.engine.JobProgressInfo
+import org.apache.linkis.rpc.Sender
+import org.apache.linkis.scheduler.executer.{ErrorExecuteResponse, ExecuteResponse, SuccessExecuteResponse}
+import org.apache.linkis.storage.domain.Column
+import org.apache.linkis.storage.resultset.ResultSetFactory
+import org.apache.linkis.storage.resultset.table.{TableMetaData, TableRecord}
+import org.springframework.util.CollectionUtils
+
+import java.net.URI
+import java.util
+import java.util.concurrent.{ConcurrentHashMap, TimeUnit}
+import java.util._
+import java.util.function.Supplier
+import javax.security.auth.callback.PasswordCallback
+import scala.collection.JavaConverters._
+
+class TrinoEngineConnExecutor(override val outputPrintLimit: Int, val id: Int) extends ConcurrentComputationExecutor(outputPrintLimit) {
+
+  private val executorLabels: util.List[Label[_]] = new util.ArrayList[Label[_]](2)
+
+  private val okHttpClientCache: util.Map[String, OkHttpClient] = new ConcurrentHashMap[String, OkHttpClient]()
+
+  private val statementClientCache: util.Map[String, StatementClient] = new ConcurrentHashMap[String, StatementClient]()
+
+  private val clientSessionCache: Cache[String, ClientSession] = CacheBuilder.newBuilder()
+    .expireAfterAccess(EngineConnConf.ENGINE_TASK_EXPIRE_TIME.getValue, TimeUnit.MILLISECONDS)
+    .maximumSize(EngineConnConstant.MAX_TASK_NUM).build()
+
+  private val buildOkHttpClient = new util.function.Function[String, OkHttpClient] {
+    override def apply(user: String): OkHttpClient = {
+      val builder = new OkHttpClient.Builder()
+        .socketFactory(new SocketChannelSocketFactory)
+        .connectTimeout(TRINO_HTTP_CONNECT_TIME_OUT.getValue, TimeUnit.SECONDS)
+        .readTimeout(TRINO_HTTP_READ_TIME_OUT.getValue, TimeUnit.SECONDS)
+
+      /* create password interceptor */
+      val password = TRINO_PASSWORD.getValue
+      val passwordCmd = TRINO_PASSWORD_CMD.getValue
+      if (StringUtils.isNotBlank(user)) {
+        var passwordCallback: PasswordCallback = null
+        if (StringUtils.isNotBlank(passwordCmd)) {
+          passwordCallback = new CommandPasswordCallback(passwordCmd);
+        } else if (StringUtils.isNotBlank(password)) {
+          passwordCallback = new StaticPasswordCallback(password);
+        }
+
+        if (passwordCallback != null) {
+          builder.addInterceptor(new PasswordInterceptor(user, passwordCallback))
+        }
+      }
+
+      /* setup ssl */
+      if (TRINO_SSL_INSECURED.getValue) {
+        OkHttpUtil.setupInsecureSsl(builder)
+      } else {
+        OkHttpUtil.setupSsl(builder,
+          Optional.ofNullable(TRINO_SSL_KEYSTORE.getValue),
+          Optional.ofNullable(TRINO_SSL_KEYSTORE_PASSWORD.getValue),
+          Optional.ofNullable(TRINO_SSL_KEYSTORE_TYPE.getValue),
+          Optional.ofNullable(TRINO_SSL_TRUSTSTORE.getValue),
+          Optional.ofNullable(TRINO_SSL_TRUSTSTORE_PASSWORD.getValue),
+          Optional.ofNullable(TRINO_SSL_TRUSTSTORE_TYPE.getValue))
+      }
+      builder.build()
+    }
+  }
+
+  override def init: Unit = {
+    setCodeParser(new SQLCodeParser)
+    super.init
+  }
+
+  override def execute(engineConnTask: EngineConnTask): ExecuteResponse = {
+    val user = getCurrentUser(engineConnTask.getLables)
+    val userCreatorLabel = engineConnTask.getLables.find(_.isInstanceOf[UserCreatorLabel]).get
+    val engineTypeLabel = engineConnTask.getLables.find(_.isInstanceOf[EngineTypeLabel]).get
+    var configMap: util.Map[String, String] = null
+    if (userCreatorLabel != null && engineTypeLabel != null) {
+      configMap = TrinoEngineConfig.getCacheMap((userCreatorLabel.asInstanceOf[UserCreatorLabel], engineTypeLabel.asInstanceOf[EngineTypeLabel]))
+    }
+    clientSessionCache.put(engineConnTask.getTaskId, getClientSession(user, engineConnTask.getProperties, configMap))
+    super.execute(engineConnTask)
+  }
+
+  override def executeLine(engineExecutorContext: EngineExecutionContext, code: String): ExecuteResponse = {
+    val trimmedCode = code.trim
+    val realCode = getCodeParser
+      .map{ parser => parser.parse(trimmedCode).head}
+      .getOrElse(trimmedCode)
+
+    TrinoCode.checkCode(realCode)
+    logger.info(s"trino client begins to run psql code:\n $realCode")
+
+    val trinoUser = Optional.ofNullable(TRINO_USER.getValue)
+      .orElseGet(new Supplier[String] {
+        override def get(): String = getCurrentUser(engineExecutorContext.getLabels)
+      })
+    val taskId = engineExecutorContext.getJobId.get
+    val clientSession = clientSessionCache.getIfPresent(taskId)
+    val statement = StatementClientFactory.newStatementClient(
+      okHttpClientCache.computeIfAbsent(trinoUser, buildOkHttpClient), clientSession, realCode)
+    statementClientCache.put(taskId, statement)
+    Utils.tryFinally {
+      initialStatusUpdates(taskId, engineExecutorContext, statement)
+      if (statement.isRunning || (statement.isFinished && statement.finalStatusInfo().getError == null)) {
+        queryOutput(taskId, engineExecutorContext, statement)
+      }
+      val errorResponse = verifyServerError(taskId, engineExecutorContext, statement)
+      if (errorResponse == null) {
+        // update session
+        clientSessionCache.put(taskId, updateSession(clientSession, statement))
+        SuccessExecuteResponse()
+      } else {
+        errorResponse
+      }
+    } {
+      statementClientCache.remove(taskId)
+    }
+
+  }
+
+  override def executeCompletely(engineExecutorContext: EngineExecutionContext, code: String, completedLine: String): ExecuteResponse = null
+
+  override def progress(taskID: String): Float = {
+    val statement = statementClientCache.get(taskID)
+    if (statement != null) {
+      val results = statement.currentStatusInfo()
+      if (results != null) {
+        val stats = results.getStats
+        if (results != null) {
+          return stats.getProgressPercentage.orElse(0.0).toFloat / 100
+        }
+      }
+    }
+    0
+  }
+
+  override def getProgressInfo(taskID: String): Array[JobProgressInfo] = {
+    val statement = statementClientCache.get(taskID)
+    if (statement != null) {
+      val results = statement.currentStatusInfo()
+      if (results != null) {
+        val stats = results.getStats
+        if (results != null) {
+          return Array(JobProgressInfo(taskID, stats.getTotalSplits, stats.getRunningSplits, 0, stats.getCompletedSplits))
+        }
+      }
+    }
+    Array.empty[JobProgressInfo]
+  }
+
+  override def killTask(taskId: String): Unit = {
+    val statement = statementClientCache.remove(taskId)
+    if (null != statement) {
+      Utils.tryAndWarn(statement.cancelLeafStage())
+    }
+    super.killTask(taskId)
+  }
+
+  override def getExecutorLabels(): util.List[Label[_]] = executorLabels
+
+  override def setExecutorLabels(labels: util.List[Label[_]]): Unit = {
+    if (!CollectionUtils.isEmpty(labels)) {
+      executorLabels.clear()
+      executorLabels.addAll(labels)
+    }
+  }
+
+  override def supportCallBackLogs(): Boolean = false
+
+  override def requestExpectedResource(expectedResource: NodeResource): NodeResource = {
+    null
+  }
+
+  override def getCurrentNodeResource(): NodeResource = {
+    val properties = EngineConnObject.getEngineCreationContext.getOptions
+    if (properties.containsKey(EngineConnPluginConf.JAVA_ENGINE_REQUEST_MEMORY.key)) {
+      val settingClientMemory = properties.get(EngineConnPluginConf.JAVA_ENGINE_REQUEST_MEMORY.key)
+      if (!settingClientMemory.toLowerCase().endsWith("g")) {
+        properties.put(EngineConnPluginConf.JAVA_ENGINE_REQUEST_MEMORY.key, settingClientMemory + "g")
+      }
+    }
+    val resource = new CommonNodeResource
+    val usedResource = new LoadResource(OverloadUtils.getProcessMaxMemory, 1)
+    resource.setUsedResource(usedResource)
+    resource
+  }
+
+  override def getId(): String = Sender.getThisServiceInstance.getInstance + s"_$id"
+
+  override def getConcurrentLimit: Int = ENGINE_CONCURRENT_LIMIT.getValue
+
+  private def getClientSession(user: String, taskParams: util.Map[String, Object], cacheMap: util.Map[String, String]): ClientSession = {
+    val configMap = new util.HashMap[String, String]()
+    // override configMap with taskParams
+    if (!CollectionUtils.isEmpty(cacheMap)) configMap.putAll(cacheMap)
+    taskParams.asScala.foreach {
+      case (key: String, value: Object) if value != null => configMap.put(key, String.valueOf(value))
+      case _ =>
+    }
+    val httpUri: URI = URI.create(TRINO_URL.getValue(configMap))
+    val source: String = TRINO_SOURCE.getValue(configMap)
+    val catalog: String = TRINO_CATALOG.getValue(configMap)
+    val schema: String = TRINO_SCHEMA.getValue(configMap)
+
+    val properties: util.Map[String, String] = configMap.asScala
+      .filter(tuple => tuple._1.startsWith("trino.session."))
+      .map(tuple => (tuple._1.substring("trino.session.".length), tuple._2))
+      .asJava
+
+    val clientInfo: String = "Linkis"
+    val transactionId: String = null
+    val path: String = null
+    val traceToken: util.Optional[String] = Optional.empty()
+    val clientTags: util.Set[String] = Collections.emptySet()
+    val timeZonId = TimeZone.getDefault.toZoneId
+    val locale: Locale = Locale.getDefault
+    val resourceEstimates: util.Map[String, String] = Collections.emptyMap()
+    val preparedStatements: util.Map[String, String] = Collections.emptyMap()
+    val roles: java.util.Map[String, ClientSelectedRole] = Collections.emptyMap()
+    val extraCredentials: util.Map[String, String] = Collections.emptyMap()
+    val compressionDisabled: Boolean = true
+
+    val clientRequestTimeout: io.airlift.units.Duration = new io.airlift.units.Duration(0, TimeUnit.MILLISECONDS)
+
+    new ClientSession(httpUri, user, Optional.of(user), source, traceToken, clientTags, clientInfo, catalog, schema, path, timeZonId, locale,
+      resourceEstimates, properties, preparedStatements, roles, extraCredentials, transactionId, clientRequestTimeout, compressionDisabled)
+  }
+
+  private def getCurrentUser(labels: Array[Label[_]]): String = {
+    labels.find(l => l.isInstanceOf[UserCreatorLabel])
+      .map(label => label.asInstanceOf[UserCreatorLabel].getUser)
+      .getOrElse(TRINO_USER.getValue)
+  }
+
+  private def initialStatusUpdates(taskId: String, engineExecutorContext: EngineExecutionContext, statement: StatementClient): Unit = {
+    while (statement.isRunning
+      && (statement.currentData().getData == null || statement.currentStatusInfo().getUpdateType != null)) {
+      engineExecutorContext.pushProgress(progress(taskId), getProgressInfo(taskId))
+      statement.advance()
+    }
+  }
+
+  private def queryOutput(taskId: String, engineExecutorContext: EngineExecutionContext, statement: StatementClient): Unit = {
+    var columnCount = 0
+    var rows = 0
+    val resultSetWriter = engineExecutorContext.createResultSetWriter(ResultSetFactory.TABLE_TYPE)
+    Utils.tryFinally({
+      var results: QueryStatusInfo = null
+      if (statement.isRunning) {
+        results = statement.currentStatusInfo()
+      } else {
+        results = statement.finalStatusInfo()
+      }
+      if (results.getColumns == null) {
+        throw new RuntimeException("trino columns is null.")
+      }
+      val columns = results.getColumns.asScala
+        .map(column => Column(column.getName, column.getType, "")).toArray[Column]
+      columnCount = columns.length
+      resultSetWriter.addMetaData(new TableMetaData(columns))
+      while (statement.isRunning) {
+        val data = statement.currentData().getData
+        if (data != null) for (row <- data.asScala) {
+          val rowArray = row.asScala.map(r => String.valueOf(r))
+          resultSetWriter.addRecord(new TableRecord(rowArray.toArray))
+          rows += 1
+        }
+        engineExecutorContext.pushProgress(progress(taskId), getProgressInfo(taskId))
+        statement.advance()
+      }
+    })(IOUtils.closeQuietly(resultSetWriter))
+
+    logger.info(s"Fetched $columnCount col(s) : $rows row(s) in trino")
+    engineExecutorContext.appendStdout(LogUtils.generateInfo(s"Fetched $columnCount col(s) : $rows row(s) in trino"));
+    engineExecutorContext.sendResultSet(resultSetWriter)
+    IOUtils.closeQuietly(resultSetWriter)
+  }
+
+  // check trino error
+  private def verifyServerError(taskId: String, engineExecutorContext: EngineExecutionContext, statement: StatementClient): ErrorExecuteResponse = {
+    engineExecutorContext.pushProgress(progress(taskId), getProgressInfo(taskId))
+    if (statement.isFinished) {
+      val info: QueryStatusInfo = statement.finalStatusInfo()
+      if (info.getError != null) {
+        val error = Objects.requireNonNull(info.getError)
+        var cause: Throwable = null
+        if (error.getFailureInfo != null) {
+          cause = error.getFailureInfo.toException
+        }
+        engineExecutorContext.appendStdout(LogUtils.generateERROR(ExceptionUtils.getFullStackTrace(cause)))
+        ErrorExecuteResponse(ExceptionUtils.getMessage(cause), cause)
+      } else null
+    } else if (statement.isClientAborted) {
+      logger.warn(s"trino statement is killed.")
+      null
+    } else if (statement.isClientError) {
+      throw TrinoClientException("trino client error.")
+    } else {
+      throw TrinoStateInvalidException("trino status error. Statement is not finished.")
+    }
+  }
+
+  private def updateSession(clientSession: ClientSession, statement: StatementClient): ClientSession = {
+    var newSession = clientSession
+    // update catalog and schema if present
+    if (statement.getSetCatalog.isPresent || statement.getSetSchema.isPresent) {
+      newSession = ClientSession.builder(newSession)
+        .withCatalog(statement.getSetCatalog.orElse(newSession.getCatalog))
+        .withSchema(statement.getSetSchema.orElse(newSession.getSchema))
+        .build
+    }
+
+    // update transaction ID if necessary
+    if (statement.isClearTransactionId) newSession = ClientSession.stripTransactionId(newSession)
+
+    var builder: ClientSession.Builder = ClientSession.builder(newSession)
+
+    if (statement.getStartedTransactionId != null) builder = builder.withTransactionId(statement.getStartedTransactionId)
+
+    // update session properties if present
+    if (!statement.getSetSessionProperties.isEmpty || !statement.getResetSessionProperties.isEmpty) {
+      val sessionProperties: util.Map[String, String] = new util.HashMap[String, String](newSession.getProperties)
+      sessionProperties.putAll(statement.getSetSessionProperties)
+      sessionProperties.keySet.removeAll(statement.getResetSessionProperties)
+      builder = builder.withProperties(sessionProperties)
+    }
+
+    // update session roles
+    if (!statement.getSetRoles.isEmpty) {
+      val roles: util.Map[String, ClientSelectedRole] = new util.HashMap[String, ClientSelectedRole](newSession.getRoles)
+      roles.putAll(statement.getSetRoles)
+      builder = builder.withRoles(roles)
+    }
+
+    // update prepared statements if present
+    if (!statement.getAddedPreparedStatements.isEmpty || !statement.getDeallocatedPreparedStatements.isEmpty) {
+      val preparedStatements: util.Map[String, String] = new util.HashMap[String, String](newSession.getPreparedStatements)
+      preparedStatements.putAll(statement.getAddedPreparedStatements)
+      preparedStatements.keySet.removeAll(statement.getDeallocatedPreparedStatements)
+      builder = builder.withPreparedStatements(preparedStatements)
+    }
+
+    newSession
+  }
+
+  override def killAll(): Unit = {
+    val iterator = statementClientCache.values().iterator()
+    while (iterator.hasNext) {
+      val statement = iterator.next()
+      if (null != statement) {
+        Utils.tryAndWarn(statement.cancelLeafStage())
+      }
+    }
+  }
+
+  override def close(): Unit = {
+    killAll()
+    super.close()
+  }
+
+}
\ No newline at end of file
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/factory/TrinoEngineConnFactory.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/factory/TrinoEngineConnFactory.scala
new file mode 100644
index 000000000..70c9afa36
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/factory/TrinoEngineConnFactory.scala
@@ -0,0 +1,40 @@
+/*
+ * 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.linkis.engineplugin.trino.factory
+
+import org.apache.linkis.engineconn.common.creation.EngineCreationContext
+import org.apache.linkis.engineconn.common.engineconn.EngineConn
+import org.apache.linkis.engineconn.computation.executor.creation.ComputationSingleExecutorEngineConnFactory
+import org.apache.linkis.engineconn.executor.entity.LabelExecutor
+import org.apache.linkis.engineplugin.trino.conf.TrinoConfiguration
+import org.apache.linkis.engineplugin.trino.executor.TrinoEngineConnExecutor
+import org.apache.linkis.manager.label.entity.engine.EngineType.EngineType
+import org.apache.linkis.manager.label.entity.engine.RunType.RunType
+import org.apache.linkis.manager.label.entity.engine.{EngineType, RunType}
+
+class TrinoEngineConnFactory extends ComputationSingleExecutorEngineConnFactory {
+
+  override def newExecutor(id: Int, engineCreationContext: EngineCreationContext, engineConn: EngineConn): LabelExecutor = {
+    new TrinoEngineConnExecutor(TrinoConfiguration.DEFAULT_LIMIT.getValue, id)
+  }
+
+  override protected def getEngineConnType: EngineType = EngineType.TRINO
+
+  override protected def getRunType: RunType = RunType.TRINO_SQL
+
+}
diff --git a/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/utils/TrinoCode.scala b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/utils/TrinoCode.scala
new file mode 100644
index 000000000..0db75d71c
--- /dev/null
+++ b/linkis-engineconn-plugins/trino/src/main/scala/org/apache/linkis/engineplugin/trino/utils/TrinoCode.scala
@@ -0,0 +1,44 @@
+/*
+ * 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.linkis.engineplugin.trino.utils
+
+import org.apache.linkis.engineplugin.trino.conf.TrinoConfiguration
+import org.apache.linkis.engineplugin.trino.exception.{TrinoGrantmaException, TrinoModifySchemaException}
+
+
+object TrinoCode {
+  private val SPACE = " "
+
+  private def willGrant(code: String): Boolean = {
+    code.matches("(?=.*grant)(?=.*on)(?=.*to)^.*$")
+  }
+
+  private def willModifySchema(code: String): Boolean = {
+    val trimmedCode = code.replaceAll("\n", SPACE).replaceAll("\\s+", SPACE)
+      .toLowerCase()
+    trimmedCode.contains("create schema") || trimmedCode.contains("drop schema") || trimmedCode.contains("alter schema")
+  }
+
+  def checkCode(code: String): Unit = {
+    if (TrinoConfiguration.TRINO_FORBID_MODIFY_SCHEMA.getValue && TrinoCode.willModifySchema(code)) {
+      throw TrinoModifySchemaException("CREATE, ALTER, DROP SCHEMA is not allowed")
+    }
+    if (TrinoConfiguration.TRINO_FORBID_GRANT.getValue && TrinoCode.willGrant(code)) {
+      throw TrinoGrantmaException("Grant schema or table is not allowed")
+    }
+  }
+}
diff --git a/tool/dependencies/known-dependencies.txt b/tool/dependencies/known-dependencies.txt
index ae731a338..c5048d87b 100644
--- a/tool/dependencies/known-dependencies.txt
+++ b/tool/dependencies/known-dependencies.txt
@@ -103,6 +103,7 @@ eureka-core-1.10.14.jar
 evictor-1.0.0.jar
 excel-streaming-reader-4.0.1.jar
 expiringmap-0.5.6.jar
+failsafe-2.4.0.jar
 failureaccess-1.0.1.jar
 fastutil-6.5.6.jar
 feign-core-10.12.jar
@@ -548,6 +549,7 @@ tephra-hbase-compat-1.0-0.6.0.jar
 tomcat-embed-core-9.0.46.jar
 tomcat-embed-websocket-9.0.46.jar
 transaction-api-1.1.jar
+trino-client-371.jar
 twill-api-0.6.0-incubating.jar
 twill-common-0.6.0-incubating.jar
 twill-core-0.6.0-incubating.jar
@@ -556,6 +558,7 @@ twill-discovery-core-0.6.0-incubating.jar
 twill-zookeeper-0.6.0-incubating.jar
 txw2-2.3.4.jar
 units-1.3.jar
+units-1.6.jar
 validation-api-2.0.1.Final.jar
 velocity-1.5.jar
 websocket-api-9.4.48.v20220622.jar


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org