Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,11 @@ private PipelineDef parse(JsonNode pipelineDefJsonNode, Configuration globalPipe
// UDFs are optional. We parse UDF first and remove it from the pipelineDefJsonNode since
// it's not of plain data types and must be removed before calling toPipelineConfig.
List<UdfDef> udfDefs = new ArrayList<>();
Optional.ofNullable(((ObjectNode) pipelineDefJsonNode.get(PIPELINE_KEY)).remove(UDF_KEY))
.ifPresent(node -> node.forEach(udf -> udfDefs.add(toUdfDef(udf))));
if (pipelineDefJsonNode.get(PIPELINE_KEY) != null) {
Optional.ofNullable(
((ObjectNode) pipelineDefJsonNode.get(PIPELINE_KEY)).remove(UDF_KEY))
.ifPresent(node -> node.forEach(udf -> udfDefs.add(toUdfDef(udf))));
}

// Pipeline configs are optional
Configuration userPipelineConfig = toPipelineConfig(pipelineDefJsonNode.get(PIPELINE_KEY));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import java.net.URL;
import java.nio.file.Paths;
import java.time.Duration;
import java.time.ZoneId;
import java.util.Arrays;
import java.util.Collections;

Expand Down Expand Up @@ -426,7 +427,9 @@ void testParsingFullDefinitionFromString() throws Exception {
Collections.emptyList(),
Collections.emptyList(),
Collections.emptyList(),
Configuration.fromMap(Collections.singletonMap("parallelism", "1")));
Configuration.fromMap(
Collections.singletonMap(
"local-time-zone", ZoneId.systemDefault().toString())));

private final PipelineDef fullDefWithRouteRepSym =
new PipelineDef(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,3 @@ source:

sink:
type: kafka

pipeline:
parallelism: 1