So I’m trying to update a table to use a new tenan...
# general
c
So I’m trying to update a table to use a new tenant I’ve created. I’m not sure what I’m doing wrong. I can create a new table in the tenant I just can’t move the table to the new tenant. This is the command and error I’m getting.
curl -X 'PUT' -u admin:password \
'<http://10.11.11.11:9000/tableConfigs/transcript_OFFLINE?reload=false&forceTableSchemaUpdate=true>' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"tableName": "transcript1",
"segmentsConfig": {
"timeColumnName": "timestamp",
"timeType": "MILLISECONDS",
"replication": "1",
"schemaName": "manuscript",
"segmentPushType": "APPEND"
},
"tableIndexConfig": {
"invertedIndexColumns": [],
"loadMode":"heap"
},
"tenants": {
"broker":"overlord",
"server":"overlord"
},
"tableType":"OFFLINE",
"metadata": {}
}'
{"code":400,"error":"Invalid TableConfigs: transcript_OFFLINE"}
However, that config works to create a table.
m
This seems like a bug, try removing the empty metadata from the config? Also, why use loadMoad as heap? Mmap is recommended
cc @saurabh dubey
s
@Curtis Green Can you check the controller for any error messages?
c
I tried this and got the same result.
curl -X 'PUT' -u admin:password \
'<http://10.11.11.11:9000/tableConfigs/transcript_OFFLINE?reload=false&forceTableSchemaUpdate=true>' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"tableName": "transcript",
"segmentsConfig":
{
"timeColumnName": "timestamp",
"timeType": "MILLISECONDS",
"replication": "1",
"schemaName": "manuscript",
"segmentPushType": "APPEND"
},
"tableIndexConfig":
{
"loadMode": "MMAP"
},
"tenants":
{
"broker": "overlord",
"server": "overlord"
},
"tableType": "OFFLINE"
}'
@saurabh dubey I'm not seeing anything in any of the logs when I run this.
This is what my new tenant looks like if that helps
Tried this same error
curl -X 'PUT' -u admin:password \
'<http://10.11.11.11:9000/tableConfigs/transcript_OFFLINE?reload=false&forceTableSchemaUpdate=true>' \
-H 'accept: application/json' \
-H 'Content-Type: application/json' \
-d '{
"tableName": "transcript",
"segmentsConfig": {
"timeColumnName": "timestamp",
"timeType": "MILLISECONDS",
"replication": "2",
"schemaName": "transcript",
"segmentPushType": "APPEND"
},
"tableIndexConfig": {
"invertedIndexColumns": [],
"loadMode":"heap"
},
"tenants": {
"broker":"overlord",
"server":"overlord"
},
"tableType":"OFFLINE",
"metadata": {}
}'
s
Oh.. I didn't notice at first, you're using the
/tableConfis
API, can you try
PUT /tables
API? /tableConfigs API expects tableConfig + schema in the same json. You're posting just the tableConfig json
c
Well now, some days, you kill it And some days, you just choke Some days, you just blast off And some days, you just smoke Well now, maybe I do, and maybe I don't Everybody says they'll be there But in the end, ya'll know they won't Except Saurabh Dubey, they WILL be there for you in your darkest hour when you think all hope is lost of understanding the pinot API. Thank you so much @saurabh dubey this was exactly what I needed. 🥰
@Mayank Thank you too for your help. It was very appreciated. ❤️
🙌 1