Skip to content

Commit

Permalink
Compatible with previous versions
Browse files Browse the repository at this point in the history
  • Loading branch information
JNSimba committed Jan 26, 2024
1 parent f15d145 commit ea65d88
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -234,14 +234,17 @@ private DorisExecutionOptions getDorisExecutionOptions(
builder.enable2PC();
}

builder.setWriteMode(WriteMode.valueOf(readableConfig.get(SINK_WRITE_MODE).toUpperCase()));
builder.setBatchMode(readableConfig.get(SINK_ENABLE_BATCH_MODE));
// Compatible with previous versions
if (readableConfig.get(SINK_ENABLE_BATCH_MODE)) {
builder.setWriteMode(WriteMode.STREAM_LOAD_BATCH);
}
builder.setFlushQueueSize(readableConfig.get(SINK_FLUSH_QUEUE_SIZE));
builder.setBufferFlushMaxRows(readableConfig.get(SINK_BUFFER_FLUSH_MAX_ROWS));
builder.setBufferFlushMaxBytes(readableConfig.get(SINK_BUFFER_FLUSH_MAX_BYTES));
builder.setBufferFlushIntervalMs(readableConfig.get(SINK_BUFFER_FLUSH_INTERVAL).toMillis());

builder.setUseCache(readableConfig.get(SINK_USE_CACHE));
builder.setWriteMode(WriteMode.valueOf(readableConfig.get(SINK_WRITE_MODE).toUpperCase()));
return builder.build();
}

Expand Down

0 comments on commit ea65d88

Please sign in to comment.