Skip to content

Commit

Permalink
debug:Delete the useless parseSinkStreamLoadProperties method
Browse files Browse the repository at this point in the history
  • Loading branch information
buvb committed Dec 28, 2023
1 parent 2320c40 commit 069479b
Showing 1 changed file with 2 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@ public enum StreamLoadFormat {

private final ReadableConfig tableOptions;
private final Map<String, String> streamLoadProps = new HashMap<>();
private final Map<String, String> tableOptionsMap;
private StarRocksSinkSemantic sinkSemantic;
private boolean supportUpsertDelete;
private String[] tableSchemaFieldNames;
Expand All @@ -175,10 +174,8 @@ public enum StreamLoadFormat {

private final List<StreamLoadTableProperties> tablePropertiesList = new ArrayList<>();

public StarRocksSinkOptions(ReadableConfig options, Map<String, String> optionsMap) {
public StarRocksSinkOptions(ReadableConfig options) {
this.tableOptions = options;
this.tableOptionsMap = optionsMap;
parseSinkStreamLoadProperties();
this.validate();
}

Expand Down Expand Up @@ -459,16 +456,6 @@ private void validateRequired() {
"Either all or none of the following options should be provided:\n" + String.join("\n", propertyNames));
}

private void parseSinkStreamLoadProperties() {
tableOptionsMap.keySet().stream()
.filter(key -> key.startsWith(SINK_PROPERTIES_PREFIX))
.forEach(key -> {
final String value = tableOptionsMap.get(key);
final String subKey = key.substring((SINK_PROPERTIES_PREFIX).length()).toLowerCase();
streamLoadProps.put(subKey, value);
});
}

/**
* Builder for {@link StarRocksSinkOptions}.
*/
Expand All @@ -484,7 +471,7 @@ public Builder withProperty(String key, String value) {
}

public StarRocksSinkOptions build() {
return new StarRocksSinkOptions(conf, conf.toMap());
return new StarRocksSinkOptions(conf);
}
}

Expand Down

0 comments on commit 069479b

Please sign in to comment.