You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Trino通过Hive元存储访问Azure ADLS时出现URI无效错误

解决Trino连接ADLS时的Invalid location URI错误

问题场景

在集群中运行Trino实例,通过同集群部署的Hive元存储连接Azure ADLS,执行以下创建Schema语句时触发错误:

USE hive.default;
CREATE SCHEMA hive.web
WITH (location = 'abfs://<container_name>@<storage_account_name>.dfs.core.windows.net/')

错误信息

SQL Error [33]: Query failed (#20221207_104043_00017_jhcwz): Invalid location URI: abfs://<container_name>@<storage_account_name>.dfs.core.windows.net/

当前Hive元存储core-site.xml配置

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
<configuration>

  <property>
    <name>fs.azure.account.key.<storage_account_name>.dfs.core.windows.net</name>
    <value><access_key></value>
  </property>

  <property>
    <name>fs.trash.interval</name>
    <value>4320</value>
  </property>

</configuration>

解决方法

  • 配置Trino的Hive连接器:在etc/catalog/hive.properties文件中添加Hive配置资源路径,确保Trino能加载ADLS的认证配置:
    hive.config.resources=/path/to/hive/conf/core-site.xml,/path/to/hive/conf/hdfs-site.xml
    
    替换/path/to/hive/conf为实际的Hive配置文件目录。
  • 校验ABFS URI:确认<container_name>和<storage_account_name>已替换为真实的Azure存储容器和账户名,注意存储账户名必须为小写,URI无多余特殊字符。
  • 检查权限:确保Trino进程对Hive的core-site.xml文件拥有可读权限。
  • 重启Trino服务:让配置生效后重新执行创建Schema的SQL语句。

内容的提问来源于stack exchange,提问作者Subha_26

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.09 04:40:24