doris创建一个 WITH BROKER的 S3 远程仓库 s3_repo不成功

Viewed 50

版本
doris:2.1.0
其他前置条件:
Broker的名称为obs_broker
image.png
CREATE REPOSITORY obs_repo
WITH S3
ON LOCATION "s3://dorisbak"
PROPERTIES
(
"AWS_ENDPOINT" = "http://10.xxx.xx.x:9383",
"AWS_ACCESS_KEY" = "admin",
"AWS_SECRET_KEY"="admin",
"AWS_REGION" = "us-east-1",
"use_path_style" = "true"
);
能创建仓库成功,已创建的仓库如图
image.png

doris文档内容:
image.png
说明BROKER是支持S3的

问题:
CREATE REPOSITORY obs_repo2
WITH BROKER obs_broker
ON LOCATION "s3a://dorisbak2"
PROPERTIES
(
"fs.s3a.access.key" = "admin",
"fs.s3a.secret.key" = "admin",
"fs.s3a.endpoint" = "http://10.xxx.xx.x:9383"
);
创建仓库失败,失败详情如下图:
image.png

请问,我该怎么写这个创建仓库语句呢,麻烦帮忙看看,谢谢!

2 Answers

要创建s3的仓库,可以参考这个语句:

CREATE REPOSITORY `s3_repo`
WITH S3
ON LOCATION "s3://bucket_name/test"
PROPERTIES
(
    "AWS_ENDPOINT" = "http://xxxx.xxxx.com",
    "AWS_ACCESS_KEY" = "xxxx",
    "AWS_SECRET_KEY"="xxx",
    "AWS_REGION" = "xxx"
); 

使用with s3的关键字,而不是with broker
文档链接:https://doris.apache.org/zh-CN/docs/2.1/admin-manual/data-admin/backup


这里的with类型一共有三种:BROKER broker_name|S3|hdfs

根据 broker 或者S3、hdfs的不同类型,会创建不同的REPOSITORY。
如果是支持s3协议的,直接写s3即可,直接链接云存储,而不通过broker.