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
4 changes: 2 additions & 2 deletions docs/sources/shared/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -1448,7 +1448,7 @@ dataobj:
[shaprefixsize: <int> | default = 2]

# The maximum amount of time to wait in seconds before flushing an object
# that is no longer receiving new writes
# that is no longer receiving new writes.
# CLI flag: -dataobj-consumer.idle-flush-timeout
[idle_flush_timeout: <duration> | default = 1h]

Expand All @@ -1457,7 +1457,7 @@ dataobj:
# CLI flag: -dataobj-consumer.max-builder-age
[max_builder_age: <duration> | default = 1h]

# The name of the Kafka topic
# The name of the Kafka topic.
# CLI flag: -dataobj-consumer.topic
[topic: <string> | default = ""]

Expand Down
21 changes: 17 additions & 4 deletions pkg/dataobj/consumer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,21 @@ func (cfg *Config) RegisterFlagsWithPrefix(prefix string, f *flag.FlagSet) {
cfg.LifecyclerConfig.RegisterFlagsWithPrefix(prefix, f, util_log.Logger)
cfg.PartitionRingConfig.RegisterFlagsWithPrefix(prefix, f)
cfg.UploaderConfig.RegisterFlagsWithPrefix(prefix, f)

f.StringVar(&cfg.Topic, prefix+"topic", "", "The name of the Kafka topic")
f.DurationVar(&cfg.IdleFlushTimeout, prefix+"idle-flush-timeout", 60*60*time.Second, "The maximum amount of time to wait in seconds before flushing an object that is no longer receiving new writes")
f.DurationVar(&cfg.MaxBuilderAge, prefix+"max-builder-age", time.Hour, "The maximum amount of time to accumulate data in a builder before flushing it. Defaults to 1 hour.")
f.StringVar(
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Easier to read on smaller screens (no horizontal scrolling).

&cfg.Topic,
prefix+"topic",
"",
"The name of the Kafka topic.",
)
f.DurationVar(
&cfg.IdleFlushTimeout,
prefix+"idle-flush-timeout",
time.Hour,
"The maximum amount of time to wait in seconds before flushing an object that is no longer receiving new writes.",
)
f.DurationVar(&cfg.MaxBuilderAge,
prefix+"max-builder-age",
time.Hour,
"The maximum amount of time to accumulate data in a builder before flushing it. Defaults to 1 hour.",
)
}