Hi everyone, I’m trying to clean up empty segments...
# troubleshooting
h
Hi everyone, I’m trying to clean up empty segments on a REALTIME table in Pinot 1.4.0 and wanted to check if I’m using PurgeTask correctly (no ref in the documentation). Context: • REALTIME table • no upsert • MergeRollupTask is already working fine and merging small segments • but I still have many segments with totalDocs = 0 • I want to automatically delete only those empty segments I found PR #16368 (feat: Enhance PurgeTask to automatically delete empty segments), so I tried adding PurgeTask like this:
Copy code
"task": {
  "taskTypeConfigsMap": {
    "MergeRollupTask": {
      "1day.mergeType": "concat",
      "1day.bucketTimePeriod": "1d",
      "1day.bufferTimePeriod": "1d",
      "1day.maxNumRecordsPerSegment": "5000000",
      "1day.maxNumRecordsPerTask": "50000000",
      "1day.maxNumParallelBuckets": "5"
    },
    "PurgeTask": {
      "schedule": "0 */10 * ? * *"
    }
  }
}
But when it runs, I get this error in the controller logs:
Copy code
ERROR [PinotTaskManager] Failed to generate tasks for task type PurgeTask for table analyse_test_REALTIME
java.lang.NumberFormatException: Cannot parse null string
    at java.base/java.lang.Long.parseLong(Long.java:674)
    at java.base/java.lang.Long.valueOf(Long.java:1163)
    at org.apache.pinot.plugin.minion.tasks.purge.PurgeTaskGenerator.generateTasks(PurgeTaskGenerator.java:121)
A few questions: 1. Is PurgeTask in Pinot 1.4.0 expected to support the “delete empty segments only” use case ? 2. Does it require additional config besides schedule? 3. Is this a known bug in PurgeTaskGenerator? 4. What is the recommended way today to automatically clean up totalDocs = 0 segments on a REALTIME non-upsert table? Thanks !
s
Unfortunately that change did not made it to 1.4 https://github.com/apache/pinot/commits/release-1.4.0/ Also the above error logs that you see are possibly coming from unhandled missing key at PurgeTaskGenerator.java#L129
h
for sure
thanks for the quick answer
🙇 1