Class IndexStructures


  • public class IndexStructures
    extends Object
    • Constructor Summary

      Constructors 
      Constructor Description
      IndexStructures()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean compareIndexSetting​(String tableName, Map<String,​Object> settings)
      Returns true when the current index setting equals the input.
      boolean containsMapping​(String tableName, org.apache.skywalking.library.elasticsearch.response.Mappings mappings)
      Returns true when the current structures already contains the properties of the input mappings.
      org.apache.skywalking.library.elasticsearch.response.Mappings diffMappings​(String tableName, org.apache.skywalking.library.elasticsearch.response.Mappings mappings)
      Returns mappings with fields that not exist in the input mappings.
      org.apache.skywalking.library.elasticsearch.response.Mappings getMapping​(String tableName)  
      void putStructure​(String tableName, org.apache.skywalking.library.elasticsearch.response.Mappings mapping, Map<String,​Object> settings)
      Add or append mapping/settings when the current structures don't contain the input structure or having new fields in it.
    • Constructor Detail

      • IndexStructures

        public IndexStructures()
    • Method Detail

      • getMapping

        public org.apache.skywalking.library.elasticsearch.response.Mappings getMapping​(String tableName)
      • putStructure

        public void putStructure​(String tableName,
                                 org.apache.skywalking.library.elasticsearch.response.Mappings mapping,
                                 Map<String,​Object> settings)
        Add or append mapping/settings when the current structures don't contain the input structure or having new fields in it.
      • diffMappings

        public org.apache.skywalking.library.elasticsearch.response.Mappings diffMappings​(String tableName,
                                                                                          org.apache.skywalking.library.elasticsearch.response.Mappings mappings)
        Returns mappings with fields that not exist in the input mappings. The input mappings should be history mapping from current index. Do not return _source config to avoid current index update conflict.
      • containsMapping

        public boolean containsMapping​(String tableName,
                                       org.apache.skywalking.library.elasticsearch.response.Mappings mappings)
        Returns true when the current structures already contains the properties of the input mappings.
      • compareIndexSetting

        public boolean compareIndexSetting​(String tableName,
                                           Map<String,​Object> settings)
        Returns true when the current index setting equals the input.