Class TableCache

  • All Implemented Interfaces:
    PinotConfigProvider

    public class TableCache
    extends Object
    implements PinotConfigProvider
    An implementation of PinotConfigProvider The TableCache caches all the table configs and schemas within the cluster, and listens on ZK changes to keep them in sync. It also maintains the table name map and the column name map for case-insensitive queries.
    • Constructor Detail

      • TableCache

        public TableCache​(org.apache.helix.store.zk.ZkHelixPropertyStore<org.apache.helix.ZNRecord> propertyStore,
                          boolean caseInsensitive)
    • Method Detail

      • isCaseInsensitive

        public boolean isCaseInsensitive()
        Returns true if the TableCache is case-insensitive, false otherwise.
      • getActualTableName

        @Nullable
        public String getActualTableName​(String caseInsensitiveTableName)
        For case-insensitive only, returns the actual table name for the given case-insensitive table name (with or without type suffix), or null if the table does not exist.
      • getColumnNameMap

        @Nullable
        public Map<String,​String> getColumnNameMap​(String rawTableName)
        For case-insensitive only, returns a map from lower case column name to actual column name for the given table, or null if the table schema does not exist.
      • getSchema

        @Nullable
        public Schema getSchema​(String rawTableName)
        Returns the schema for the given table, or null if it does not exist.
        Specified by:
        getSchema in interface PinotConfigProvider