Skip to content

Commit

Permalink
change batch size default value and add max limitation
Browse files Browse the repository at this point in the history
  • Loading branch information
gnehil committed Sep 3, 2024
1 parent 721f8ab commit 859c4a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ public interface ConfigurationOptions {
int DORIS_TABLET_SIZE_MIN = 1;

String DORIS_BATCH_SIZE = "doris.batch.size";
int DORIS_BATCH_SIZE_DEFAULT = 1024;
int DORIS_BATCH_SIZE_DEFAULT = 4064;
int DORIS_BATCH_SIZE_MAX = 65535;

String DORIS_EXEC_MEM_LIMIT = "doris.exec.mem.limit";
long DORIS_EXEC_MEM_LIMIT_DEFAULT = 8L * 1024 * 1024 * 1024;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ class ScalaValueReader(partition: PartitionDefinition, settings: Settings) exten

// max row number of one read batch
val batchSize = Try {
settings.getProperty(DORIS_BATCH_SIZE, DORIS_BATCH_SIZE_DEFAULT.toString).toInt
//
Math.min(settings.getProperty(DORIS_BATCH_SIZE, DORIS_BATCH_SIZE_DEFAULT.toString).toInt, DORIS_BATCH_SIZE_MAX)
} getOrElse {
logWarning(String.format(ErrorMessages.PARSE_NUMBER_FAILED_MESSAGE, DORIS_BATCH_SIZE, settings.getProperty(DORIS_BATCH_SIZE)))
DORIS_BATCH_SIZE_DEFAULT
Expand Down

0 comments on commit 859c4a5

Please sign in to comment.