Hi Team, I am trying to create multiple tenant. it...
# general
v
Hi Team, I am trying to create multiple tenant. its needed untagged servers and broker. i define 6 server while installing pinot but the problem all are adding to defaulttenant. how can i prevent it? even i tried to remove from default tenant but its still showing tagged in logs.
✅ 1
@Mark Needham @Seunghyun @Mayank @Neha Pawar @saurabh dubey please help me with this?
s
have you checked the above?
v
yes, i've already checked it. the problem is i am trying to create new tenant but its showing error there is no untagged servers
i've created multiple server but all are tagging to default tenant
even i removed tag but still same error
s
Try this API
Copy code
/instances/{instanceName}/updateTags
You'd want to pass the server name which you want to move to different tenant, and the tags parameter should have <yourTenantNameHere>_OFFLINE / <yourTenantNameHere>_REALTIME based on what kind of tenant you'd like
Success of the tagging can be verified from ZK -> CONFIGS -> PARTICIPANT -> <server name>. Look for the TAG_LIST field
v
to move i need 2nd tenant as well right? which i am not able to create
s
No need 🙂 A tenant is simply a tag list. Once you've added the tags using /updateTags, you can use the GET /tenants/{tenantName} API to validate your servers are added to new tenant
v
that means it will create new tenant automatically?
s
Yes
v
thanks man, let me try it
@saurabh dubey i've created new tenant, and table but getting a error while querying a data from the table.
s
Can you check broker logs?
v
java.io.IOException: Failed : HTTP error code : 404
getting above error
s
Can you share your table's "tenants" config?
v
Copy code
{
  "tableName": "tab2",
  "tableType": "OFFLINE",
  "segmentsConfig": {
    "schemaName": "tab1",
    "replication": "1",
    "replicasPerPartition": "1",
    "segmentPushType": "APPEND",
    "segmentPushFrequency": "HOURLY",
    "allowNullTimeValue": true,
    "timeColumnName": "ts"
  },
  "tenants": {
    "broker": "TESTTENANT",
    "server": "TESTTENANT"
  },
  "tableIndexConfig": {
    "invertedIndexColumns": [],
    "rangeIndexColumns": [],
    "rangeIndexVersion": 2,
    "autoGeneratedInvertedIndex": false,
    "createInvertedIndexDuringSegmentGeneration": false,
    "sortedColumn": [],
    "noDictionaryColumns": [],
    "bloomFilterColumns": [],
    "loadMode": "MMAP",
    "onHeapDictionaryColumns": [],
    "varLengthDictionaryColumns": [],
    "enableDefaultStarTree": false,
    "enableDynamicStarTreeCreation": false,
    "aggregateMetrics": false,
    "nullHandlingEnabled": false,
    "segmentNameGeneratorType": "normalizedDate"
  },
  "metadata": {},
  "quota": {},
  "task": {
    "taskTypeConfigsMap": {
      "SegmentGenerationAndPushTask": {
        "schedule": "5 * * * * ?",
        "tableMaxNumTasks": "10"
      }
    }
  },
  "routing": {},
  "query": {},
  "ingestionConfig": {
    "batchIngestionConfig": {
      "batchConfigMaps": [
        {
          "input.fs.className": "org.apache.pinot.plugin.filesystem.S3PinotFS",
          "input.fs.prop.region": "us-east-1",
          "input.fs.prop.secretKey": "{KEY}",
          "input.fs.prop.accessKey": "{KEY}",
          "inputDirURI": "s3://{PATH}",
          "includeFileNamePattern": "glob:**/*.csv",
          "excludeFileNamePattern": "glob:**/*.tmp",
          "inputFormat": "csv"
        }
      ],
      "segmentIngestionType": "APPEND",
      "segmentIngestionFrequency": "HOURLY"
    }
  },
  "isDimTable": false
}
here you go
s
Copy code
"broker": "TESTTENANT",
Have you added brokers as well to the new tenants? Can you check output of /brokers/tenants?
v
ohh brocker is not there
but i can see same its there in UI
s
Can you share output of GET /brokers/tenants API?
v
Copy code
"DefaultTenant": [
    "Broker_pinot-broker-0.pinot-broker-headless.dp.svc.cluster.local_8099",
    "Broker_pinot-broker-1.pinot-broker-headless.dp.svc.cluster.local_8099"
  ],
  "TESTTENANT": [
    "Controller_pinot-controller-1.pinot-controller-headless.dp.svc.cluster.local_9000"
  ]
}
s
Some how your controller is tagged as a broker which is wrong. I'd suggest in your table config you set "tenants" -> "brokers" as "DefaultTenant". Else, untag the Controller_pinot-controller-1.pinot-controller-headless.dp.svc.cluster.local_9000, and tag atleast one broker instance as "TESTTENANT"
v
okay let me try
@saurabh dubey, its working perfectly now, thank you so much
s
Np!