Skip to content

Commit

Permalink
update max chunk limit in delimiter
Browse files Browse the repository at this point in the history
Signed-off-by: yuye-aws <[email protected]>
  • Loading branch information
yuye-aws committed Mar 7, 2024
1 parent 0b27618 commit e155b42
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ public DelimiterChunker() {}

public static String MAX_CHUNK_LIMIT_FIELD = "max_chunk_limit";

private static final int DEFAULT_MAX_CHUNK_LIMIT = 100;

@Override
public void validateParameters(Map<String, Object> parameters) {
if (parameters.containsKey(DELIMITER_FIELD)) {
Expand All @@ -30,8 +32,8 @@ public void validateParameters(Map<String, Object> parameters) {
Object maxChunkLimit = parameters.get(MAX_CHUNK_LIMIT_FIELD);
if (!(maxChunkLimit instanceof Integer)) {
throw new IllegalArgumentException("Parameter max_chunk_limit:" + maxChunkLimit.toString() + " should be integer.");
} else if ((int) maxChunkLimit <= 0) {
throw new IllegalArgumentException("Parameter max_chunk_limit:" + maxChunkLimit + " is not greater than 0.");
} else if ((int) maxChunkLimit < 0) {
throw new IllegalArgumentException("Parameter max_chunk_limit:" + maxChunkLimit + " is negative.");
}
}
}
Expand Down

0 comments on commit e155b42

Please sign in to comment.