Sonit Rathi
03/08/2023, 6:07 AMThere are 8566 invalid segment/s. This usually means that they were created with an older schema. Please reload the table in order to refresh these segments to the new schema.
have tried reloading segments as well as rebalancing servers still getting the same warning messaghe.Mayank
Sonit Rathi
03/08/2023, 6:09 AMMayank
saurabh dubey
03/08/2023, 6:24 AMSonit Rathi
03/08/2023, 6:32 AMsaurabh dubey
03/08/2023, 6:34 AMSonit Rathi
03/08/2023, 6:34 AMsaurabh dubey
03/08/2023, 6:35 AMSonit Rathi
03/08/2023, 6:36 AMsaurabh dubey
03/08/2023, 6:38 AMcontroller.disable.ingestion.groovy=false
To your controller conf? By default groovy is disabledSonit Rathi
03/08/2023, 6:39 AMsaurabh dubey
03/08/2023, 6:40 AMSonit Rathi
03/08/2023, 6:47 AMSonit Rathi
03/08/2023, 6:57 AMsaurabh dubey
03/08/2023, 7:00 AMStarting default column action: {} on column: {}
Log.
Could you check the segment directory (default /home/pinot/data/index/{tableName}/{segmentName} )
And check if the new column that you've added is in the index_map file?saurabh dubey
03/08/2023, 7:01 AM<YourcolumnName>.forward_index.startOffset =saurabh dubey
03/08/2023, 7:02 AMcolumn.{yourColumnName}Sonit Rathi
03/08/2023, 7:04 AMsaurabh dubey
03/08/2023, 7:06 AMsaurabh dubey
03/08/2023, 7:06 AMSonit Rathi
03/08/2023, 7:07 AM{
"schemaName": "bot_session_master_data",
"dimensionFieldSpecs": [
{
"name": "brand_id",
"dataType": "INT",
"maxLength": 20
},
{
"name": "bot_id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "account_id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "channel_id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "customer_id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "ext_session_id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "flow_id",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "flow_version",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "status",
"dataType": "INT",
"maxLength": 10
},
{
"name": "resolve_type",
"dataType": "INT",
"maxLength": 10
},
{
"name": "last_node",
"dataType": "STRING",
"maxLength": 100
},
{
"name": "ref_id",
"dataType": "STRING",
"maxLength": 100
}
],
"metricFieldSpecs": [
{
"name": "validity",
"dataType": "INT",
"maxLength": 100
}
],
"dateTimeFieldSpecs": [
{
"name": "created_at",
"dataType": "LONG",
"format": "1:MILLISECONDS:EPOCH",
"granularity": "1:SECONDS"
}
]
}Sonit Rathi
03/08/2023, 7:07 AM{
"REALTIME": {
"tableName": "bot_session_master_data_REALTIME",
"tableType": "REALTIME",
"segmentsConfig": {
"schemaName": "bot_session_master_data",
"retentionTimeUnit": "DAYS",
"retentionTimeValue": "365",
"replication": "2",
"replicasPerPartition": "2",
"minimizeDataMovement": false,
"timeColumnName": "created_at"
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant",
"tagOverrideConfig": {}
},
"tableIndexConfig": {
"invertedIndexColumns": [
"status",
"channel_id",
"resolve_type"
],
"noDictionaryColumns": [],
"rangeIndexVersion": 2,
"autoGeneratedInvertedIndex": false,
"createInvertedIndexDuringSegmentGeneration": false,
"sortedColumn": [
"id",
"customer_id"
],
"rangeIndexColumns": [],
"bloomFilterColumns": [],
"loadMode": "MMAP",
"streamConfigs": {
"streamType": "kafka",
"stream.kafka.topic.name": "bot-session-master-data",
"stream.kafka.broker.list": "<http://infra-in-mc-kafkav2-01.onedirect.in:9092,infra-in-mc-kafkav2-02.onedirect.in:9092,infra-in-mc-kafkav2-03.onedirect.in:9092,infra-in-mc-kafkav2-04.onedirect.in:9092,infra-in-mc-kafkav2-05.onedirect.in:9092|infra-in-mc-kafkav2-01.onedirect.in:9092,infra-in-mc-kafkav2-02.onedirect.in:9092,infra-in-mc-kafkav2-03.onedirect.in:9092,infra-in-mc-kafkav2-04.onedirect.in:9092,infra-in-mc-kafkav2-05.onedirect.in: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": "1000000",
"realtime.segment.flush.threshold.time": "24h",
"realtime.segment.flush.segment.size": "100M"
},
"onHeapDictionaryColumns": [],
"varLengthDictionaryColumns": [],
"enableDefaultStarTree": false,
"enableDynamicStarTreeCreation": true,
"aggregateMetrics": false,
"nullHandlingEnabled": false,
"optimizeDictionaryForMetrics": false,
"noDictionarySizeRatioThreshold": 0
},
"metadata": {},
"quota": {},
"routing": {
"instanceSelectorType": "strictReplicaGroup"
},
"query": {},
"ingestionConfig": {
"transformConfigs": [
{
"columnName": "brand_id",
"transformFunction": "Groovy({brandId},brandId)"
},
{
"columnName": "ext_session_id",
"transformFunction": "Groovy({extSessionId},extSessionId)"
},
{
"columnName": "customer_id",
"transformFunction": "Groovy({customerId},customerId)"
},
{
"columnName": "bot_id",
"transformFunction": "Groovy({botId},botId)"
},
{
"columnName": "created_at",
"transformFunction": "Groovy({createdAt},createdAt)"
},
{
"columnName": "account_id",
"transformFunction": "Groovy({accountId},accountId)"
},
{
"columnName": "channel_id",
"transformFunction": "Groovy({channelId},channelId)"
},
{
"columnName": "flow_id",
"transformFunction": "Groovy({flowId},flowId)"
},
{
"columnName": "flow_version",
"transformFunction": "Groovy({flowVersion},flowVersion)"
},
{
"columnName": "resolve_type",
"transformFunction": "Groovy({resolveType},resolveType)"
},
{
"columnName": "last_node",
"transformFunction": "Groovy({lastNode},lastNode)"
},
{
"columnName": "ref_id",
"transformFunction": "Groovy({refId},refId)"
}
]
},
"isDimTable": false
}
}Sonit Rathi
03/08/2023, 7:07 AMsaurabh dubey
03/08/2023, 7:12 AMSonit Rathi
03/08/2023, 7:12 AMsaurabh dubey
03/08/2023, 7:16 AMSonit Rathi
03/08/2023, 7:19 AMSonit Rathi
03/08/2023, 7:19 AMsaurabh dubey
03/08/2023, 7:35 AM"columnName": "ref_id",
"transformFunction": "Groovy({refId},refId)"
references refId, which does not exist in the segment at all. i suppose the intent is that it'll be part of the incoming message?
But at the very least I'd expect to see 2 log lines
1)
<http://LOGGER.info|LOGGER.info>("Starting default column action: {} on column: {}", action, column);
2)
LOGGER.warn("Skip creating derived column: {} because argument: {} does not exist in the segment", column,
argument);
I'm not sure why that's not being printed. Let me run some tests locally and will updatesaurabh dubey
03/08/2023, 8:19 AMrefId to be able to evaluate the transform function, what is your expectation for the default value to be for old segments?
I'm thinking you can follow these steps
1. Pause consumption (//tables/{tableName}/pauseConsumption)
2. Wait for pause consumption to finish (/tables/{tableName}/pauseStatus to return 0 consumingSegments)
3. Remove the transform function from your table config, trigger reload. This will put a default value for ref_id ("null")
4. Add the transform function back to table config, resume consumption.
This would mean, ref_id will be set to null for all old segments, and after 4), new messages that will be ingested will have the correct value (parsed from message's refId field)saurabh dubey
03/08/2023, 8:20 AMSonit Rathi
03/09/2023, 5:51 AMsaurabh dubey
03/09/2023, 6:01 AMMayank
saurabh dubey
03/09/2023, 7:01 PM