Hi I have created a invertedIndex on one of my col...
# troubleshooting
a
Hi I have created a invertedIndex on one of my columns in the table table configs I have applied indexing then why is it not shwoing in the segments below is my configs
{
"REALTIME": {
"tableName": "game_user_stream_REALTIME",
"tableType": "REALTIME",
"segmentsConfig": {
"replicasPerPartition": "1",
"schemaName": "game_user_stream",
"replication": "1",
"timeColumnName": "gameStartTimestamp",
"minimizeDataMovement": false
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant",
"tagOverrideConfig": {}
},
"tableIndexConfig": {
"createInvertedIndexDuringSegmentGeneration": false,
"autoGeneratedInvertedIndex": false,
"enableDynamicStarTreeCreation": false,
"columnMajorSegmentBuilderEnabled": true,
"optimizeDictionaryForMetrics": false,
"noDictionarySizeRatioThreshold": 0.85,
"varLengthDictionaryColumns": [],
"streamConfigs": {
"streamType": "kafka",
"stream.kafka.topic.name": "game_user_stream",
"stream.kafka.broker.list": "localhost:9092",
"stream.kafka.consumer.type": "lowlevel",
"stream.kafka.consumer.prop.auto.offset.reset": "smallest",
"stream.kafka.consumer.factory.class.name": "org.apache.pinot.plugin.stream.kafka20.KafkaConsumerFactory",
"stream.kafka.decoder.class.name": "org.apache.pinot.plugin.stream.kafka.KafkaJSONMessageDecoder",
"realtime.segment.flush.threshold.rows": "500000",
"realtime.segment.flush.threshold.segment.rows": "0",
"realtime.segment.flush.threshold.time": "24h",
"realtime.segment.flush.threshold.segment.size": "0"
},
"rangeIndexVersion": 2,
"loadMode": "MMAP",
"enableDefaultStarTree": false,
"aggregateMetrics": false,
"nullHandlingEnabled": false,
"optimizeDictionary": false,
"invertedIndexColumns": [
"handId"
],
"noDictionaryColumns": [],
"bloomFilterColumns": [],
"onHeapDictionaryColumns": [],
"rangeIndexColumns": [],
"sortedColumn": []
},
"metadata": {},
"quota": {},
"routing": {
"instanceSelectorType": "strictReplicaGroup"
},
"query": {},
"upsertConfig": {
"mode": "FULL",
"allowPartialUpsertConsumptionDuringCommit": false,
"defaultPartialUpsertStrategy": "OVERWRITE",
"upsertViewRefreshIntervalMs": 3000,
"metadataTTL": 0,
"dropOutOfOrderRecord": false,
"enableSnapshot": false,
"deletedKeysTTL": 0,
"enablePreload": false,
"consistencyMode": "NONE",
"hashFunction": "NONE"
},
"ingestionConfig": {
"continueOnError": false,
"rowTimeValueCheck": false,
"segmentTimeValueCheck": true,
"transformConfigs": [
{
"columnName": "winnerDetail",
"transformFunction": "json_format(WinnerDetails)"
},
{
"columnName": "communityCard",
"transformFunction": "json_format(communityCards)"
},
{
"columnName": "card",
"transformFunction": "json_format(cards)"
}
]
},
"isDimTable": false
}
}
but when I fetch the segments there is no indexing in the segments . Do i need to rebuild all my segments everytime I do indexing anywhere ? below is my segment snippet.
"game_user_stream__0__9__20241231T0932Z" : {
"segmentName" : "game_user_stream__0__9__20241231T0932Z",
"schemaName" : null,
"crc" : 3700427099,
"creationTimeMillis" : 1735637566989,
"creationTimeReadable" : "2024-12-31T09:32:46:989 UTC",
"timeColumn" : "gameStartTimestamp",
"timeUnit" : "MILLISECONDS",
"timeGranularitySec" : 0,
"startTimeMillis" : 1725136885,
"startTimeReadable" : "1970-01-20T23:12:16.885Z",
"endTimeMillis" : 1725136885,
"endTimeReadable" : "1970-01-20T23:12:16.885Z",
"segmentVersion" : "v3",
"creatorName" : null,
"totalDocs" : 500000,
"custom" : { },
"startOffset" : "4500000",
"endOffset" : "5000000",
"columns" : [ ],
"indexes" : { },
"star-tree-index" : null
}
x
have you run the segment reload api ?
a
no can you tell me what is it and how can I do it ?
x
from the controller ui you can click table and reload api
a
I did it from the UI its called reload all segments right ? how long does the proceure takes?
and that means everytime I need to create an index , either I create before hand or if I create it later then I need to relaod it , right ?
x
yes, you need to reload segments always
there is a reload status
a
Copy code
{
  "estimatedTimeRemainingInMinutes": 0,
  "metadata": {
    "jobId": "827c4b1a-ca0b-4735-bf56-ca40e4c6d214",
    "messageCount": "1",
    "submissionTimeMs": "1735721708210",
    "jobType": "RELOAD_SEGMENT",
    "tableName": "game_user_stream_REALTIME"
  },
  "successCount": 75,
  "totalSegmentCount": 75,
  "totalServersQueried": 1,
  "totalServerCallsFailed": 0,
  "timeElapsedInMinutes": 8.291516666666666
}
thats the status
stil I can't see segments
Copy code
"star-tree-index" : null
  },
  "game_user_stream__0__17__20241231T0935Z" : {
    "segmentName" : "game_user_stream__0__17__20241231T0935Z",
    "schemaName" : null,
    "crc" : 3114240630,
    "creationTimeMillis" : 1735637719933,
    "creationTimeReadable" : "2024-12-31T09:35:19:933 UTC",
    "timeColumn" : "gameStartTimestamp",
    "timeUnit" : "MILLISECONDS",
    "timeGranularitySec" : 0,
    "startTimeMillis" : 1725136885,
    "startTimeReadable" : "1970-01-20T23:12:16.885Z",
    "endTimeMillis" : 1725136885,
    "endTimeReadable" : "1970-01-20T23:12:16.885Z",
    "segmentVersion" : "v3",
    "creatorName" : null,
    "totalDocs" : 500000,
    "custom" : { },
    "startOffset" : "8500000",
    "endOffset" : "9000000",
    "columns" : [ ],
    "indexes" : { },
    "star-tree-index" : null
  },
  "game_user_stream__0__9__20241231T0932Z" : {
    "segmentName" : "game_user_stream__0__9__20241231T0932Z",
    "schemaName" : null,
    "crc" : 3700427099,
    "creationTimeMillis" : 1735637566989,
    "creationTimeReadable" : "2024-12-31T09:32:46:989 UTC",
    "timeColumn" : "gameStartTimestamp",
    "timeUnit" : "MILLISECONDS",
    "timeGranularitySec" : 0,
    "startTimeMillis" : 1725136885,
    "startTimeReadable" : "1970-01-20T23:12:16.885Z",
    "endTimeMillis" : 1725136885,
    "endTimeReadable" : "1970-01-20T23:12:16.885Z",
    "segmentVersion" : "v3",
    "creatorName" : null,
    "totalDocs" : 500000,
    "custom" : { },
    "startOffset" : "4500000",
    "endOffset" : "5000000",
    "columns" : [ ],
    "indexes" : { },
    "star-tree-index" : null
  }
"indexes" : { },
"star-tree-index" : null
this is still null even tho I did a segment reload
@Fasih Khatib @Xiang Fu
curl -X GET "http://localhost:9000/segments/game_user_stream_REALTIME/metadata" using this command to get the metadata
I have set these two properties as true
"createInvertedIndexDuringSegmentGeneration": true,
"autoGeneratedInvertedIndex": true,
Still I dont see index while retreiving the metadata
"game_user_stream__0__3__20250101T0915Z" : {
"segmentName" : "game_user_stream__0__3__20250101T0915Z",
"schemaName" : null,
"crc" : 93990260,
"creationTimeMillis" : 1735722922293,
"creationTimeReadable" : "2025-01-01T09:15:22:293 UTC",
"timeColumn" : "gameStartTimestamp",
"timeUnit" : "MILLISECONDS",
"timeGranularitySec" : 0,
"startTimeMillis" : 1735136865,
"startTimeReadable" : "1970-01-21T01:58:56.865Z",
"endTimeMillis" : 1735136865,
"endTimeReadable" : "1970-01-21T01:58:56.865Z",
"segmentVersion" : "v3",
"creatorName" : null,
"totalDocs" : 500000,
"custom" : { },
"startOffset" : "1500000",
"endOffset" : "2000000",
"columns" : [ ],
"indexes" : { },
"star-tree-index" : null
}
x
is this per segment level metadata ? you might need to check this on the pinot server disk
a
what does this mean , sorry yes this is per segment level
x
image.png
I think pinot might not write back the segment metadata with index as it’s referenced to the original segment tar file on deep store. the status could be different
a
here yes its different actually it shows tick for me
so it means the indexing is there right ?
@Xiang Fu
x
yes
a
so if I create a new table then I mention it before only
"createInvertedIndexDuringSegmentGeneration": true,
"autoGeneratedInvertedIndex": true,
what are these two properties ?
should i keep them true or false while index creation
x
I think those are for heuristics
You can keep them true
You can refer to this docs for other configs
Suggest to keep default value
Unless you know what exactly you want and customize
a
Got it