Skip to content

Commit

Permalink
add API kafka config DateTimeZone #1043
Browse files Browse the repository at this point in the history
  • Loading branch information
ffffwh committed Feb 23, 2023
1 parent 192b3e2 commit 243b790
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/handler/v2/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -622,6 +622,7 @@ func buildDatabaseSrcTaskConfigMap(config *models.SrcTaskConfig, destConfig *mod
kafkaMap["MessageGroupMaxSize"] = kafkaConfig.MessageGroupMaxSize
kafkaMap["MessageGroupTimeout"] = kafkaConfig.MessageGroupTimeout
kafkaMap["Converter"] = kafka.CONVERTER_JSON
kafkaMap["DateTimeZone"] = kafkaConfig.DateTimeZone
taskConfigInNomadFormat["KafkaConfig"] = kafkaMap
}

Expand Down Expand Up @@ -1433,6 +1434,7 @@ func buildKafkaDestTaskDetail(taskName string, internalTaskKafkaConfig common.Ka
Topic: internalTaskKafkaConfig.Topic,
MessageGroupMaxSize: internalTaskKafkaConfig.MessageGroupMaxSize,
MessageGroupTimeout: internalTaskKafkaConfig.MessageGroupTimeout,
DateTimeZone: internalTaskKafkaConfig.DateTimeZone,
}

for _, a := range allocsFromNomad {
Expand Down
1 change: 1 addition & 0 deletions api/models/job_v2.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ type KafkaDestTaskConfig struct {
NodeId string `json:"node_id,omitempty"`
BrokerAddrs []string `json:"kafka_broker_addrs" validate:"required" example:"127.0.0.1:9092"`
Topic string `json:"kafka_topic" validate:"required"`
DateTimeZone string `json:"kafka_date_time_zone"`
MessageGroupMaxSize uint64 `json:"message_group_max_size"`
MessageGroupTimeout uint64 `json:"message_group_timeout"`
}
Expand Down

0 comments on commit 243b790

Please sign in to comment.