Hi folks, I have some queries regarding pinot: 1. ...
# troubleshooting
r
Hi folks, I have some queries regarding pinot: 1. How does the flushing logic works with Realtime Table in Pinot? What is the logic, and if i have added upsert config in the table config, will the complete data (i.e; the duplicate data, not upsert) can we do custom flushing of those records more frequently than the upserted Realtime Data. For example: there are 50 records with same primary key, now pinot's upsert will show me only the latest record with primary key. Now I want to delete the records that are duplicate for me, more frequently. Suppose I have a retention of 2 days so the records in that also I want the retention of duplicate records to be more lesser to 3-4 hours or more lesser. 2. Another Query regarding the Cleanup policy, is that. is there any cleanup(Delete or any other) policy with Offline Tables. Suppose we want to delete offline segments daily and publish offline segments daily for our use case. If there is any method, please dm me or send a reply. With this use case, we will push our offline data daily and other segments I want to delete it after every pushing of data. I want to know any cleanup policy for the Offline Tables. 3. And a detail info about flushing, what is does, how are the records being stored in segments and what happens to the records after flushing? @Mayank @Jackie @Xiang Fu
Any suggestion?
m
1. Flushing is based on config you specify (size / time thresholds). Rows cannot be flushed out of order. What's the reason for deleting duplicate records? Are you worried about storage? 2. Do you want to overwrite existing segments? If so, just use the same names, they will be overwritten. 3. They are stored in compressed Pinot format and indexed. When flushed, they are committed to durable storage (deep-store)
r
@Mayank I want to ask how the Pinot is creating new segments after some time in Realtime table and if the I have my kafka topic with partition 1 but in pinot I have 7 segments created for the same records. How is that happening?
m
Pinot will periodically flush the in-memory segments on to disk. This is config driven, and based on thresholds like size / rows / time. Once the threshold is reached, segment is flushed to disk. If you have 1 partition, there can still be multiple segments on that partition depending on how many times it is flushed. I don't follow what you mean by 7 segments created for the same records - if you are saying segments are generated with duplicate data, that is not possible. How did you establish that they have the same set of records?
r
no I'm saying that the kafka have 1 partition but after going into pinot, it has 7 segments created till now.