StarRocks / starrocks

StarRocks, a Linux Foundation project, is a next-generation sub-second MPP OLAP database for full analytics scenarios, including multi-dimensional analytics, real-time analytics, and ad-hoc queries.
https://starrocks.io
Apache License 2.0
8.74k stars 1.75k forks source link

Using Iceberg external catalog. Gives issues when trying to query data. Unable to load region from system settings. #23432

Closed alberttwong closed 1 year ago

alberttwong commented 1 year ago

Following instructions at https://github.com/StarRocks/starrocks/discussions/23427

Following the Apache Iceberg quickstart at https://iceberg.apache.org/spark-quickstart/#adding-a-catalog and modifying the docker compose yaml to include the SR allin1 image. Did the rest of the iceberg quickstart (creating table and inserting data). Created the external catalog inside of SR but getting region error when I try to query the iceberg tables.

StarRocks > create external catalog 'iceberg'
    -> PROPERTIES
    -> (
    ->     "aws.s3.use_instance_profile" = "true",
    ->     "aws.s3.region" = "us-east-1",
    ->     "uri" = "http://iceberg-rest:8181",
    ->     "warehouse" = "starrocks",
    ->     "type" = "iceberg",
    ->     "iceberg.catalog.type" = "rest"
    -> );
Query OK, 0 rows affected (0.02 sec)

StarRocks > set catalog iceberg;
Query OK, 0 rows affected (0.01 sec)

StarRocks > use nyc
Database changed
StarRocks > select * from taxis;
ERROR 1064 (HY000): Unable to load region from any of the providers in the chain software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain@334f960c: [software.amazon.awssdk.regions.providers.SystemSettingsRegionProvider@5dd640b6: Unable to load region from system settings. Region must be specified either via environment variable (AWS_REGION) or  system property (aws.region)., software.amazon.awssdk.regions.providers.AwsProfileRegionProvider@5f0eb1d8: No region provided in profile: default, software.amazon.awssdk.
StarRocks > show tables;
+---------------+
| Tables_in_nyc |
+---------------+
| taxis         |
+---------------+
1 row in set (0.03 sec)
alberttwong commented 1 year ago
StarRocks > select * from taxis;
ERROR 1064 (HY000): Unable to load region from any of the providers in the chain software.amazon.awssdk.regions.providers.DefaultAwsRegionProviderChain@63090fce: [software.amazon.awssdk.regions.providers.SystemSettingsRegionProvider@20584e75: Unable to load region from system settings. Region must be specified either via environment variable (AWS_REGION) or  system property (aws.region)., software.amazon.awssdk.regions.providers.AwsProfileRegionProvider@1f2ac6a5: No region provided in profile: default, software.amazon.awssdk.
StarRocks > select current_version();
+-------------------+
| current_version() |
+-------------------+
| 3.0.1 a1f411b77b  |
+-------------------+
1 row in set (0.02 sec)

StarRocks >
alberttwong commented 1 year ago

This issue is using local apache iceberg docker environment with local SR docker image https://github.com/StarRocks/starrocks/discussions/23427