Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
chenzl25 committed Nov 27, 2024
1 parent 3b02778 commit b50277c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions ci/scripts/e2e-iceberg-engine-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions risedev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/frontend/src/handler/create_table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit b50277c

Please sign in to comment.