-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Description
At present BaseBrokerStarter determines the Broker Instance ID using a very generic "instanceId" property which is also shared with Pinot minion. In the case of a Quickstart Cluster, if we want to start the Broker with a particular instanceId the start-up fails since the same property is used by the Minion as well.
I think we can change this logic to the following (use pinot.broker.id over instanceId):
_instanceId = _brokerConf.getProperty(Broker.CONFIG_OF_BROKER_ID);
if (_instanceId == null && _brokerConf.getProperty(Helix.Instance.INSTANCE_ID_KEY) != null) {
_instanceId = _brokerConf.getProperty(Helix.Instance.INSTANCE_ID_KEY);
}
if (_instanceId != null) {
// NOTE: Force all instances to have the same prefix in order to derive the instance type based on the instance id
Preconditions.checkState(InstanceTypeUtils.isBroker(_instanceId), "Instance id must have prefix '%s', got '%s'",
Helix.PREFIX_OF_BROKER_INSTANCE, _instanceId);
} else {
_instanceId = Helix.PREFIX_OF_BROKER_INSTANCE + _hostname + "_" + _port;
}
_brokerConf.setProperty(Broker.CONFIG_OF_BROKER_ID, _instanceId);
Metadata
Metadata
Assignees
Labels
No labels