fluvio
fluvio copied to clipboard
Improve fluvio topic describe with additional information
The current fluvio topic describe
has been built 3 years ago and it's stale.
We should update this command with the following information:
$ fluvio topic describe my-topic
Name : my-topic
Replication : 1
Partitions : 2
State : Provisioned
PARTITION LEADER LAST-OFFSET LAST-PRODUCED CONSUMERS
0 5001 3,543 1 sec ago c1, c2
1 5002 1,240 5 sec ago c3
Note
Let's start with the client approach, as calculating and adding a PartitionStatus object on the SC is a bigger effort.
- To get last offset, use LEO (Last End Offset).
- To get last produced, get last event and get timestamp of the event. This could be done in the client (easier) or can be
- To get consumers, use
fluvio consumer list
as guidance.
Hey @ajhunyady... With some delay, I started fixing this issue. I have two questions:
- I am assuming that LAST-OFFSET refers to status.leader.leo; Is that right?
- IDK which field to use to calculate LAST-PRODUCED.
TY
@diogopontual very cool! @sehz can you please help with identify the right field?
Confirm. To get last offset, use LEO (Last End Offset). To get last produced, get last event and get timestamp of the event. This could be done in the client (easier) or can be calculated in the SC (that's more restructuring) and add to PartitionStatus but that's bigger efforts. So let's start with client approach
@diogopontual this PR will send you all over the code base. Once you are done, you'll have a pretty good grip on how fluvio works 😉
Sounds good! That sounds good! I hope to understand everything and create this PR quickly!
TY
Hey @ajhunyady, I'm sorry for the long delay. I had some issues with my previous job, and I was fixing them.
Well, I am back. Looking at the current description, more data fields are being printed:
Should I remove some of them to make it similar to this issue description?
Thank you.
Im taking advantage of Type
field as of the new issues API here!
Hey @ajhunyady, I'm sorry for the long delay. I had some issues with my previous job, and I was fixing them.
Well, I am back. Looking at the current description, more data fields are being printed:
Should I remove some of them to make it similar to this issue description?
Thank you.
Hi @diogopontual welcome back :)
It looks like I missed a few fields. I've edited the issue description to include the other parameters. I left out (ignore rack assignment). Let me know if I missed anything relevant.