Skip to content

Commit

Permalink
Fix ut
Browse files Browse the repository at this point in the history
Signed-off-by: wyb <[email protected]>
  • Loading branch information
wyb committed Nov 8, 2024
1 parent 14a14f2 commit 3ddafdb
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions fe/fe-core/src/main/java/com/starrocks/load/pipe/Pipe.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ public class Pipe implements GsonPostProcessable {
public static final long DEFAULT_BATCH_SIZE = 1 << 30; // 1 GB
public static final long DEFAULT_BATCH_FILES = 256;
public static final int FAILED_TASK_THRESHOLD = 5;

private static final String TASK_PROPERTY_PREFIX = "task.";

@SerializedName(value = "name")
private final String name;
Expand Down Expand Up @@ -138,9 +140,9 @@ public static Pipe fromStatement(long id, CreatePipeStmt stmt) {

public void processProperties(Map<String, String> properties) {
for (Map.Entry<String, String> entry : properties.entrySet()) {
String key = entry.getKey();
String key = entry.getKey().toLowerCase();
String value = entry.getValue();
switch (key.toLowerCase()) {
switch (key) {
case PipeAnalyzer.PROPERTY_POLL_INTERVAL: {
this.pollIntervalSecond = Integer.parseInt(value);
break;
Expand All @@ -164,11 +166,11 @@ public void processProperties(Map<String, String> properties) {
}
default: {
// task execution variables
if (key.toUpperCase().startsWith("TASK.")) {
String taskVariable = StringUtils.removeStart(key.toUpperCase(), "TASK.");
if (key.startsWith(TASK_PROPERTY_PREFIX)) {
String taskVariable = StringUtils.removeStart(key, TASK_PROPERTY_PREFIX);
this.taskExecutionVariables.put(taskVariable, value);
} else {
throw new IllegalArgumentException("unsupported property: " + key);
throw new IllegalArgumentException("unsupported property: " + entry.getKey());
}
}
}
Expand Down

0 comments on commit 3ddafdb

Please sign in to comment.