public static InlongGroupInfo createGroupInfo(InlongGroupInfo groupInfo, BaseSortConf sortConf) {
        Preconditions.expectNotNull(groupInfo, "Inlong group info cannot be null");
        String groupId = groupInfo.getInlongGroupId();
        Preconditions.expectNotBlank(groupId, ErrorCodeEnum.GROUP_ID_IS_EMPTY);
        // init extensions
        if (groupInfo.getExtList() == null) {
            groupInfo.setExtList(new ArrayList<>());
        }
        // set authentication into group ext list
        List<InlongGroupExtInfo> extInfos = new ArrayList<>();
        if (groupInfo.getAuthentication() != null) {
            Authentication authentication = groupInfo.getAuthentication();
            AuthType authType = authentication.getAuthType();
            Preconditions.expectTrue(authType == AuthType.TOKEN,
                    String.format("Unsupported authentication %s for Pulsar", authType.name()));
            TokenAuthentication tokenAuthentication = (TokenAuthentication) authentication;
            InlongGroupExtInfo authTypeExt = new InlongGroupExtInfo();
            authTypeExt.setKeyName(InlongConstants.PULSAR_AUTHENTICATION_TYPE);
            authTypeExt.setKeyValue(tokenAuthentication.getAuthType().toString());
            extInfos.add(authTypeExt);

            InlongGroupExtInfo authValue = new InlongGroupExtInfo();
            authValue.setKeyName(InlongConstants.PULSAR_AUTHENTICATION);
            authValue.setKeyValue(tokenAuthentication.getToken());
            extInfos.add(authValue);

            groupInfo.getExtList().addAll(extInfos);
        }

        if (sortConf == null) {
            throw new IllegalArgumentException("sort config cannot be empty for group=" + groupId);
        }
        // set the sort config into ext list
        SortType sortType = sortConf.getType();
        List<InlongGroupExtInfo> sortExtInfos;
        if (sortType == SortType.FLINK) {
            FlinkSortConf flinkSortConf = (FlinkSortConf) sortConf;
            sortExtInfos = createFlinkExtInfo(flinkSortConf);
        } else if (sortType == SortType.USER_DEFINED) {
            UserDefinedSortConf udf = (UserDefinedSortConf) sortConf;
            sortExtInfos = createUserDefinedSortExtInfo(udf);
        } else {
            // todo local
            sortExtInfos = new ArrayList<>();
        }

        groupInfo.getExtList().addAll(sortExtInfos);
        return groupInfo;
    }
Create inlong group info from group config.
inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongGroupTransfer.java