StarRocks / demo

Apache License 2.0
79 stars 55 forks source link

update shared data compose #29

Closed DanRoscigno closed 7 months ago

DanRoscigno commented 7 months ago
DanRoscigno commented 7 months ago

Use:

Check the cluster

Check the Compute Node (CN)

Connect to the FE with an SQL client

mysql -P9030 -h127.0.0.1 -uroot --prompt="StarRocks > "
StarRocks > SHOW COMPUTE NODES\G
*************************** 1. row ***************************
        ComputeNodeId: 10004
                   IP: 10.5.0.3
        HeartbeatPort: 9050
               BePort: 9060
             HttpPort: 8040
             BrpcPort: 8060
        LastStartTime: 2023-11-29 01:05:36
        LastHeartbeat: 2023-11-29 01:08:47
                Alive: true
 SystemDecommissioned: false
ClusterDecommissioned: false
               ErrMsg:
              Version: 3.1.5-5d8438a
             CpuCores: 6
    NumRunningQueries: 0
           MemUsedPct: 0.08 %
           CpuUsedPct: 0.1 %
       HasStoragePath: true
          StarletPort: 8167
             WorkerId: 1001
1 row in set (0.01 sec)

Create a MinIO bucket

open http://localhost:9001/buckets

Create a MinIO keypair

open http://localhost:9001/access-keys

DDL for a shared-data storage volume

Details for the configuration shown below:

CREATE STORAGE VOLUME shared
TYPE = S3
LOCATIONS = ("s3://starrocks/shared/")
PROPERTIES
(
    "enabled" = "true",
    "aws.s3.endpoint" = "http://minio:9000",
    "aws.s3.use_aws_sdk_default_behavior" = "false",
    "aws.s3.enable_ssl" = "false",
    "aws.s3.use_instance_profile" = "false",
    "aws.s3.access_key" = "npAamJH7naisPNnUMzBW",
    "aws.s3.secret_key" = "E33cdRM9MfWpP2FiRpc056Zclg6CntXWa3WPBNMy"
);

SET shared AS DEFAULT STORAGE VOLUME;
StarRocks > DESC STORAGE VOLUME shared\G
*************************** 1. row ***************************
     Name: shared
     Type: S3
IsDefault: true
 Location: s3://starrocks/shared/
   Params: {"aws.s3.access_key":"******","aws.s3.secret_key":"******","aws.s3.endpoint":"http://minio:9000","aws.s3.region":"us-east-1","aws.s3.use_instance_profile":"false","aws.s3.use_aws_sdk_default_behavior":"false"}
  Enabled: true
  Comment:
1 row in set (0.03 sec)