Enum IndexController

  • All Implemented Interfaces:
    Serializable, Comparable<IndexController>

    public enum IndexController
    extends Enum<IndexController>
    The metrics data, that generated by OAL or MAL, would be partitioned to storage by the functions of the OAL or MAL. And, the other record data would be insulated storage by themselves definitions.
    • Method Detail

      • values

        public static IndexController[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (IndexController c : IndexController.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static IndexController valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        IllegalArgumentException - if this enum type has no constant with the specified name
        NullPointerException - if the argument is null
      • getTableName

        public String getTableName​(Model model)
      • generateDocId

        public String generateDocId​(Model model,
                                    String originalID)
        Generate the index doc ID. When a model is the aggregation storage mode, the logicTableName is a part of new ID to avoid conflicts.
      • generateDocId

        public String generateDocId​(String logicTableName,
                                    String originalID)
        Generate the index doc ID.
      • isMetricModel

        public boolean isMetricModel​(Model model)
        Check the mode of the Model definition.
      • isRecordModel

        public boolean isRecordModel​(Model model)
      • isFunctionMetric

        public boolean isFunctionMetric​(Model model)
      • appendTableColumn

        public Map<String,​Object> appendTableColumn​(Model model,
                                                          Map<String,​Object> columns)
        There have two cases: 1. When a model is the metric storage mode and storage is not sharding, or the model is function metrics and storage is sharding, a column named IndexController.LogicIndicesRegister.METRIC_TABLE_NAME would be appended to the physical index. The value of the column is the original table name in other storages, such as the OAL name. 2. When a model is the record storage mode, it's not have the super dataset and the storage is not sharding, a column named IndexController.LogicIndicesRegister.RECORD_TABLE_NAME would be appended to the physical index. The value of the column is the original table name in other storages.
      • setLogicSharding

        public void setLogicSharding​(boolean logicSharding)
        Init in StorageModuleElasticsearchProvider.prepare() and the value from the config.
      • isLogicSharding

        public boolean isLogicSharding()
        Init in StorageModuleElasticsearchProvider.prepare() and the value from the config.
      • setEnableCustomRouting

        public void setEnableCustomRouting​(boolean enableCustomRouting)
      • isEnableCustomRouting

        public boolean isEnableCustomRouting()