diff --git a/ci/scripts/e2e-iceberg-engine-test.sh b/ci/scripts/e2e-iceberg-engine-test.sh index b48d0312002c..c298adb247bb 100755 --- a/ci/scripts/e2e-iceberg-engine-test.sh +++ b/ci/scripts/e2e-iceberg-engine-test.sh @@ -7,6 +7,7 @@ source ci/scripts/common.sh # prepare environment export CONNECTOR_LIBS_PATH="./connector-node/libs" +export AWS_REGION="us-east-1" while getopts 'p:' opt; do case ${opt} in diff --git a/risedev.yml b/risedev.yml index 5c8bb312aec5..bfb417afa7b8 100644 --- a/risedev.yml +++ b/risedev.yml @@ -129,9 +129,6 @@ profile: persist-data: true iceberg-engine: - env: - AWS_REGION: "ap-southeast-2" - CONNECTOR_LIBS_PATH: ".risingwave/bin/connector-node/libs" steps: - use: minio - use: postgres diff --git a/src/frontend/src/handler/create_table.rs b/src/frontend/src/handler/create_table.rs index 0ccc14561e2a..fa65397281ab 100644 --- a/src/frontend/src/handler/create_table.rs +++ b/src/frontend/src/handler/create_table.rs @@ -33,6 +33,7 @@ use risingwave_common::util::iter_util::ZipEqFast; use risingwave_common::util::sort_util::{ColumnOrder, OrderType}; use risingwave_common::util::value_encoding::DatumToProtoExt; use risingwave_common::{bail, bail_not_implemented}; +use risingwave_connector::jvm_runtime::JVM; use risingwave_connector::source::cdc::build_cdc_table_id; use risingwave_connector::source::cdc::external::{ ExternalTableConfig, ExternalTableImpl, DATABASE_NAME_KEY, SCHEMA_NAME_KEY, TABLE_NAME_KEY, @@ -1641,6 +1642,10 @@ pub async fn create_iceberg_engine_table( with.insert("enable_config_load".to_string(), "true".to_string()); source_handler_args.with_options = WithOptions::new_with_options(with); + // before we create the table, ensure the JVM is initialized as we use jdbc catalog right now. + // If JVM isn't initialized successfully, current not atomic ddl will result in a partially created iceberg engine table. + let _ = JVM.get_or_init()?; + let catalog_writer = session.catalog_writer()?; // TODO(iceberg): make iceberg engine table creation ddl atomic catalog_writer