Skip to content

Commit 70cf85b

Browse files
SungJin1212yeya24
andauthored
Parquet Store gateway (#7046)
* parquet store gateway poc Signed-off-by: yeya24 <benye@amazon.com> * refactor and fix test Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * fix test Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * delete unused code Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * add spans Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * rollback InitialSync Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * Rollback wait stability max/min duration Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * Add inflight request limit not checked test Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * integate parquet bucket storage test with existing test Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * fix lint Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * fix lint Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * add changelog Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * fix changelog Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * rollback bucket store metrics Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * delete unused fields Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * fix lint Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> * move changelog Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> --------- Signed-off-by: yeya24 <benye@amazon.com> Signed-off-by: SungJin1212 <tjdwls1201@gmail.com> Co-authored-by: yeya24 <benye@amazon.com>
1 parent aaf4512 commit 70cf85b

File tree

18 files changed

+1788
-182
lines changed

18 files changed

+1788
-182
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## master / unreleased
44

5+
* [FEATURE] StoreGateway: Introduces a new parquet mode. #7046
56
* [ENHANCEMENT] Ingester: Add `enable_matcher_optimization` config to apply low selectivity matchers lazily. #7063
67
* [ENHANCEMENT] Distributor: Add a label references validation for remote write v2 request. #7074
78
* [ENHANCEMENT] Distributor: Add count, spans, and buckets validations for native histogram. #7072

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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2401,6 +2401,10 @@ bucket_store:
24012401
# CLI flag: -blocks-storage.bucket-store.block-discovery-strategy
24022402
[block_discovery_strategy: <string> | default = "concurrent"]
24032403

2404+
# Type of bucket store to use (tsdb or parquet).
2405+
# CLI flag: -blocks-storage.bucket-store.bucket-store-type
2406+
[bucket_store_type: <string> | default = "tsdb"]
2407+
24042408
# Max size - in bytes - of a chunks pool, used to reduce memory allocations.
24052409
# The pool is shared across all tenants. 0 to disable the limit.
24062410
# CLI flag: -blocks-storage.bucket-store.max-chunk-pool-bytes

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ require (
3535
github.com/lib/pq v1.10.9
3636
github.com/minio/minio-go/v7 v7.0.93
3737
github.com/mitchellh/go-wordwrap v1.0.1
38-
github.com/oklog/ulid v1.3.1 // indirect
38+
github.com/oklog/ulid v1.3.1
3939
github.com/opentracing-contrib/go-grpc v0.1.2
4040
github.com/opentracing-contrib/go-stdlib v1.1.0
4141
github.com/opentracing/opentracing-go v1.2.0

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)