Search in sources :

Example 1 with TableCustomConfig

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;
}
Also used : TableCustomConfig(com.linkedin.pinot.common.config.TableCustomConfig) AbstractTableConfig(com.linkedin.pinot.common.config.AbstractTableConfig)

Aggregations

AbstractTableConfig (com.linkedin.pinot.common.config.AbstractTableConfig)1 TableCustomConfig (com.linkedin.pinot.common.config.TableCustomConfig)1