public static Connection getConnection(String url, String user, String password) throws Exception {
        UrlVerificationUtils.extractHostAndValidatePortFromJdbcUrl(url, STAR_ROCKS_JDBC_PREFIX);
        Connection conn;
        try {
            Class.forName(STAR_ROCKS_DRIVER_CLASS);
            conn = DriverManager.getConnection(url, user, password);
            LOGGER.info("Successfully obtained StarRocks connection, URL: {}", url);
            return conn;
        } catch (Exception e) {
            String errMsg =
                    "Failed to get StarRocks connection, please check StarRocks JDBC URL, username, or password.";
            LOGGER.error(errMsg, e);
            throw new Exception(errMsg + ", error: " + e.getMessage());
        }
    }
Get a StarRocks JDBC connection using the provided URL, username, and password.

@param url      The StarRocks JDBC URL.
@param user     The username for authentication.
@param password The password for authentication.
@return A {@link Connection} representing the StarRocks database connection.
@throws Exception If an error occurs during connection establishment.
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/starrocks/StarRocksJdbcUtils.java