starrocks icon indicating copy to clipboard operation
starrocks copied to clipboard

[Feature] COS posix bucket support

Open rickif opened this issue 1 year ago • 2 comments

Why I'm doing:

What I'm doing:

This PR adds the support of COS posix bucket. With broker, you can use Broker Load to load data from COS posix bucket, and use SELECT INTO OUTFILE to export data to COS posix bucket. This is maily inspired by https://cloud.tencent.com/document/product/436/82208.

LOAD LABEL db0.label3 (     DATA INFILE("cosn://xxx/some.parquet")     INTO TABLE tbl_student     FORMAT AS "parquet"     (name, age)  ) WITH BROKER  srbroker ( 
"fs.cosn.bucket.endpoint_suffix" = "cos.ap-guangzhou.myqcloud.com",
"fs.cosn.userinfo.region"="ap-guangzhou",
"qcloud.object.storage.ranger.service.address"="10.0.0.26:9999",
"hadoop.security.authentication"="kerberos",
"fs.ofs.tmp.cache.dir"="/tmp","fs.cosn.trsf.fs.ofs.user.appid"="12345",
"qcloud.object.storage.kerberos.principal"="hadoop/10.0.0.26@EMR-ABC",
"kerberos_principal"="hadoop/10.0.0.26@EMR-ABC", 
"kerberos_keytab"="/var/krb5kdc/emr.keytab"
);
SELECT * FROM tbl_student INTO OUTFILE "cosn://some_bucket/parquet/" FORMAT AS PARQUET PROPERTIES (
"broker.name"="srbroker",
"fs.cosn.bucket.endpoint_suffix" = "cos.ap-guangzhou.myqcloud.com",
"fs.cosn.userinfo.region"="ap-guangzhou",
"qcloud.object.storage.ranger.service.address"="10.0.0.26:9999",
"hadoop.security.authentication"="kerberos",
"fs.ofs.tmp.cache.dir"="/tmp","fs.cosn.trsf.fs.ofs.user.appid"="12345",
"qcloud.object.storage.kerberos.principal"="hadoop/10.0.0.26@EMR-ABC",
"kerberos_principal"="hadoop/10.0.0.26@EMR-ABC", 
"kerberos_keytab"="/var/krb5kdc/emr.keytab"
);

Fixes https://github.com/StarRocks/starrocks/issues/46020

What type of PR is this:

  • [ ] BugFix
  • [x] Feature
  • [ ] Enhancement
  • [ ] Refactor
  • [ ] UT
  • [ ] Doc
  • [ ] Tool

Does this PR entail a change in behavior?

  • [x] Yes, this PR will result in a change in behavior.
  • [ ] No, this PR will not result in a change in behavior.

If yes, please specify the type of change:

  • [ ] Interface/UI changes: syntax, type conversion, expression evaluation, display information
  • [ ] Parameter changes: default values, similar parameters but with different default values
  • [ ] Policy changes: use new policy to replace old one, functionality automatically enabled
  • [ ] Feature removed
  • [x] Miscellaneous: upgrade & downgrade compatibility, etc.

Checklist:

  • [ ] I have added test cases for my bug fix or my new feature
  • [x] This pr needs user documentation (for new or modified features or behaviors)
    • [ ] I have added documentation for my new feature or new function
  • [ ] This is a backport pr

Bugfix cherry-pick branch check:

  • [x] I have checked the version labels which the pr will be auto-backported to the target branch
    • [x] 3.3
    • [x] 3.2
    • [x] 3.1
    • [ ] 3.0

rickif avatar Mar 14 '24 12:03 rickif

[FE Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] avatar May 22 '24 12:05 github-actions[bot]

[BE Incremental Coverage Report]

:white_check_mark: pass : 0 / 0 (0%)

github-actions[bot] avatar May 22 '24 12:05 github-actions[bot]

@mergifyio backport branch-3.3 branch-3.2 branch-3.1

rickif avatar May 23 '24 02:05 rickif

backport branch-3.3 branch-3.2 branch-3.1

✅ Backports have been created

mergify[bot] avatar May 23 '24 02:05 mergify[bot]