ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] oleewere closed pull request #37: AMBARI-24939. Log Search: get rid of history collection, create a met…
Date Thu, 22 Nov 2018 12:23:13 GMT
oleewere closed pull request #37: AMBARI-24939. Log Search: get rid of history collection, create a met…
URL: https://github.com/apache/ambari-logsearch/pull/37
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederConstants.java b/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederConstants.java
index e5a6e3800b..2a698a6d3b 100644
--- a/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederConstants.java
+++ b/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/common/LogFeederConstants.java
@@ -104,6 +104,7 @@
 
   public static final String SOLR_ZK_CONNECTION_STRING = "logfeeder.solr.zk_connect_string";
   public static final String SOLR_URLS = "logfeeder.solr.urls";
+  public static final String SOLR_METADATA_COLLECTION = "logfeeder.solr.metadata.collection";
 
   public static final String CLOUD_STORAGE_MODE = "logfeeder.cloud.storage.mode";
   public static final String CLOUD_STORAGE_DESTINATION = "logfeeder.cloud.storage.destination";
diff --git a/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/ApplicationConfig.java b/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/ApplicationConfig.java
index 881b856012..275ce16f22 100644
--- a/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/ApplicationConfig.java
+++ b/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/ApplicationConfig.java
@@ -136,7 +136,7 @@ public LogSearchConfigLogFeeder logSearchConfigLogFeeder() throws Exception {
   public LogLevelFilterManager logLevelFilterManager() throws Exception {
     if (logFeederProps.isSolrFilterStorage()) {
       SolrClient solrClient = new LogFeederSolrClientFactory().createSolrClient(
-        logFeederProps.getSolrZkConnectString(), logFeederProps.getSolrUrls(), "history");
+        logFeederProps.getSolrZkConnectString(), logFeederProps.getSolrUrls(), logFeederProps.getSolrMetadataCollection());
       return new LogLevelFilterManagerSolr(solrClient);
     } else if (logFeederProps.isUseLocalConfigs() && logFeederProps.isZkFilterStorage()) {
       final HashMap<String, String> map = new HashMap<>();
diff --git a/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/LogFeederProps.java b/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/LogFeederProps.java
index 9ed4c9b949..1e6be21711 100644
--- a/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/LogFeederProps.java
+++ b/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/conf/LogFeederProps.java
@@ -211,6 +211,15 @@
   @Value("${" + LogFeederConstants.SOLR_URLS + ":}")
   private String solrUrlsStr;
 
+  @LogSearchPropertyDescription(
+    name = LogFeederConstants.SOLR_METADATA_COLLECTION,
+    description = "Metadata collection name that could contain log level filters or input configurations.",
+    examples = {"logsearch_metadata"},
+    sources = {LogFeederConstants.LOGFEEDER_PROPERTIES_FILE}
+  )
+  @Value("${" + LogFeederConstants.SOLR_METADATA_COLLECTION + ":logsearch_metadata}")
+  private String solrMetadataCollection;
+
   @LogSearchPropertyDescription(
     name = LogFeederConstants.CLOUD_STORAGE_MODE,
     description = "Option to support sending logs to cloud storage. You can choose between supporting only cloud storage, non-cloud storage or both",
@@ -549,6 +558,14 @@ public void setCloudBasePath(String cloudBasePath) {
     this.cloudBasePath = cloudBasePath;
   }
 
+  public String getSolrMetadataCollection() {
+    return solrMetadataCollection;
+  }
+
+  public void setSolrMetadataCollection(String solrMetadataCollection) {
+    this.solrMetadataCollection = solrMetadataCollection;
+  }
+
   public String[] getSolrUrls() {
     if (StringUtils.isNotBlank(this.solrUrlsStr)) {
       return this.solrUrlsStr.split(",");
diff --git a/ambari-logsearch-server/src/main/configsets/history/conf/admin-extra.html b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/admin-extra.html
similarity index 100%
rename from ambari-logsearch-server/src/main/configsets/history/conf/admin-extra.html
rename to ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/admin-extra.html
diff --git a/ambari-logsearch-server/src/main/configsets/history/conf/admin-extra.menu-bottom.html b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/admin-extra.menu-bottom.html
similarity index 100%
rename from ambari-logsearch-server/src/main/configsets/history/conf/admin-extra.menu-bottom.html
rename to ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/admin-extra.menu-bottom.html
diff --git a/ambari-logsearch-server/src/main/configsets/history/conf/admin-extra.menu-top.html b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/admin-extra.menu-top.html
similarity index 100%
rename from ambari-logsearch-server/src/main/configsets/history/conf/admin-extra.menu-top.html
rename to ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/admin-extra.menu-top.html
diff --git a/ambari-logsearch-server/src/main/configsets/history/conf/elevate.xml b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/elevate.xml
similarity index 100%
rename from ambari-logsearch-server/src/main/configsets/history/conf/elevate.xml
rename to ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/elevate.xml
diff --git a/ambari-logsearch-server/src/main/configsets/history/conf/managed-schema b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/managed-schema
similarity index 99%
rename from ambari-logsearch-server/src/main/configsets/history/conf/managed-schema
rename to ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/managed-schema
index a4773c4bb2..76e3aea553 100644
--- a/ambari-logsearch-server/src/main/configsets/history/conf/managed-schema
+++ b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/managed-schema
@@ -17,7 +17,7 @@
 -->
 
 <!-- Solr managed schema - automatically generated - DO NOT EDIT -->
-<schema name="history" version="1.6">
+<schema name="logsearch_metadata" version="1.6">
 
   <uniqueKey>id</uniqueKey>
 
diff --git a/ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml b/ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/solrconfig.xml
similarity index 100%
rename from ambari-logsearch-server/src/main/configsets/history/conf/solrconfig.xml
rename to ambari-logsearch-server/src/main/configsets/logsearch_metadata/conf/solrconfig.xml
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
index a15ed559e4..d75c304b27 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
@@ -99,7 +99,7 @@
   private SolrAuditLogPropsConfig solrAuditLogPropsConfig;
 
   @Inject
-  private SolrEventHistoryPropsConfig solrEventHistoryPropsConfig;
+  private SolrMetadataPropsConfig solrEventHistoryPropsConfig;
 
   @Inject
   @Named("solrServiceLogsState")
@@ -110,8 +110,8 @@
   private SolrCollectionState solrAuditLogsState;
 
   @Inject
-  @Named("solrEventHistoryState")
-  private SolrCollectionState solrEventHistoryState;
+  @Named("solrMetadataState")
+  private SolrCollectionState solrMetadataState;
 
   @Inject
   @Named("logLevelFilterManagerState")
@@ -153,7 +153,7 @@ protected void configure(HttpSecurity http) throws Exception {
       .addFilterAfter(logsearchKRBAuthenticationFilter(), LogsearchTrustedProxyFilter.class)
       .addFilterBefore(logsearchUsernamePasswordAuthenticationFilter(), LogsearchKRBAuthenticationFilter.class)
       .addFilterAfter(securityContextFormationFilter(), FilterSecurityInterceptor.class)
-      .addFilterAfter(logsearchEventHistoryFilter(), LogsearchSecurityContextFormationFilter.class)
+      .addFilterAfter(logsearchMetadataFilter(), LogsearchSecurityContextFormationFilter.class)
       .addFilterAfter(logsearchAuditLogFilter(), LogsearchSecurityContextFormationFilter.class)
       .addFilterAfter(logsearchServiceLogFilter(), LogsearchSecurityContextFormationFilter.class)
       .addFilterAfter(logSearchConfigStateFilter(), LogsearchSecurityContextFormationFilter.class)
@@ -298,8 +298,8 @@ private LogsearchFilter logsearchAuditLogFilter() {
     return new LogsearchFilter(auditLogsRequestMatcher(), new GlobalStateProvider(solrAuditLogsState, solrAuditLogPropsConfig));
   }
 
-  private LogsearchFilter logsearchEventHistoryFilter() {
-    return new LogsearchFilter(eventHistoryRequestMatcher(), new GlobalStateProvider(solrEventHistoryState, solrEventHistoryPropsConfig));
+  private LogsearchFilter logsearchMetadataFilter() {
+    return new LogsearchFilter(metadataRequestMatcher(), new GlobalStateProvider(solrMetadataState, solrEventHistoryPropsConfig));
   }
 
   private LogsearchFilter logSearchConfigStateFilter() {
@@ -348,8 +348,8 @@ public RequestMatcher auditLogsRequestMatcher() {
     return new AntPathRequestMatcher("/api/v1/audit/logs/**");
   }
 
-  public RequestMatcher eventHistoryRequestMatcher() {
-    return new AntPathRequestMatcher("/api/v1/history/**");
+  public RequestMatcher metadataRequestMatcher() {
+    return new AntPathRequestMatcher("/api/v1/metadata/**");
   }
 
   public RequestMatcher logsearchConfigRequestMatcher() {
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrAuditLogPropsConfig.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrAuditLogPropsConfig.java
index 43349a658c..9482ee2fee 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrAuditLogPropsConfig.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrAuditLogPropsConfig.java
@@ -87,16 +87,6 @@
   )
   private String aliasNameIn;
 
-  @Value("${logsearch.audit.logs.split.interval.mins:none}")
-  @LogSearchPropertyDescription(
-    name = "logsearch.audit.logs.split.interval.mins",
-    description = "Will create multiple collections and use alias. (not supported right now, use implicit routingif the value is not none)",
-    examples = {"none", "15"},
-    defaultValue = "none",
-    sources = {LOGSEARCH_PROPERTIES_FILE}
-  )
-  private String splitInterval;
-
   @Value("${logsearch.collection.audit.logs.numshards:1}")
   @LogSearchPropertyDescription(
     name = "logsearch.collection.audit.logs.numshards",
@@ -206,16 +196,6 @@ public void setReplicationFactor(Integer replicationFactor) {
     this.replicationFactor = replicationFactor;
   }
 
-  @Override
-  public String getSplitInterval() {
-    return splitInterval;
-  }
-
-  @Override
-  public void setSplitInterval(String splitInterval) {
-    this.splitInterval = splitInterval;
-  }
-
   @Override
   public List<ACL> getZkAcls() {
     return zkAcls;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrConfig.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrConfig.java
index 4dc74eeab2..2a454e981c 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrConfig.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrConfig.java
@@ -21,7 +21,7 @@
 import org.apache.ambari.logsearch.conf.global.SolrAuditLogsState;
 import org.apache.ambari.logsearch.conf.global.SolrCollectionState;
 import org.apache.ambari.logsearch.conf.global.SolrServiceLogsState;
-import org.apache.ambari.logsearch.conf.global.SolrEventHistoryState;
+import org.apache.ambari.logsearch.conf.global.SolrMetadataState;
 import org.apache.ambari.logsearch.dao.SolrSchemaFieldDao;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.Configuration;
@@ -46,9 +46,9 @@ public SolrCollectionState solrAuditLogsState() {
     return new SolrAuditLogsState();
   }
 
-  @Bean(name = "solrEventHistoryState")
+  @Bean(name = "solrMetadataState")
   public SolrCollectionState solrEventHistoryState() {
-    return new SolrEventHistoryState();
+    return new SolrMetadataState();
   }
 
   @Bean
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrEventHistoryPropsConfig.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrMetadataPropsConfig.java
similarity index 65%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrEventHistoryPropsConfig.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrMetadataPropsConfig.java
index 822cea469f..5cd676c761 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrEventHistoryPropsConfig.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrMetadataPropsConfig.java
@@ -25,52 +25,42 @@
 import static org.apache.ambari.logsearch.common.LogSearchConstants.LOGSEARCH_PROPERTIES_FILE;
 
 @Configuration
-public class SolrEventHistoryPropsConfig extends SolrConnectionPropsConfig {
+public class SolrMetadataPropsConfig extends SolrConnectionPropsConfig {
 
-  @Value("${logsearch.solr.collection.history:history}")
+  @Value("${logsearch.solr.collection.metadata:logsearch_metadata}")
   @LogSearchPropertyDescription(
-    name = "logsearch.solr.collection.history",
-    description = "Name of Log Search event history collection.",
-    examples = {"history"},
-    defaultValue = "history",
+    name = "logsearch.solr.collection.metadata",
+    description = "Name of Log Search metadata collection.",
+    examples = {"logsearch_metadata"},
+    defaultValue = "logsearch_metadata",
     sources = {LOGSEARCH_PROPERTIES_FILE}
   )
   private String collection;
 
-  @Value("${logsearch.history.split.interval.mins:none}")
+  @Value("${logsearch.solr.metadata.config.name:logsearch_metadata}")
   @LogSearchPropertyDescription(
-    name = "logsearch.history.split.interval.mins",
-    description = "Will create multiple collections and use alias. (not supported right now, use implicit routingif the value is not none)",
-    examples = {"none", "15"},
-    defaultValue = "none",
-    sources = {LOGSEARCH_PROPERTIES_FILE}
-  )
-  private String splitInterval;
-
-  @Value("${logsearch.solr.history.config.name:history}")
-  @LogSearchPropertyDescription(
-    name = "logsearch.solr.history.config.name",
-    description = "Solr configuration name of the event history collection.",
-    examples = {"history"},
-    defaultValue = "history",
+    name = "logsearch.solr.metadata.config.name",
+    description = "Solr configuration name of the logsearch metadata collection.",
+    examples = {"logsearch_metadata"},
+    defaultValue = "logsearch_metadata",
     sources = {LOGSEARCH_PROPERTIES_FILE}
   )
   private String configName;
 
-  @Value("${logsearch.collection.history.numshards:1}")
+  @Value("${logsearch.collection.metadata.numshards:1}")
   @LogSearchPropertyDescription(
-    name = "logsearch.collection.history.numshards",
-    description = "Number of Solr shards for event history collection (bootstrapping).",
+    name = "logsearch.collection.metadata.numshards",
+    description = "Number of Solr shards for logsearch metadta collection (bootstrapping).",
     examples = {"2"},
     defaultValue = "1",
     sources = {LOGSEARCH_PROPERTIES_FILE}
   )
   private Integer numberOfShards;
 
-  @Value("${logsearch.collection.history.replication.factor:2}")
+  @Value("${logsearch.collection.metadata.replication.factor:2}")
   @LogSearchPropertyDescription(
-    name = "logsearch.collection.history.replication.factor",
-    description = "Solr replication factor for event history collection (bootstrapping).",
+    name = "logsearch.collection.metadata.replication.factor",
+    description = "Solr replication factor for event metadata collection (bootstrapping).",
     examples = {"3"},
     defaultValue = "2",
     sources = {LOGSEARCH_PROPERTIES_FILE}
@@ -80,7 +70,7 @@
   @Value("${logsearch.schema.fields.populate.interval.mins:1}")
   @LogSearchPropertyDescription(
     name = "logsearch.schema.fields.populate.interval.mins",
-    description = "Interval in minutes for populating schema fiels for event history collections.",
+    description = "Interval in minutes for populating schema fiels for metadata collections.",
     examples = {"10"},
     defaultValue = "1",
     sources = {LOGSEARCH_PROPERTIES_FILE}
@@ -97,16 +87,6 @@ public void setCollection(String collection) {
     this.collection = collection;
   }
 
-  @Override
-  public String getSplitInterval() {
-    return splitInterval;
-  }
-
-  @Override
-  public void setSplitInterval(String splitInterval) {
-    this.splitInterval = splitInterval;
-  }
-
   @Override
   public String getConfigName() {
     return configName;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrPropsConfig.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrPropsConfig.java
index ebb1acbada..4e105a47ae 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrPropsConfig.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrPropsConfig.java
@@ -47,10 +47,6 @@
 
   void setReplicationFactor(Integer replicationFactor);
 
-  String getSplitInterval();
-
-  void setSplitInterval(String splitInterval);
-
   List<ACL> getZkAcls();
 
   void setZkAcls(List<ACL> zkAcls);
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrServiceLogPropsConfig.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrServiceLogPropsConfig.java
index 6a0e6b11ef..8a15af0c90 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrServiceLogPropsConfig.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/SolrServiceLogPropsConfig.java
@@ -37,16 +37,6 @@
   )
   private String collection;
 
-  @Value("${logsearch.service.logs.split.interval.mins:none}")
-  @LogSearchPropertyDescription(
-    name = "logsearch.service.logs.split.interval.mins",
-    description = "Will create multiple collections and use alias. (not supported right now, use implicit routingif the value is not none)",
-    examples = {"none", "15"},
-    defaultValue = "none",
-    sources = {LOGSEARCH_PROPERTIES_FILE}
-  )
-  private String splitInterval;
-
   @Value("${logsearch.solr.service.logs.config.name:hadoop_logs}")
   @LogSearchPropertyDescription(
     name = "logsearch.solr.service.logs.config.name",
@@ -87,16 +77,6 @@ public void setCollection(String collection) {
     this.collection = collection;
   }
 
-  @Override
-  public String getSplitInterval() {
-    return splitInterval;
-  }
-
-  @Override
-  public void setSplitInterval(String splitInterval) {
-    this.splitInterval = splitInterval;
-  }
-
   @Override
   public String getConfigName() {
     return configName;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/global/SolrEventHistoryState.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/global/SolrMetadataState.java
similarity index 96%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/global/SolrEventHistoryState.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/global/SolrMetadataState.java
index c31e69e34b..c6039074f7 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/global/SolrEventHistoryState.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/conf/global/SolrMetadataState.java
@@ -21,7 +21,7 @@
 import javax.inject.Named;
 
 @Named
-public class SolrEventHistoryState implements SolrCollectionState {
+public class SolrMetadataState implements SolrCollectionState {
 
   private volatile boolean znodeReady;
   private volatile boolean solrCollectionReady;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogLevelManagerFilterConfigurer.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogLevelManagerFilterConfigurer.java
index 9e6ec291f4..f5f8259b3a 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogLevelManagerFilterConfigurer.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/configurer/LogLevelManagerFilterConfigurer.java
@@ -24,7 +24,7 @@
 import org.apache.ambari.logsearch.config.solr.LogLevelFilterManagerSolr;
 import org.apache.ambari.logsearch.config.zookeeper.LogLevelFilterManagerZK;
 import org.apache.ambari.logsearch.config.zookeeper.LogSearchConfigZKHelper;
-import org.apache.ambari.logsearch.dao.EventHistorySolrDao;
+import org.apache.ambari.logsearch.dao.MetadataSolrDao;
 import org.apache.curator.framework.CuratorFramework;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
@@ -39,7 +39,7 @@
 
   private static final int RETRY_INTERVAL_SECONDS = 10;
 
-  private final EventHistorySolrDao eventHistorySolrDao;
+  private final MetadataSolrDao metadataSolrDao;
   private final LogLevelFilterManagerState logLevelFilterManagerState;
   private final LogSearchConfigApiConfig logSearchConfigApiConfig;
   private final LogSearchConfigMapHolder logSearchConfigMapHolder;
@@ -50,11 +50,11 @@
   @Inject
   public LogLevelManagerFilterConfigurer(final LogSearchConfigApiConfig logSearchConfigApiConfig,
                                          final LogLevelFilterManagerState logLevelFilterManagerState,
-                                         final EventHistorySolrDao eventHistorySolrDao,
+                                         final MetadataSolrDao metadataSolrDao,
                                          final LogSearchConfigMapHolder logSearchConfigMapHolder) {
     this.logSearchConfigApiConfig = logSearchConfigApiConfig;
     this.logLevelFilterManagerState = logLevelFilterManagerState;
-    this.eventHistorySolrDao = eventHistorySolrDao;
+    this.metadataSolrDao = metadataSolrDao;
     this.logSearchConfigMapHolder = logSearchConfigMapHolder;
   }
 
@@ -69,8 +69,8 @@ public void run() {
           while (true) {
             try {
               if (logSearchConfigApiConfig.isSolrFilterStorage()) {
-                if (eventHistorySolrDao.getSolrCollectionState().isSolrCollectionReady()) {
-                  setLogLevelFilterManagerSolr(new LogLevelFilterManagerSolr(eventHistorySolrDao.getSolrClient()));
+                if (metadataSolrDao.getSolrCollectionState().isSolrCollectionReady()) {
+                  setLogLevelFilterManagerSolr(new LogLevelFilterManagerSolr(metadataSolrDao.getSolrClient()));
                   logLevelFilterManagerState.setLogLevelFilterManagerIsReady(true);
                   logger.info("Log level filter manager (solr) successfully initialized.");
                   break;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/EventHistorySolrDao.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/MetadataSolrDao.java
similarity index 80%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/EventHistorySolrDao.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/MetadataSolrDao.java
index e56f47f707..68218c1281 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/EventHistorySolrDao.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/MetadataSolrDao.java
@@ -30,7 +30,7 @@
 import org.apache.ambari.logsearch.common.LogType;
 import org.apache.ambari.logsearch.conf.SolrClientsHolder;
 import org.apache.ambari.logsearch.conf.SolrPropsConfig;
-import org.apache.ambari.logsearch.conf.SolrEventHistoryPropsConfig;
+import org.apache.ambari.logsearch.conf.SolrMetadataPropsConfig;
 import org.apache.ambari.logsearch.conf.global.SolrCollectionState;
 import org.apache.ambari.logsearch.configurer.SolrCollectionConfigurer;
 import org.apache.logging.log4j.LogManager;
@@ -43,48 +43,48 @@
 import org.springframework.data.solr.core.SolrTemplate;
 
 @Named
-public class EventHistorySolrDao extends SolrDaoBase {
+public class MetadataSolrDao extends SolrDaoBase {
 
-  private static final Logger logger = LogManager.getLogger(EventHistorySolrDao.class);
+  private static final Logger logger = LogManager.getLogger(MetadataSolrDao.class);
 
   private static final Logger LOG_PERFORMANCE = LogManager.getLogger("org.apache.ambari.logsearch.performance");
 
   @Inject
-  private SolrEventHistoryPropsConfig solrEventHistoryPropsConfig;
+  private SolrMetadataPropsConfig solrMetadataPropsConfig;
 
-  private SolrTemplate eventHistorySolrTemplate;
+  private SolrTemplate metadataSolrTemplate;
 
   @Inject
-  @Named("solrEventHistoryState")
-  private SolrCollectionState solrEventHistoryState;
+  @Named("solrMetadataState")
+  private SolrCollectionState solrMetadataState;
 
   @Inject
   private SolrClientsHolder solrClientsHolder;
 
-  public EventHistorySolrDao() {
+  public MetadataSolrDao() {
     super(LogType.SERVICE);
   }
 
   @Override
   public SolrTemplate getSolrTemplate() {
-    return eventHistorySolrTemplate;
+    return metadataSolrTemplate;
   }
 
   @Override
   public void setSolrTemplate(SolrTemplate solrTemplate) {
-    this.eventHistorySolrTemplate = solrTemplate;
+    this.metadataSolrTemplate = solrTemplate;
   }
 
   @PostConstruct
   public void postConstructor() {
-    String solrUrl = solrEventHistoryPropsConfig.getSolrUrl();
-    String zkConnectString = solrEventHistoryPropsConfig.getZkConnectString();
-    String collection = solrEventHistoryPropsConfig.getCollection();
+    String solrUrl = solrMetadataPropsConfig.getSolrUrl();
+    String zkConnectString = solrMetadataPropsConfig.getZkConnectString();
+    String collection = solrMetadataPropsConfig.getCollection();
 
     try {
       new SolrCollectionConfigurer(this, false, solrClientsHolder, SolrClientsHolder.CollectionType.HISTORY).start();
     } catch (Exception e) {
-      logger.error("error while connecting to Solr for history logs : solrUrl=" + solrUrl + ", zkConnectString=" + zkConnectString +
+      logger.error("error while connecting to Solr for metadata collection : solrUrl=" + solrUrl + ", zkConnectString=" + zkConnectString +
           ", collection=" + collection, e);
     }
   }
@@ -123,11 +123,11 @@ public UpdateResponse addDocs(SolrInputDocument doc) {
 
   @Override
   public SolrCollectionState getSolrCollectionState() {
-    return solrEventHistoryState;
+    return solrMetadataState;
   }
 
   @Override
   public SolrPropsConfig getSolrPropsConfig() {
-    return solrEventHistoryPropsConfig;
+    return solrMetadataPropsConfig;
   }
 }
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
index a58eb20b67..12d11e00a9 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/dao/SolrSchemaFieldDao.java
@@ -21,7 +21,7 @@
 import org.apache.ambari.logsearch.common.LogSearchConstants;
 import org.apache.ambari.logsearch.common.LogType;
 import org.apache.ambari.logsearch.common.MessageEnums;
-import org.apache.ambari.logsearch.conf.SolrEventHistoryPropsConfig;
+import org.apache.ambari.logsearch.conf.SolrMetadataPropsConfig;
 import org.apache.http.HttpResponse;
 import org.apache.http.client.methods.HttpGet;
 import org.apache.http.impl.client.CloseableHttpClient;
@@ -68,7 +68,7 @@
   private AuditSolrDao auditSolrDao;
   
   @Inject
-  private SolrEventHistoryPropsConfig solrEventHistoryPropsConfig;
+  private SolrMetadataPropsConfig solrEventHistoryPropsConfig;
   
   private int retryCount;
   private int skipCount;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
index 1b58fb8204..c2c6013740 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/doc/DocConstants.java
@@ -119,9 +119,9 @@
   }
 
   public class EventHistoryOperationDescriptions {
-    public static final String SAVE_EVENT_HISTORY_DATA_OD = "Save event history data";
-    public static final String DELETE_EVENT_HISTORY_DATA_OD = "Delete event history data";
-    public static final String GET_EVENT_HISTORY_DATA_OD = "Get event history data";
+    public static final String SAVE_METADATA_OD = "Save metadata";
+    public static final String DELETE_METADATA_OD = "Delete metadata";
+    public static final String GET_METADATA_OD = "Get event metadata";
     public static final String GET_ALL_USER_NAMES_OD = "Get all user names";
   }
 
@@ -138,6 +138,6 @@
     public static final String STATUS_OD = "Get statuses for collections (not health state - show true if something already done)";
     public static final String SERVICE_LOGS_STATUS_OD = "Get statuses for service log collection (not health state - show true if something already done)";
     public static final String AUDIT_LOGS_STATUS_OD = "Get statuses for collections (not health state - show true if something already done)";
-    public static final String EVENT_HISTORY_STATUS_OD = "Get statuses for history collection (not health state - show true if something already done)";
+    public static final String METADATA_STATUS_OD = "Get statuses for metadata collection (not health state - show true if something already done)";
   }
 }
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/health/SolrEventHistoryHealthIndicator.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/health/SolrEventHistoryHealthIndicator.java
index bbb1f47f5e..ab3136f96d 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/health/SolrEventHistoryHealthIndicator.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/health/SolrEventHistoryHealthIndicator.java
@@ -18,7 +18,7 @@
  */
 package org.apache.ambari.logsearch.health;
 
-import org.apache.ambari.logsearch.dao.EventHistorySolrDao;
+import org.apache.ambari.logsearch.dao.MetadataSolrDao;
 import org.springframework.data.solr.core.SolrTemplate;
 
 import javax.inject.Inject;
@@ -28,7 +28,7 @@
 public class SolrEventHistoryHealthIndicator extends AbstractSolrHealthIndicator {
 
   @Inject
-  private EventHistorySolrDao eventHistorySolrDao;
+  private MetadataSolrDao eventHistorySolrDao;
 
   @Override
   public SolrTemplate getSolrTemplate() {
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/EventHistoryManager.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/MetadataManager.java
similarity index 78%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/EventHistoryManager.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/MetadataManager.java
index fda9b1a7d7..8ec55520ea 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/EventHistoryManager.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/manager/MetadataManager.java
@@ -24,10 +24,10 @@
 import java.util.List;
 
 import org.apache.ambari.logsearch.common.LogSearchContext;
-import org.apache.ambari.logsearch.dao.EventHistorySolrDao;
+import org.apache.ambari.logsearch.dao.MetadataSolrDao;
 import org.apache.ambari.logsearch.model.request.impl.EventHistoryRequest;
-import org.apache.ambari.logsearch.model.response.EventHistoryData;
-import org.apache.ambari.logsearch.model.response.EventHistoryDataListResponse;
+import org.apache.ambari.logsearch.model.response.LogsearchMetaData;
+import org.apache.ambari.logsearch.model.response.LogSearchMetaDataListResponse;
 import org.apache.ambari.logsearch.util.SolrUtil;
 import org.apache.commons.collections.CollectionUtils;
 import org.apache.commons.lang.StringUtils;
@@ -53,16 +53,16 @@
 import static org.apache.ambari.logsearch.solr.SolrConstants.EventHistoryConstants.SHARE_NAME_LIST;
 
 @Named
-public class EventHistoryManager extends JsonManagerBase {
+public class MetadataManager extends JsonManagerBase {
 
-  private static final Logger logger = LogManager.getLogger(EventHistoryManager.class);
+  private static final Logger logger = LogManager.getLogger(MetadataManager.class);
 
   @Inject
-  private EventHistorySolrDao eventHistorySolrDao;
+  private MetadataSolrDao metadataSolrDao;
   @Inject
   private ConversionService conversionService;
 
-  public String saveEvent(EventHistoryData eventHistoryData) {
+  public String saveMetadata(LogsearchMetaData eventHistoryData) {
     String filterName = eventHistoryData.getFiltername();
 
     SolrInputDocument solrInputDoc = new SolrInputDocument();
@@ -83,7 +83,7 @@ public String saveEvent(EventHistoryData eventHistoryData) {
       solrInputDoc.addField(SHARE_NAME_LIST, shareNameList);
     }
 
-    eventHistorySolrDao.addDocs(solrInputDoc);
+    metadataSolrDao.addDocs(solrInputDoc);
     return convertObjToString(solrInputDoc);
   }
 
@@ -97,30 +97,30 @@ private boolean isNotUnique(String filterName) {
       solrQuery.addFilterQuery(USER_NAME + ":" + LogSearchContext.getCurrentUsername());
       SolrUtil.setRowCount(solrQuery, 0);
       try {
-        Long numFound = eventHistorySolrDao.process(solrQuery).getResults().getNumFound();
+        Long numFound = metadataSolrDao.process(solrQuery).getResults().getNumFound();
         if (numFound > 0) {
           return true;
         }
       } catch (SolrException e) {
-        logger.error("Error while checking if event history data is unique.", e);
+        logger.error("Error while checking if metadata is unique.", e);
       }
     }
     return false;
   }
 
-  private boolean isValid(EventHistoryData vHistory) {
-    return StringUtils.isNotBlank(vHistory.getFiltername())
-        && StringUtils.isNotBlank(vHistory.getRowType())
-        && StringUtils.isNotBlank(vHistory.getValues());
+  private boolean isValid(LogsearchMetaData mData) {
+    return StringUtils.isNotBlank(mData.getFiltername())
+        && StringUtils.isNotBlank(mData.getRowType())
+        && StringUtils.isNotBlank(mData.getValues());
   }
 
-  public void deleteEvent(String id) {
-    eventHistorySolrDao.deleteEventHistoryData(id);
+  public void deleteMetadata(String id) {
+    metadataSolrDao.deleteEventHistoryData(id);
   }
 
   @SuppressWarnings("unchecked")
-  public EventHistoryDataListResponse getEventHistory(EventHistoryRequest request) {
-    EventHistoryDataListResponse response = new EventHistoryDataListResponse();
+  public LogSearchMetaDataListResponse getMetadata(EventHistoryRequest request) {
+    LogSearchMetaDataListResponse response = new LogSearchMetaDataListResponse();
     String rowType = request.getRowType();
     if (StringUtils.isBlank(rowType)) {
       throw new MalformedInputException("Row type was not specified");
@@ -129,12 +129,12 @@ public EventHistoryDataListResponse getEventHistory(EventHistoryRequest request)
     SolrQuery evemtHistoryQuery = conversionService.convert(request, SolrQuery.class);
     evemtHistoryQuery.addFilterQuery(String.format("%s:%s OR %s:%s", USER_NAME, LogSearchContext.getCurrentUsername(),
         SHARE_NAME_LIST, LogSearchContext.getCurrentUsername()));
-    SolrDocumentList solrList = eventHistorySolrDao.process(evemtHistoryQuery).getResults();
+    SolrDocumentList solrList = metadataSolrDao.process(evemtHistoryQuery).getResults();
 
-    Collection<EventHistoryData> configList = new ArrayList<>();
+    Collection<LogsearchMetaData> configList = new ArrayList<>();
 
     for (SolrDocument solrDoc : solrList) {
-      EventHistoryData eventHistoryData = new EventHistoryData();
+      LogsearchMetaData eventHistoryData = new LogsearchMetaData();
       eventHistoryData.setFiltername("" + solrDoc.get(FILTER_NAME));
       eventHistoryData.setId("" + solrDoc.get(ID));
       eventHistoryData.setValues("" + solrDoc.get(VALUES));
@@ -151,8 +151,8 @@ public EventHistoryDataListResponse getEventHistory(EventHistoryRequest request)
       configList.add(eventHistoryData);
     }
 
-    response.setName("historyList");
-    response.setEventHistoryDataList(configList);
+    response.setName("metadataList");
+    response.setMetadataList(configList);
 
     response.setStartIndex(Integer.parseInt(request.getStartIndex()));
     response.setPageSize(Integer.parseInt(request.getPageSize()));
@@ -168,7 +168,7 @@ public EventHistoryDataListResponse getEventHistory(EventHistoryRequest request)
     SolrQuery userListQuery = new SolrQuery();
     userListQuery.setQuery("*:*");
     SolrUtil.setFacetField(userListQuery, USER_NAME);
-    QueryResponse queryResponse = eventHistorySolrDao.process(userListQuery);
+    QueryResponse queryResponse = metadataSolrDao.process(userListQuery);
     if (queryResponse == null) {
       return userList;
     }
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/EventHistoryQueryRequest.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/MetadataQueryRequest.java
similarity index 93%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/EventHistoryQueryRequest.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/MetadataQueryRequest.java
index d943fadb7f..9a6d7cc4b1 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/EventHistoryQueryRequest.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/request/impl/query/MetadataQueryRequest.java
@@ -23,7 +23,7 @@
 
 import javax.ws.rs.QueryParam;
 
-public class EventHistoryQueryRequest extends CommonSearchQueryRequest implements EventHistoryRequest {
+public class MetadataQueryRequest extends CommonSearchQueryRequest implements EventHistoryRequest {
 
   @QueryParam(LogSearchConstants.REQUEST_PARAM_FILTER_NAME)
   private String filterName;
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/EventHistoryDataListResponse.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchMetaDataListResponse.java
similarity index 73%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/EventHistoryDataListResponse.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchMetaDataListResponse.java
index 429005f4c9..04523c2b36 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/EventHistoryDataListResponse.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/LogSearchMetaDataListResponse.java
@@ -24,13 +24,13 @@
 import java.util.Collection;
 
 @ApiModel
-public class EventHistoryDataListResponse extends SearchResponse{
+public class LogSearchMetaDataListResponse extends SearchResponse{
 
   @ApiModelProperty
   private String name;
 
   @ApiModelProperty
-  private Collection<EventHistoryData> eventHistoryDataList;
+  private Collection<LogsearchMetaData> metadataList;
 
   public String getName() {
     return name;
@@ -40,16 +40,16 @@ public void setName(String name) {
     this.name = name;
   }
 
-  public Collection<EventHistoryData> getEventHistoryDataList() {
-    return eventHistoryDataList;
+  public Collection<LogsearchMetaData> getMetadataList() {
+    return metadataList;
   }
 
-  public void setEventHistoryDataList(Collection<EventHistoryData> eventHistoryDataList) {
-    this.eventHistoryDataList = eventHistoryDataList;
+  public void setMetadataList(Collection<LogsearchMetaData> metadataList) {
+    this.metadataList = metadataList;
   }
 
   @Override
   public int getListSize() {
-    return eventHistoryDataList != null ? eventHistoryDataList.size() : 0;
+    return metadataList != null ? metadataList.size() : 0;
   }
 }
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/EventHistoryData.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/LogsearchMetaData.java
similarity index 97%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/EventHistoryData.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/LogsearchMetaData.java
index 5edbc62ba4..be5164b18f 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/EventHistoryData.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/model/response/LogsearchMetaData.java
@@ -23,7 +23,7 @@
 import java.util.Date;
 import java.util.List;
 
-public class EventHistoryData {
+public class LogsearchMetaData {
 
   @ApiModelProperty
   private String id;
@@ -43,7 +43,7 @@
   @ApiModelProperty
   private String rowType;
 
-  public EventHistoryData() {
+  public LogsearchMetaData() {
     id = String.valueOf(new Date().getTime());
   }
 
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/MetadataResource.java
similarity index 60%
rename from ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java
rename to ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/MetadataResource.java
index cdaab5470c..e6ce11f7f6 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/EventHistoryResource.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/MetadataResource.java
@@ -19,10 +19,10 @@
 
 package org.apache.ambari.logsearch.rest;
 
-import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.DELETE_EVENT_HISTORY_DATA_OD;
+import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.DELETE_METADATA_OD;
 import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.GET_ALL_USER_NAMES_OD;
-import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.GET_EVENT_HISTORY_DATA_OD;
-import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.SAVE_EVENT_HISTORY_DATA_OD;
+import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.GET_METADATA_OD;
+import static org.apache.ambari.logsearch.doc.DocConstants.EventHistoryOperationDescriptions.SAVE_METADATA_OD;
 
 import java.util.List;
 
@@ -36,44 +36,44 @@
 import javax.ws.rs.PathParam;
 import javax.ws.rs.Produces;
 
-import org.apache.ambari.logsearch.manager.EventHistoryManager;
-import org.apache.ambari.logsearch.model.request.impl.query.EventHistoryQueryRequest;
-import org.apache.ambari.logsearch.model.response.EventHistoryData;
-import org.apache.ambari.logsearch.model.response.EventHistoryDataListResponse;
+import org.apache.ambari.logsearch.manager.MetadataManager;
+import org.apache.ambari.logsearch.model.request.impl.query.MetadataQueryRequest;
+import org.apache.ambari.logsearch.model.response.LogsearchMetaData;
+import org.apache.ambari.logsearch.model.response.LogSearchMetaDataListResponse;
 import org.springframework.context.annotation.Scope;
 
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.Authorization;
 
-@Api(value = "history", description = "Event history operations", authorizations = {@Authorization(value = "basicAuth")})
-@Path("history")
+@Api(value = "metadata", description = "Log Search metadata operations", authorizations = {@Authorization(value = "basicAuth")})
+@Path("metadata")
 @Named
 @Scope("request")
-public class EventHistoryResource {
+public class MetadataResource {
 
   @Inject
-  private EventHistoryManager eventHistoryManager;
+  private MetadataManager metadataManager;
 
   @POST
   @Produces({"application/json"})
-  @ApiOperation(SAVE_EVENT_HISTORY_DATA_OD)
-  public String saveEvent(EventHistoryData eventHistoryData) {
-    return eventHistoryManager.saveEvent(eventHistoryData);
+  @ApiOperation(SAVE_METADATA_OD)
+  public String saveMetadata(LogsearchMetaData metadata) {
+    return metadataManager.saveMetadata(metadata);
   }
 
   @DELETE
   @Path("/{id}")
-  @ApiOperation(DELETE_EVENT_HISTORY_DATA_OD)
-  public void deleteEvent(@PathParam("id") String id) {
-    eventHistoryManager.deleteEvent(id);
+  @ApiOperation(DELETE_METADATA_OD)
+  public void deleteMetadata(@PathParam("id") String id) {
+    metadataManager.deleteMetadata(id);
   }
 
   @GET
   @Produces({"application/json"})
-  @ApiOperation(GET_EVENT_HISTORY_DATA_OD)
-  public EventHistoryDataListResponse getEventHistory(@BeanParam EventHistoryQueryRequest request) {
-    return eventHistoryManager.getEventHistory(request);
+  @ApiOperation(GET_METADATA_OD)
+  public LogSearchMetaDataListResponse getMetadataList(@BeanParam MetadataQueryRequest request) {
+    return metadataManager.getMetadata(request);
   }
 
   @GET
@@ -81,7 +81,7 @@ public EventHistoryDataListResponse getEventHistory(@BeanParam EventHistoryQuery
   @Produces({"application/json"})
   @ApiOperation(GET_ALL_USER_NAMES_OD)
   public List<String> getAllUserName() {
-    return eventHistoryManager.getAllUserName();
+    return metadataManager.getAllUserName();
   }
 
 }
diff --git a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/StatusResource.java b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/StatusResource.java
index 4c52157809..ca884fc2bf 100644
--- a/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/StatusResource.java
+++ b/ambari-logsearch-server/src/main/java/org/apache/ambari/logsearch/rest/StatusResource.java
@@ -19,7 +19,7 @@
 package org.apache.ambari.logsearch.rest;
 
 import static org.apache.ambari.logsearch.doc.DocConstants.StatusOperationDescriptions.AUDIT_LOGS_STATUS_OD;
-import static org.apache.ambari.logsearch.doc.DocConstants.StatusOperationDescriptions.EVENT_HISTORY_STATUS_OD;
+import static org.apache.ambari.logsearch.doc.DocConstants.StatusOperationDescriptions.METADATA_STATUS_OD;
 import static org.apache.ambari.logsearch.doc.DocConstants.StatusOperationDescriptions.SERVICE_LOGS_STATUS_OD;
 import static org.apache.ambari.logsearch.doc.DocConstants.StatusOperationDescriptions.STATUS_OD;
 
@@ -54,7 +54,7 @@
   private SolrCollectionState solrAuditLogsState;
 
   @Inject
-  @Named("solrEventHistoryState")
+  @Named("solrMetadataState")
   private SolrCollectionState solrEventHistoryState;
 
   @GET
@@ -64,7 +64,7 @@
     Map<String, SolrCollectionState> response = new HashMap<>();
     response.put("serviceLogs", solrServiceLogsState);
     response.put("auditLogs", solrAuditLogsState);
-    response.put("eventHistory", solrEventHistoryState);
+    response.put("metadata", solrEventHistoryState);
     return response;
   }
 
@@ -85,9 +85,9 @@ public SolrCollectionState getSolrAuditLogsStatus() {
   }
 
   @GET
-  @Path("/history")
+  @Path("/metadata")
   @Produces({"application/json"})
-  @ApiOperation(EVENT_HISTORY_STATUS_OD)
+  @ApiOperation(METADATA_STATUS_OD)
   public SolrCollectionState getSolrEventHistoryStatus() {
     return solrEventHistoryState;
   }
diff --git a/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java b/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java
index b26ab48cd7..705c792cd9 100644
--- a/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java
+++ b/ambari-logsearch-server/src/test/java/org/apache/ambari/logsearch/converter/EventHistoryRequestQueryConverterTest.java
@@ -19,7 +19,7 @@
 package org.apache.ambari.logsearch.converter;
 
 import org.apache.ambari.logsearch.model.request.impl.EventHistoryRequest;
-import org.apache.ambari.logsearch.model.request.impl.query.EventHistoryQueryRequest;
+import org.apache.ambari.logsearch.model.request.impl.query.MetadataQueryRequest;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.junit.Before;
 import org.junit.Test;
@@ -38,7 +38,7 @@ public void setUp() {
   @Test
   public void testConvert() {
     // GIVEN
-    EventHistoryRequest request = new EventHistoryQueryRequest();
+    EventHistoryRequest request = new MetadataQueryRequest();
     request.setRowType("myRowType"); // TODO: validate these 3 fields @Valid on EventHistoryRequest object -> not null
     request.setFilterName("myFilterName");
     request.setClusters("cl1,cl2");
diff --git a/ambari-logsearch-server/src/test/resources/logsearch.properties b/ambari-logsearch-server/src/test/resources/logsearch.properties
index 2715d1f6f4..4e3f322826 100755
--- a/ambari-logsearch-server/src/test/resources/logsearch.properties
+++ b/ambari-logsearch-server/src/test/resources/logsearch.properties
@@ -24,10 +24,6 @@ logsearch.collection.service.logs.replication.factor=987
 logsearch.solr.collection.service.logs=test_service_logs_collection
 logsearch.service.logs.split.interval.mins=1
 
-logsearch.solr.history.config.name=test_history_logs_config_name
-logsearch.collection.history.replication.factor=234
-logsearch.solr.collection.history=test_history_logs_collection
-
 logsearch.auth.file.enable=true
 logsearch.login.credentials.file=user_pass.json
 logsearch.roles.allowed=AMBARI.ADMINISTRATOR
diff --git a/docker/test-config/logfeeder/logfeeder.properties b/docker/test-config/logfeeder/logfeeder.properties
index 1ef8c42e48..22a01b96d2 100644
--- a/docker/test-config/logfeeder/logfeeder.properties
+++ b/docker/test-config/logfeeder/logfeeder.properties
@@ -30,7 +30,7 @@ logfeeder.cache.last.dedup.enabled=true
 logsearch.config.zk_connect_string=localhost:9983
 logfeeder.include.default.level=FATAL,ERROR,WARN,INFO,DEBUG,TRACE,UNKNOWN
 logfeeder.docker.registry.enabled=true
-logfeeder.solr.core.config.name=history
+logfeeder.solr.metadata.collection=logsearch_metadata
 #logfeeder.solr.urls=http://solr:8983/solr
 #logfeeder.configs.local.enabled=true
 #logfeeder.configs.filter.solr.enabled=true
diff --git a/docker/test-config/logsearch/logsearch-https.properties b/docker/test-config/logsearch/logsearch-https.properties
index 0dc502aeac..e1747615a6 100644
--- a/docker/test-config/logsearch/logsearch-https.properties
+++ b/docker/test-config/logsearch/logsearch-https.properties
@@ -31,11 +31,6 @@ logsearch.audit.logs.split.interval.mins=15
 logsearch.collection.audit.logs.numshards=3
 logsearch.collection.audit.logs.replication.factor=2
 
-# History logs
-logsearch.solr.collection.history=history
-logsearch.solr.history.config.name=history
-logsearch.collection.history.replication.factor=1
-
 logsearch.solr.config_set.folder=/root/ambari/ambari-logsearch/ambari-logsearch-server/target/package/conf/solr_configsets
 logsearch.solr.audit.logs.config_set.folder=/root/ambari/ambari-logsearch/ambari-logsearch-server/target/package/conf/solr_configsets
 
diff --git a/docker/test-config/logsearch/logsearch-sso.properties b/docker/test-config/logsearch/logsearch-sso.properties
index 12243acfe3..13d5da30b3 100644
--- a/docker/test-config/logsearch/logsearch-sso.properties
+++ b/docker/test-config/logsearch/logsearch-sso.properties
@@ -31,11 +31,6 @@ logsearch.audit.logs.split.interval.mins=15
 logsearch.collection.audit.logs.numshards=3
 logsearch.collection.audit.logs.replication.factor=2
 
-# History logs
-logsearch.solr.collection.history=history
-logsearch.solr.history.config.name=history
-logsearch.collection.history.replication.factor=1
-
 logsearch.solr.config_set.folder=/root/ambari/ambari-logsearch/ambari-logsearch-server/target/package/conf/solr_configsets
 logsearch.solr.audit.logs.config_set.folder=/root/ambari/ambari-logsearch/ambari-logsearch-server/target/package/conf/solr_configsets
 
diff --git a/jenkins/containers/docker-logsearch-logfeeder/conf/logfeeder.properties b/jenkins/containers/docker-logsearch-logfeeder/conf/logfeeder.properties
index 548be9962b..6e212dd11c 100644
--- a/jenkins/containers/docker-logsearch-logfeeder/conf/logfeeder.properties
+++ b/jenkins/containers/docker-logsearch-logfeeder/conf/logfeeder.properties
@@ -30,4 +30,4 @@ logfeeder.cache.last.dedup.enabled=true
 logsearch.config.zk_connect_string=localhost:9983
 logfeeder.include.default.level=FATAL,ERROR,WARN,INFO,DEBUG,TRACE,UNKNOWN
 logfeeder.docker.registry.enabled=true
-logfeeder.solr.core.config.name=history
\ No newline at end of file
+logfeeder.solr.metadata.collection=logsearch_metadata
\ No newline at end of file


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message