use of com.linkedin.pinot.common.config.TableCustomConfig in project pinot by linkedin.
the class PinotHelixResourceManager method shouldSendMessage.
// Check to see if the table has been explicitly configured to NOT use messageBasedRefresh.
private boolean shouldSendMessage(OfflineSegmentZKMetadata segmentZKMetadata) {
final String rawTableName = segmentZKMetadata.getTableName();
AbstractTableConfig tableConfig = ZKMetadataProvider.getOfflineTableConfig(_propertyStore, rawTableName);
TableCustomConfig customConfig = tableConfig.getCustomConfigs();
if (customConfig != null) {
Map<String, String> customConfigMap = customConfig.getCustomConfigs();
if (customConfigMap != null) {
if (customConfigMap.containsKey(TableCustomConfig.MESSAGE_BASED_REFRESH_KEY) && !Boolean.valueOf(customConfigMap.get(TableCustomConfig.MESSAGE_BASED_REFRESH_KEY))) {
return false;
}
}
}
return true;
}
Aggregations