Code review comment: I am a little confused, should the concept consistent no matter it is a shared nothing mode or shared data mode. so what's the following three concepts mapping to filestore?  * volume id -> uuid * svKey -> ?? * svName -> ??

Code under review:
public static void beforeClass() throws Exception {
        UtFrameUtils.createMinStarRocksCluster();

        
        connectContext = UtFrameUtils.createDefaultCtx();
        
        String createDbStmtStr = "create database test;";
        String createTableStr = "create table test.tbl1(d1 date, k1 int, k2 bigint) duplicate key(d1, k1) "
                + "PARTITION BY RANGE(d1) (PARTITION p20210201 VALUES [('2021-02-01'), ('2021-02-02')),"
                + "PARTITION p20210202 VALUES [('2021-02-02'), ('2021-02-03')),"
                + "PARTITION p20210203 VALUES [('2021-02-03'), ('2021-02-04'))) distributed by hash(k1) "
                + "buckets 1 properties('replication_num' = '1');";
        createDb(createDbStmtStr);
        createTable(createTableStr);

        StarOSAgent agent = new StarOSAgent();

        FilePathInfo.Builder builder = FilePathInfo.newBuilder();
        FileStoreInfo.Builder fsBuilder = builder.getFsInfoBuilder();

        S3FileStoreInfo.Builder s3FsBuilder = fsBuilder.getS3FsInfoBuilder();
        s3FsBuilder.setBucket("test-bucket");
        s3FsBuilder.setRegion("test-region");
        s3FsBuilder.setCredential(AwsCredentialInfo.newBuilder()
                .setDefaultCredential(AwsDefaultCredentialInfo.newBuilder().build()));
        S3FileStoreInfo s3FsInfo = s3FsBuilder.build();

        fsBuilder.setFsType(FileStoreType.S3);
        fsBuilder.setFsKey("test-bucket");
        fsBuilder.setFsName("test-fsname");
        fsBuilder.setS3FsInfo(s3FsInfo);
        FileStoreInfo fsInfo = fsBuilder.build();

        builder.setFsInfo(fsInfo);
        builder.setFullPath("s3:
        FilePathInfo pathInfo = builder.build();

        new Expectations(agent) {
            {
                agent.allocateFilePath(anyString, anyLong);
                result = pathInfo;
                agent.createShardGroup(anyLong, anyLong, anyLong);
                result = GlobalStateMgr.getCurrentState().getNextId();
                agent.createShards(anyInt, pathInfo, (FileCacheInfo) any, anyLong, (Map<String, String>) any);
                returns(Lists.newArrayList(10001L, 10002L, 10003L),
                        Lists.newArrayList(10004L, 10005L, 10006L),
                        Lists.newArrayList(10007L, 10008L, 10009L));
                agent.getPrimaryComputeNodeIdByShard(anyLong, anyLong);
                result = GlobalStateMgr.getCurrentSystemInfo().getBackendIds(true).get(0);
            }
        };

        new MockUp<RunMode>() {
            @Mock
            public RunMode getCurrentRunMode() {
                return RunMode.SHARED_DATA;
            }
        };

        new MockUp<SharedNothingStorageVolumeMgr>() {
            @Mock
            public StorageVolume getStorageVolumeByName(String svKey) throws AnalysisException {
                return StorageVolume.fromFileStoreInfo(fsInfo);
            }
        };

        Deencapsulation.setField(GlobalStateMgr.getCurrentState(), "starOSAgent", agent);

        String createLakeTableStr = "create table test.lake_table(k1 date, k2 int, k3 smallint, v1 varchar(2048), "
                + "v2 datetime default '2014-02-04 15:36:00')"
                + " duplicate key(k1, k2, k3)"
                + " PARTITION BY RANGE(k1, k2, k3)"
                + " (PARTITION p1 VALUES [(\"2014-01-01\", \"10\", \"200\"), (\"2014-01-01\", \"20\", \"300\")),"
                + " PARTITION p2 VALUES [(\"2014-06-01\", \"100\", \"200\"), (\"2014-07-01\", \"100\", \"300\")))"
                + " DISTRIBUTED BY HASH(k2) BUCKETS 3"
                + " PROPERTIES ( \"enable_storage_cache\" = \"true\", \"storage_cache_ttl\" = \"3600\")";
        createTable(createLakeTableStr);
    }

Line commented on: public StorageVolume getStorageVolumeByName(String svKey) throws AnalysisException {

Revised code:
public static void beforeClass() throws Exception {
        UtFrameUtils.createMinStarRocksCluster();

        
        connectContext = UtFrameUtils.createDefaultCtx();
        
        String createDbStmtStr = "create database test;";
        String createTableStr = "create table test.tbl1(d1 date, k1 int, k2 bigint) duplicate key(d1, k1) "
                + "PARTITION BY RANGE(d1) (PARTITION p20210201 VALUES [('2021-02-01'), ('2021-02-02')),"
                + "PARTITION p20210202 VALUES [('2021-02-02'), ('2021-02-03')),"
                + "PARTITION p20210203 VALUES [('2021-02-03'), ('2021-02-04'))) distributed by hash(k1) "
                + "buckets 1 properties('replication_num' = '1');";
        createDb(createDbStmtStr);
        createTable(createTableStr);

        StarOSAgent agent = new StarOSAgent();

        FilePathInfo.Builder builder = FilePathInfo.newBuilder();
        FileStoreInfo.Builder fsBuilder = builder.getFsInfoBuilder();

        S3FileStoreInfo.Builder s3FsBuilder = fsBuilder.getS3FsInfoBuilder();
        s3FsBuilder.setBucket("test-bucket");
        s3FsBuilder.setRegion("test-region");
        s3FsBuilder.setCredential(AwsCredentialInfo.newBuilder()
                .setDefaultCredential(AwsDefaultCredentialInfo.newBuilder().build()));
        S3FileStoreInfo s3FsInfo = s3FsBuilder.build();

        fsBuilder.setFsType(FileStoreType.S3);
        fsBuilder.setFsKey("test-bucket");
        fsBuilder.setFsName("test-fsname");
        fsBuilder.setS3FsInfo(s3FsInfo);
        FileStoreInfo fsInfo = fsBuilder.build();

        builder.setFsInfo(fsInfo);
        builder.setFullPath("s3:
        FilePathInfo pathInfo = builder.build();

        new Expectations(agent) {
            {
                agent.allocateFilePath(anyString, anyLong);
                result = pathInfo;
                agent.createShardGroup(anyLong, anyLong, anyLong);
                result = GlobalStateMgr.getCurrentState().getNextId();
                agent.createShards(anyInt, pathInfo, (FileCacheInfo) any, anyLong, (Map<String, String>) any);
                returns(Lists.newArrayList(10001L, 10002L, 10003L),
                        Lists.newArrayList(10004L, 10005L, 10006L),
                        Lists.newArrayList(10007L, 10008L, 10009L));
                agent.getPrimaryComputeNodeIdByShard(anyLong, anyLong);
                result = GlobalStateMgr.getCurrentSystemInfo().getBackendIds(true).get(0);
            }
        };

        new MockUp<RunMode>() {
            @Mock
            public RunMode getCurrentRunMode() {
                return RunMode.SHARED_DATA;
            }
        };

        new MockUp<SharedNothingStorageVolumeMgr>() {
            @Mock
            public StorageVolume getStorageVolumeByName(String svName) throws AnalysisException {
                return StorageVolume.fromFileStoreInfo(fsInfo);
            }
        };

        Deencapsulation.setField(GlobalStateMgr.getCurrentState(), "starOSAgent", agent);

        String createLakeTableStr = "create table test.lake_table(k1 date, k2 int, k3 smallint, v1 varchar(2048), "
                + "v2 datetime default '2014-02-04 15:36:00')"
                + " duplicate key(k1, k2, k3)"
                + " PARTITION BY RANGE(k1, k2, k3)"
                + " (PARTITION p1 VALUES [(\"2014-01-01\", \"10\", \"200\"), (\"2014-01-01\", \"20\", \"300\")),"
                + " PARTITION p2 VALUES [(\"2014-06-01\", \"100\", \"200\"), (\"2014-07-01\", \"100\", \"300\")))"
                + " DISTRIBUTED BY HASH(k2) BUCKETS 3"
                + " PROPERTIES ( \"enable_storage_cache\" = \"true\", \"storage_cache_ttl\" = \"3600\")";
        createTable(createLakeTableStr);
    }