【发布时间】:2021-01-20 15:57:41
【问题描述】:
我想使用 Presto 来查询存储在 S3 中的 Iceberg 表作为 parquet 文件,因此我需要使用 Hive 元存储。我正在运行由 MySql 支持的独立配置单元元存储服务。我已将 Iceberg 配置为使用 Hive 目录:
import org.apache.hadoop.conf.Configuration;
import org.apache.iceberg.catalog.Namespace;
import org.apache.iceberg.hive.HiveCatalog;
public class MetastoreTest {
public static void main(String[] args) {
Configuration conf = new Configuration();
conf.set("hive.metastore.uris", "thrift://x.x.x.x:9083");
conf.set("hive.metastore.warehouse.dir", "s3://bucket/warehouse");
HiveCatalog catalog = new HiveCatalog(conf);
catalog.createNamespace(Namespace.of("my_metastore"));
}
}
我收到以下错误:Caused by: MetaException(message:Got exception: org.apache.hadoop.fs.UnsupportedFileSystemException No FileSystem for scheme "s3")
我已将/hadoop-3.3.0/share/hadoop/tools/lib 包含在HADOOP_CLASSPATH 中,还将aws 相关的jar 复制到apache-hive-metastore-3.0.0-bin/lib。还缺少什么?
【问题讨论】:
标签: hadoop amazon-s3 hive metastore iceberg