Skip to content

Commit 6ed3416

Browse files
committed
refactor and fix test
Signed-off-by: SungJin1212 <[email protected]>
1 parent 7828861 commit 6ed3416

15 files changed

+889
-537
lines changed

docs/blocks-storage/querier.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1729,6 +1729,10 @@ blocks_storage:
17291729
# CLI flag: -blocks-storage.bucket-store.block-discovery-strategy
17301730
[block_discovery_strategy: <string> | default = "concurrent"]
17311731

1732+
# Type of bucket store to use (tsdb or parquet).
1733+
# CLI flag: -blocks-storage.bucket-store.bucket-store-type
1734+
[bucket_store_type: <string> | default = "tsdb"]
1735+
17321736
# Max size - in bytes - of a chunks pool, used to reduce memory allocations.
17331737
# The pool is shared across all tenants. 0 to disable the limit.
17341738
# CLI flag: -blocks-storage.bucket-store.max-chunk-pool-bytes

docs/blocks-storage/store-gateway.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,13 +311,13 @@ store_gateway:
311311

312312
# Minimum time to wait for ring stability at startup. 0 to disable.
313313
# CLI flag: -store-gateway.sharding-ring.wait-stability-min-duration
314-
[wait_stability_min_duration: <duration> | default = 1m]
314+
[wait_stability_min_duration: <duration> | default = 0s]
315315

316316
# Maximum time to wait for ring stability at startup. If the store-gateway
317317
# ring keeps changing after this period of time, the store-gateway will
318318
# start anyway.
319319
# CLI flag: -store-gateway.sharding-ring.wait-stability-max-duration
320-
[wait_stability_max_duration: <duration> | default = 5m]
320+
[wait_stability_max_duration: <duration> | default = 5s]
321321

322322
# Timeout for waiting on store-gateway to become desired state in the ring.
323323
# CLI flag: -store-gateway.sharding-ring.wait-instance-state-timeout
@@ -1815,6 +1815,10 @@ blocks_storage:
18151815
# CLI flag: -blocks-storage.bucket-store.block-discovery-strategy
18161816
[block_discovery_strategy: <string> | default = "concurrent"]
18171817

1818+
# Type of bucket store to use (tsdb or parquet).
1819+
# CLI flag: -blocks-storage.bucket-store.bucket-store-type
1820+
[bucket_store_type: <string> | default = "tsdb"]
1821+
18181822
# Max size - in bytes - of a chunks pool, used to reduce memory allocations.
18191823
# The pool is shared across all tenants. 0 to disable the limit.
18201824
# CLI flag: -blocks-storage.bucket-store.max-chunk-pool-bytes

docs/configuration/config-file-reference.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2396,6 +2396,10 @@ bucket_store:
23962396
# CLI flag: -blocks-storage.bucket-store.block-discovery-strategy
23972397
[block_discovery_strategy: <string> | default = "concurrent"]
23982398

2399+
# Type of bucket store to use (tsdb or parquet).
2400+
# CLI flag: -blocks-storage.bucket-store.bucket-store-type
2401+
[bucket_store_type: <string> | default = "tsdb"]
2402+
23992403
# Max size - in bytes - of a chunks pool, used to reduce memory allocations.
24002404
# The pool is shared across all tenants. 0 to disable the limit.
24012405
# CLI flag: -blocks-storage.bucket-store.max-chunk-pool-bytes
@@ -6458,13 +6462,13 @@ sharding_ring:
64586462
64596463
# Minimum time to wait for ring stability at startup. 0 to disable.
64606464
# CLI flag: -store-gateway.sharding-ring.wait-stability-min-duration
6461-
[wait_stability_min_duration: <duration> | default = 1m]
6465+
[wait_stability_min_duration: <duration> | default = 0s]
64626466
64636467
# Maximum time to wait for ring stability at startup. If the store-gateway
64646468
# ring keeps changing after this period of time, the store-gateway will start
64656469
# anyway.
64666470
# CLI flag: -store-gateway.sharding-ring.wait-stability-max-duration
6467-
[wait_stability_max_duration: <duration> | default = 5m]
6471+
[wait_stability_max_duration: <duration> | default = 5s]
64686472
64696473
# Timeout for waiting on store-gateway to become desired state in the ring.
64706474
# CLI flag: -store-gateway.sharding-ring.wait-instance-state-timeout

integration/e2ecortex/services.go

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,41 @@ func NewIngesterWithConfigFile(name string, store RingStore, address, configFile
204204
)
205205
}
206206

207+
func NewParquetConverter(name string, store RingStore, address string, flags map[string]string, image string) *CortexService {
208+
return NewParquetConverterWithConfigFile(name, store, address, "", flags, image)
209+
}
210+
211+
func NewParquetConverterWithConfigFile(name string, store RingStore, address, configFile string, flags map[string]string, image string) *CortexService {
212+
if configFile != "" {
213+
flags["-config.file"] = filepath.Join(e2e.ContainerSharedDir, configFile)
214+
}
215+
216+
// Configure the ingesters ring backend
217+
flags["-ring.store"] = string(store)
218+
switch store {
219+
case RingStoreConsul:
220+
flags["-consul.hostname"] = address
221+
case RingStoreEtcd:
222+
flags["-etcd.endpoints"] = address
223+
}
224+
225+
if image == "" {
226+
image = GetDefaultImage()
227+
}
228+
229+
return NewCortexService(
230+
name,
231+
image,
232+
e2e.NewCommandWithoutEntrypoint("cortex", e2e.BuildArgs(e2e.MergeFlags(map[string]string{
233+
"-target": "parquet-converter",
234+
"-log.level": "warn",
235+
}, flags))...),
236+
e2e.NewHTTPReadinessProbe(httpPort, "/ready", 200, 299),
237+
httpPort,
238+
grpcPort,
239+
)
240+
}
241+
207242
func NewQueryFrontend(name string, flags map[string]string, image string) *CortexService {
208243
return NewQueryFrontendWithConfigFile(name, "", flags, image)
209244
}

0 commit comments

Comments
 (0)