Aditya
01/19/2022, 11:38 AM"instanceAssignmentConfigMap": {
"OFFLINE": {
"tagPoolConfig": {
"tag": "DefaultTenant_OFFLINE",
"poolBased": false,
"numPools": 0
},
"replicaGroupPartitionConfig": {
"replicaGroupBased": true,
"numInstances": 2,
"numReplicaGroups": 1,
"numInstancesPerReplicaGroup": 2,
"numPartitions": 4,
"numInstancesPerPartition": 1
}
}
},
Getting this error when trying rebalance server dry run
"description": "Caught exception while calculating target assignment: java.lang.IllegalStateException: Instance partitions: transactions_partitioned_OFFLINE should contain 1 replica and 1 partition for non-replica-group based assignment"
What could be wrong with this config?Aditya
01/19/2022, 11:42 AM{
"OFFLINE": {
"tableName": "transactions_partitioned_OFFLINE",
"tableType": "OFFLINE",
"segmentsConfig": {
"schemaName": "transactions_partitioned",
"replication": "1",
"segmentPushFrequency": "HOURLY",
"segmentPushType": "APPEND",
"timeColumnName": "created_at_epoch",
"allowNullTimeValue": false
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant"
},
"tableIndexConfig": {
"invertedIndexColumns": [],
"noDictionaryColumns": [],
"rangeIndexColumns": [],
"rangeIndexVersion": 2,
"autoGeneratedInvertedIndex": false,
"createInvertedIndexDuringSegmentGeneration": false,
"sortedColumn": [
"user_id"
],
"bloomFilterColumns": [],
"loadMode": "MMAP",
"onHeapDictionaryColumns": [],
"varLengthDictionaryColumns": [],
"enableDefaultStarTree": false,
"enableDynamicStarTreeCreation": false,
"segmentPartitionConfig": {
"columnPartitionMap": {
"user_id": {
"functionName": "Murmur",
"numPartitions": 4
}
}
},
"aggregateMetrics": false,
"nullHandlingEnabled": false
},
"metadata": {},
"quota": {},
"routing": {
"segmentPrunerTypes": [
"partition"
],
"instanceSelectorType": "replicaGroup"
},
"query": {},
"instanceAssignmentConfigMap": {
"OFFLINE": {
"tagPoolConfig": {
"tag": "DefaultTenant_OFFLINE",
"poolBased": false,
"numPools": 0
},
"replicaGroupPartitionConfig": {
"replicaGroupBased": true,
"numInstances": 2,
"numReplicaGroups": 1,
"numInstancesPerReplicaGroup": 2,
"numPartitions": 4,
"numInstancesPerPartition": 1
}
}
},
"fieldConfigList": [],
"ingestionConfig": {
"transformConfigs": [
{
"columnName": "created_at_epoch",
"transformFunction": "fromDateTime(\"created_at\", 'yyyy-MM-dd HH:mm:ss.SSS')"
}
]
},
"isDimTable": false
}
}Aditya
01/19/2022, 11:47 AMDefaultTenant_OFFLINE ?
Where can we define the Helix instance config to tag a server? Indicated here : https://docs.pinot.apache.org/operators/operating-pinot/instance-assignmentAditya
01/19/2022, 5:59 PM"replicaGroupPartitionConfig": {
"replicaGroupBased": true,
"numInstances": 2,
"numReplicaGroups": 1,
"numInstancesPerReplicaGroup": 2,
"numPartitions": 2,
"numInstancesPerPartition": 1
}
Getting the same error due to pre-condition check while rebalancing servers
Caught exception while calculating target assignment: java.lang.IllegalStateException: Instance partitions: transactions_partitioned_OFFLINE should contain 1 replica and 1 partition for non-replica-group based assignment
Please point out any errors in this configMayank
Mayank
Mayank
Aditya
01/20/2022, 5:14 AMServer 1 : partition 0 and 1
Server 2 : partition 2 and 3
What you suggested will do this right?
Server 1 : partition 0, 1, 2, 3
Server 2 : partition 0, 1, 2, 3
I thought keeping replication at 1 and numInstancesPerPartition as 1 will achieve thisAditya
01/20/2022, 5:24 AMMayank
Aditya
01/28/2022, 6:14 PM"replicaGroupPartitionConfig": {
"replicaGroupBased": true,
"numInstances": 0,
"numReplicaGroups": 2,
"numInstancesPerReplicaGroup": 2,
"numPartitions": 2,
"numInstancesPerPartition": 1
}
Rebalanced servers dry run with reassign instances true. It moves all the segments (irrespective of partition) to just one server per replica group and other server is assigned no segments.
The partitions should have been evenly distributed among the 2 servers in a replica group.
What is the significance of 1_0 and 1_1 keys in partitionToInstancesMap? It seams they are not used in actual segment assignment
{
"status": "DONE",
"description": "Dry-run mode",
"instanceAssignment": {
"OFFLINE": {
"instancePartitionsName": "transcript_OFFLINE",
"partitionToInstancesMap": {
"0_0": [
"Server_10.9.9.255_8098"
],
"0_1": [
"Server_10.9.9.255_9098"
],
"1_0": [
"Server_10.9.3.206_8098"
],
"1_1": [
"Server_10.9.5.78_8098"
]
}
}
},
"segmentAssignment": {
"transcript_OFFLINE_1570863600000_1570863600000_0": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_1": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_2": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_3": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
}
}
}
Another thread I found in slack (albeit for realtime upsert table) where numInstancesPerPartition = 1 seems to be assigning all segments to one server https://apache-pinot.slack.com/archives/C011C9JHN7R/p1638900028351800
Please point out error in the config. Shall I select different option while rebalancing servers? tried Reassign Instances and BootstrapMayank
"numInstancesPerPartition": 2 ? Also can you confirm if the data is partitioned by inspecting the segment metadata?Aditya
01/28/2022, 6:39 PM"numInstancesPerPartition": 2 , It is distributing segments equally, but now a specific partition can go to any of the two servers.
{
"status": "DONE",
"description": "Instance reassigned in dry-run mode, table is already balanced",
"instanceAssignment": {
"OFFLINE": {
"instancePartitionsName": "transcript_OFFLINE",
"partitionToInstancesMap": {
"0_0": [
"Server_10.9.3.206_8098",
"Server_10.9.9.255_8098"
],
"0_1": [
"Server_10.9.5.78_8098",
"Server_10.9.9.255_9098"
],
"1_0": [
"Server_10.9.3.206_8098",
"Server_10.9.9.255_8098"
],
"1_1": [
"Server_10.9.5.78_8098",
"Server_10.9.9.255_9098"
]
}
}
},
"segmentAssignment": {
"transcript_OFFLINE_1570863600000_1570863600000_0": {
"Server_10.9.3.206_8098": "ONLINE",
"Server_10.9.5.78_8098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_1": {
"Server_10.9.3.206_8098": "ONLINE",
"Server_10.9.5.78_8098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_2": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_3": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
}
}
}Jackie
01/28/2022, 6:50 PMJackie
01/28/2022, 6:52 PMOne conclusion is partitioned replica group based assignment is only possible for numReplicaGroups > 1
This should be fixed. Can you please file a github issue to track this?Aditya
01/28/2022, 6:54 PMAditya
01/28/2022, 6:57 PM./transcript_OFFLINE_1570863600000_1570863600000_0/v3/metadata.properties:column.studentID.partitionValues = 0
./transcript_OFFLINE_1570863600000_1570863600000_1/v3/metadata.properties:column.studentID.partitionValues = 0
./transcript_OFFLINE_1570863600000_1570863600000_2/v3/metadata.properties:column.studentID.partitionValues = 1
./transcript_OFFLINE_1570863600000_1570863600000_3/v3/metadata.properties:column.studentID.partitionValues = 1Aditya
01/28/2022, 7:14 PMJackie
01/28/2022, 8:42 PMstudnetID instead of user_id as configured in the table config?Aditya
01/29/2022, 3:43 AM{
"OFFLINE": {
"tableName": "transcript_OFFLINE",
"tableType": "OFFLINE",
"segmentsConfig": {
"schemaName": "transcript",
"replication": "1",
"timeColumnName": "timestampInEpoch",
"allowNullTimeValue": false,
"segmentPushFrequency": "DAILY",
"segmentPushType": "APPEND",
"replicasPerPartition": "1"
},
"tenants": {
"broker": "DefaultTenant",
"server": "DefaultTenant"
},
"tableIndexConfig": {
"invertedIndexColumns": [],
"noDictionaryColumns": [],
"rangeIndexColumns": [],
"rangeIndexVersion": 2,
"autoGeneratedInvertedIndex": false,
"createInvertedIndexDuringSegmentGeneration": false,
"sortedColumn": [],
"bloomFilterColumns": [],
"loadMode": "MMAP",
"onHeapDictionaryColumns": [],
"varLengthDictionaryColumns": [],
"enableDefaultStarTree": false,
"aggregateMetrics": false,
"enableDynamicStarTreeCreation": false,
"segmentPartitionConfig": {
"columnPartitionMap": {
"studentID": {
"functionName": "Modulo",
"numPartitions": 2
}
}
},
"nullHandlingEnabled": false
},
"metadata": {},
"quota": {},
"routing": {
"segmentPrunerTypes": [
"partition"
],
"instanceSelectorType": "replicaGroup"
},
"query": {},
"instanceAssignmentConfigMap": {
"OFFLINE": {
"tagPoolConfig": {
"tag": "DefaultTenant_OFFLINE",
"poolBased": false,
"numPools": 0
},
"replicaGroupPartitionConfig": {
"replicaGroupBased": true,
"numInstances": 0,
"numReplicaGroups": 2,
"numInstancesPerReplicaGroup": 2,
"numPartitions": 2,
"numInstancesPerPartition": 1
}
}
},
"ingestionConfig": {},
"isDimTable": false
}
}Jackie
02/03/2022, 12:04 AMsegmentsConfig, you need to add the following config:
{
"replicaGroupStrategyConfig": {
"partitionColumn": "studentID"
}
}Aditya
02/03/2022, 5:19 AM"numInstancesPerPartition": 1 else there was validation error
INFO [PinotTableRestletResource] [grizzly-http-server-3] Invalid table config: transcript_OFFLINE with error: Missing required creator property 'numInstancesPerPartition' (index 1)
at [Source: (String)"{"tableName":"transcript_OFFLINE","tableType":"OFFLINE","segmentsConfig":{"schemaName":"transcript","replication":"1","timeColumnName":"timestampInEpoch","allowNullTimeValue":false,"segmentPushFrequency":"DAILY","segmentPushType":"APPEND","replicasPerPartition":"1","replicaGroupStrategyConfig":{"partitionColumn":"studentID"}},"tenants":{"broker":"DefaultTenant","server":"DefaultTenant"},"tableIndexConfig":{"invertedIndexColumns":[],"noDictionaryColumns":[],"rangeIndexColumns":[],"rangeIndexVersi"[truncated 899 chars]; line: 1, column: 326] (through reference chain: org.apache.pinot.spi.config.table.TableConfig["segmentsConfig"]->org.apache.pinot.spi.config.table.SegmentsValidationAndRetentionConfig["replicaGroupStrategyConfig"]->org.apache.pinot.spi.config.table.ReplicaGroupStrategyConfig["numInstancesPerPartition"]) exception: Missing required creator property 'numInstancesPerPartition' (index 1)
at [Source: (String)"{"tableName":"transcript_OFFLINE","tableType":"OFFLINE","segmentsConfig":{"schemaName":"transcript","replication":"1","timeColumnName":"timestampInEpoch","allowNullTimeValue":false,"segmentPushFrequency":"DAILY","segmentPushType":"APPEND","replicasPerPartition":"1","replicaGroupStrategyConfig":{"partitionColumn":"studentID"}},"tenants":{"broker":"DefaultTenant","server":"DefaultTenant"},"tableIndexConfig":{"invertedIndexColumns":[],"noDictionaryColumns":[],"rangeIndexColumns":[],"rangeIndexVersi"[truncated 899 chars]; line: 1, column: 326] (through reference chain: org.apache.pinot.spi.config.table.TableConfig["segmentsConfig"]->org.apache.pinot.spi.config.table.SegmentsValidationAndRetentionConfig["replicaGroupStrategyConfig"]->org.apache.pinot.spi.config.table.ReplicaGroupStrategyConfig["numInstancesPerPartition"])
This config worked:
"replicaGroupStrategyConfig": {
"partitionColumn": "studentID",
"numInstancesPerPartition": 1
}
Segment assignment after rebalance servers
{
"status": "DONE",
"description": "Instance reassigned in dry-run mode, table is already balanced",
"instanceAssignment": {
"OFFLINE": {
"instancePartitionsName": "transcript_OFFLINE",
"partitionToInstancesMap": {
"0_0": [
"Server_10.9.9.255_8098"
],
"0_1": [
"Server_10.9.9.255_9098"
],
"1_0": [
"Server_10.9.3.206_8098"
],
"1_1": [
"Server_10.9.5.78_8098"
]
}
}
},
"segmentAssignment": {
"transcript_OFFLINE_1570863600000_1570863600000_0": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_1": {
"Server_10.9.9.255_8098": "ONLINE",
"Server_10.9.9.255_9098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_2": {
"Server_10.9.3.206_8098": "ONLINE",
"Server_10.9.5.78_8098": "ONLINE"
},
"transcript_OFFLINE_1570863600000_1570863600000_3": {
"Server_10.9.3.206_8098": "ONLINE",
"Server_10.9.5.78_8098": "ONLINE"
}
}
}
"numInstancesPerPartition": 1 is now present at 2 places replicaGroupStrategyConfig and replicaGroupPartitionConfig , keeping both same for now
Any pointers on how to find undocumented config options?Jackie
02/03/2022, 6:09 AMAditya
02/03/2022, 6:12 AMJackie
02/03/2022, 7:14 AM