Hi, I'm trying to answer a relatively simple quest...
# general
j
Hi, I'm trying to answer a relatively simple question: Does Pinot support extracting record metadata from Pulsar similar to Kafka (https://docs.pinot.apache.org/basics/data-import/pinot-stream-ingestion/import-from-apache-kafka#extract-record-headers-as-pinot-table-columns). The Design doc for the feature does mention Pulsar and Kinesis (https://docs.google.com/document/d/1kTUfBud1SBSh_703mvu6ybkbIwiKKH9eXpdcpEmhC2E/edit) but based on the docs I wasn't sure if it was actually implemented for more than just Kafka. Thank you!
m
@Navina
n
@Jeff Bolle Yes. we introduced this capability for kafka. For kinesis, the PR is pending merge https://github.com/apache/pinot/pull/9713 (for some reason, I keep forgetting about wrapping this up). For pulsar, I haven't invested time in it.
If needed, I can prioritize it. It should be fairly straightforward 🀞
j
I can also take it on. I think you already did the hard work
n
amazing! would love to have your contribution πŸ™ Happy to review and shepherd your changes when they are ready. feel free to ping me!
m
That would be awesome @Jeff Bolle
j
I'll start work on it tomorrow hopefully...should I use the Kinesis PR as a model?
well, doing this saves me from having to deploy an additional KV store to do direct lookup of any arbitrary object we have ingested with Pulsar and indexed with Pinot, so its a pretty huge win for us and you have already created all the structure, it just needs to be handled for Pulsar.
πŸ‘ 1
n
should I use the Kinesis PR as a model?
yes you can
πŸ‘ 1
j
I have a question on the key value stitch in the Pulsar code....do you know why this was done? Wish a PulsarStreamMessage that keeps the key and value separate, I feel like we can replace all of that, but I'm not sure what purpose it served.
n
@Jeff Bolle that's an apt question πŸ™‚ the stitching approach was done since at that time we didn't have a way to parse the headers . we should be replacing it with the right approach for pulsar too. unfortunately, now it has to be done in a backward compatible manner πŸ˜›
j
I'll see what I can do. I assume there are some existing tests in place that will let me know if I did it wrong πŸ˜‰
🀞 1
I'm working on the PulsarStreamLevelConsumer, and in referencing the KafkaStreamLevelConsumer, I don't see any metadata extraction. Is it not needed?
n
@Jeff Bolle please use
PulsarPartitionLevelConsumer
. stream level consumer would be the high level consumer, which we determined last time doesn't work.
Similar to
KafkaPartitionLevelConsumer
j
Got it. Should we mark as deprecated or include a warning?
βž• 1
I have the existing tests passing. I just need to add some testing for my additions.
n
I will start a one-pager on deprecating the high level consumer model and share it with pinot dev in oss. I don't know how much push back will be there. Imo, high level consumption model should no longer be used and its time to sunset. @Mayank wdyt?
βž• 1
m
We can create a GH issue and discussing there? (I might be very wrong, but I think there’s some team using HLC).
n
Ok. We can perhaps limit it to Kafka and deprecate the remaining. I don't think we even test those implementations.
j
I would say, from the position of a relatively new Pinot user, at least putting a note in the documentation would be an important step.
None of the metadata extraction works on the high level clients
and for Pulsar, a bunch of other things don't work either.
n
@Jeff Bolle yeah I agree. for pulsar, can you highlight the things that don't work?
j
I don't remember off the top of my head. I'll have to review. I believe the last issue was protobuf deserialization.
n
yes. protobuf deserialization and metadata extraction are 2 sticking points.
As I started creating the GH issue, I am noticing that we have stream level consumer implementation only for kafka and pulsar.
j
yeah, that was the big issue for me, once we knew to use the lowlevel consumer, our protobuf serialization from pulsar worked, and we didn't look back.
I probably need to put more in the body
I'm fixing the body of the PR now.
n
I will take a look at the PR today @Jeff Bolle. Meanwhile, looks like we might have a path forward to sunset the stream level apis. See https://github.com/apache/pinot/issues/10996
j
Wow. Amazing job.
Its great to see ideas get proposed and moved forward so quickly.
❀️ 1
n
@Jeff Bolle Looks like your PR was merged last week. Can you please contribute to the docs as well? I think you can edit in gitbook here . TIA !
j
I was just going to ask about docs. I definitely think we need some explanations to help people understand what to configure!
I'll have a look and I'm sure I'll bother you when I have questions.
n
no worries. please tag me and if you don't hear back from me, you can DM. Sometimes I miss the notifications.