Enum IndexController
- java.lang.Object
-
- java.lang.Enum<IndexController>
-
- org.apache.skywalking.oap.server.storage.plugin.elasticsearch.base.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classIndexController.LogicIndicesRegister
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Object>appendTableColumn(Model model, Map<String,Object> columns)There have two cases: 1.StringgenerateDocId(String logicTableName, String originalID)Generate the index doc ID.StringgenerateDocId(Model model, String originalID)Generate the index doc ID.StringgetTableName(Model model)booleanisEnableCustomRouting()booleanisFunctionMetric(Model model)booleanisLogicSharding()Init in StorageModuleElasticsearchProvider.prepare() and the value from the config.booleanisMetricModel(Model model)Check the mode of the Model definition.booleanisRecordModel(Model model)voidsetEnableCustomRouting(boolean enableCustomRouting)voidsetLogicSharding(boolean logicSharding)Init in StorageModuleElasticsearchProvider.prepare() and the value from the config.static IndexControllervalueOf(String name)Returns the enum constant of this type with the specified name.static IndexController[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final IndexController INSTANCE
-
-
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 nameNullPointerException- if the argument is null
-
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 namedIndexController.LogicIndicesRegister.METRIC_TABLE_NAMEwould 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 namedIndexController.LogicIndicesRegister.RECORD_TABLE_NAMEwould 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()
-
-