-
Notifications
You must be signed in to change notification settings - Fork 484
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vparquet3] Add command to tempo-cli to analyse blocks for dedicated columns #2622
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works like a charm :)
cmd/tempo-cli/cmd-analyse-block.go
Outdated
case vparquet.VersionString: | ||
return vparquet.FieldSpanAttrKey, vparquetSpanAttrs | ||
case vparquet2.VersionString: | ||
return vparquet2.FieldSpanAttrKey, vparquet2SpanAttrs | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume this will be vParquet2
and vParquet3
as soon as vParquet3
is realeased?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Certainly 👍
tempodb/encoding/vparquet/block.go
Outdated
|
||
func newBackendBlock(meta *backend.BlockMeta, r backend.Reader) *backendBlock { | ||
return &backendBlock{ | ||
func NewBackendBlock(meta *backend.BlockMeta, r backend.Reader) *BackendBlock { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering whether there is an alternative to making this function and BackendBlock
public. Maybe the CLI could have a thin wrapper around backend.ContextReader
that implements an io.ReaderAt
that can be passed into parquet.OpenFile()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used NewBackendReaderAt()
and passed the reader to parquet.OpenFile()
instead. No need to export BackendBlock
nor any of its methods. Nice call.
|
||
## Analyse blocks | ||
Analyses all blocks in a given time range and outputs a summary of the blocks' generic attributes. | ||
It's of particular use when trying to determine what attributes to configure for dedicated columns in vParquet3. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe link to the dedicated columns page (PR#2664)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving the doc portion of the PR. Thank you for adding doc!
Co-authored-by: Kim Nylander <104772500+knylander-grafana@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What this PR does:
NOTE: Depends on
vparquet3
being merged tomain
Adds two new methods to
tempo-cli
to analyse parquet blocks and output summaries of generic attribute columns:Analyse block
Analyses a block and outputs a summary of the block's generic attributes.
It's of particular use when trying to determine what attributes to configure for dedicated columns in vParquet3.
Arguments:
tenant-id
The tenant ID. Usesingle-tenant
for single tenant setups.block-id
The block ID as UUID string.Options:
--num-attr <value>
Number of attributes to output (default: 10)Example:
Analyse blocks
Analyses all blocks in a given time range and outputs a summary of the blocks' generic attributes. It's of particular use when trying to determine what attributes to configure for dedicated columns in vParquet3.Arguments:
tenant-id
The tenant ID. Usesingle-tenant
for single tenant setups.Options:
--num-attr <value>
Number of attributes to output (default: 10)--min-compaction-level <value>
Minimum compaction level to include in the analysis (default: 3)--max-blocks <value>
Maximum number of blocks to analyse (default: 10)Example:
Which issue(s) this PR fixes:
Fixes #2630
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]