ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oleew...@apache.org
Subject [31/58] [abbrv] ambari git commit: AMBARI-18310. Refactor logsearch portal side code - Part 2 (oleewere)
Date Sat, 05 Nov 2016 16:29:33 GMT
AMBARI-18310. Refactor logsearch portal side code - Part 2 (oleewere)

Change-Id: Icd40f5893085a296803fb339419d13f99acfa04a


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/3d62b004
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/3d62b004
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/3d62b004

Branch: refs/heads/branch-2.5
Commit: 3d62b004701bd0a0dc392224643a9930828bc090
Parents: 51946d9
Author: oleewere <oleewere@gmail.com>
Authored: Wed Sep 7 21:56:39 2016 +0200
Committer: oleewere <oleewere@gmail.com>
Committed: Sat Nov 5 14:46:44 2016 +0100

----------------------------------------------------------------------
 ambari-logsearch/ambari-logsearch-it/pom.xml    |   5 +
 .../logsearch/steps/LogSearchApiSteps.java      |  95 +++++++++
 .../ambari/logsearch/steps/SolrSteps.java       |  13 +-
 .../logsearch/story/LogSearchApiQueryStory.java |  22 +++
 .../ambari/logsearch/story/LogSearchStory.java  |   4 +-
 .../story/log_search_api_query_story.story      |  17 ++
 .../story/logfeeder_parsing_story.story         |  16 +-
 .../service-log-level-counts-values.json        |  33 ++++
 .../test-output/service-log-schema.json         |  18 ++
 .../ambari/logfeeder/output/OutputSolr.java     |   9 +-
 .../ambari-logsearch-portal/pom.xml             |   6 +
 .../org/apache/ambari/logsearch/LogSearch.java  |  38 +++-
 .../logsearch/common/ExternalServerClient.java  |  16 +-
 .../logsearch/conf/ApplicationConfig.java       |  41 +---
 .../ambari/logsearch/conf/AuthConfig.java       |  12 +-
 .../ambari/logsearch/conf/SecurityConfig.java   | 112 +++++++++++
 .../ambari/logsearch/dao/SolrDaoBase.java       |   1 -
 .../apache/ambari/logsearch/dao/UserDao.java    |  13 +-
 .../logsearch/manager/AuditLogsManager.java     |  44 +++--
 .../ambari/logsearch/manager/PublicManager.java |   6 +-
 .../logsearch/manager/ServiceLogsManager.java   | 142 ++++---------
 .../logsearch/model/response/AuditLogData.java  |   4 +-
 .../ambari/logsearch/query/QueryGeneration.java |  48 +++--
 .../query/SearchCriteriaConstants.java          |  78 ++++++++
 .../AbstractCommonAuditLogRequestConverter.java |  16 +-
 .../AbstractCommonSearchRequestConverter.java   |  10 +-
 ...bstractCommonServiceLogRequestConverter.java |  39 ++--
 .../query/converter/AbstractConverterAware.java |  47 +++++
 .../converter/AnyGraphRequestConverter.java     |  12 +-
 .../AuditBarGraphRequestConverter.java          |   2 +-
 .../converter/AuditLogRequestConverter.java     |   2 +-
 .../BaseServiceLogRequestConverter.java         |   7 +-
 .../FieldAuditLogRequestConverter.java          |   2 +-
 .../FieldBarGraphRequestConverter.java          |   4 +-
 .../converter/LogFileRequestConverter.java      |   6 +-
 .../converter/LogFileTailRequestConverter.java  |   8 +-
 .../ServiceAnyGraphRequestConverter.java        |  12 +-
 .../ServiceExtremeDatesRequestConverter.java    |   3 +-
 .../converter/ServiceGraphRequestConverter.java |   6 +-
 .../ServiceLogExportRequestConverter.java       |   9 +-
 .../ServiceLogFileRequestConverter.java         |   4 +-
 .../converter/ServiceLogRequestConverter.java   |  14 +-
 .../ServiceLogTruncatedRequestConverter.java    |  10 +-
 .../converter/SimpleQueryRequestConverter.java  |  11 +-
 .../converter/UserConfigRequestConverter.java   |  10 +-
 .../converter/UserExportRequestConverter.java   |   3 +-
 .../query/model/AnyGraphSearchCriteria.java     |  56 +++++-
 .../model/AuditBarGraphSearchCriteria.java      |  12 +-
 .../query/model/AuditLogSearchCriteria.java     |  12 +-
 .../query/model/CommonSearchCriteria.java       |  93 +++++----
 .../model/CommonServiceLogSearchCriteria.java   |  96 +++++++++
 .../model/FieldAuditBarGraphSearchCriteria.java |  11 +-
 .../model/FieldAuditLogSearchCriteria.java      |  11 +-
 .../query/model/LogFileSearchCriteria.java      |  29 ++-
 .../query/model/LogFileTailSearchCriteria.java  |  13 +-
 .../logsearch/query/model/SearchCriteria.java   |  60 +++---
 .../model/ServiceAnyGraphSearchCriteria.java    |  37 +++-
 .../model/ServiceExtremeDatesCriteria.java      |  11 +-
 .../query/model/ServiceGraphSearchCriteria.java |  11 +-
 .../model/ServiceLogExportSearchCriteria.java   |  19 +-
 .../model/ServiceLogFileSearchCriteria.java     |  21 +-
 .../query/model/ServiceLogSearchCriteria.java   |  44 ++++-
 .../ServiceLogTruncatedSearchCriteria.java      |  27 ++-
 .../query/model/UserConfigSearchCriteria.java   |  27 ++-
 .../query/model/UserExportSearchCriteria.java   |  10 +-
 .../logsearch/rest/AuditLogsResource.java       |   2 +-
 .../logsearch/rest/ServiceLogsResource.java     |   7 +-
 .../logsearch/solr/metrics/SolrJmxAdapter.java  | 134 -------------
 .../solr/metrics/SolrMetricsLoader.java         | 198 -------------------
 .../logsearch/solr/model/SolrAuditLogData.java  |   6 +-
 .../LogsearchLogoutSuccessHandler.java          |   2 +-
 .../LogsearchAuthenticationEntryPoint.java      |   2 +-
 .../LogsearchKRBAuthenticationFilter.java       |   1 +
 ...LogsearchSecurityContextFormationFilter.java |   1 +
 ...rchUsernamePasswordAuthenticationFilter.java |   2 +
 .../web/listeners/SpringEventListener.java      |  32 ---
 ...LogsearchAbstractAuthenticationProvider.java |  10 -
 .../LogsearchAuthenticationProvider.java        |  13 +-
 ...rchExternalServerAuthenticationProvider.java |  12 +-
 .../LogsearchFileAuthenticationProvider.java    |  11 +-
 .../LogsearchLdapAuthenticationProvider.java    |  22 ++-
 .../LogsearchLdapBindAuthenticator.java         |  64 +-----
 .../LogsearchSimpleAuthenticationProvider.java  |  13 +-
 .../src/main/resources/log4j.xml                |   6 +-
 .../META-INF/security-applicationContext.xml    |  83 --------
 .../src/main/webapp/WEB-INF/web.xml             |  62 ------
 .../test-config/logfeeder/logfeeder.properties  |   3 +-
 .../shipper-conf/input.config-hdfs.json         | 172 ++++++++++++++++
 .../docker/test-logs/hdfs-audit/hdfs-audit.log  |   4 +
 89 files changed, 1410 insertions(+), 1082 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/pom.xml b/ambari-logsearch/ambari-logsearch-it/pom.xml
index f9a62cd..1355a27 100644
--- a/ambari-logsearch/ambari-logsearch-it/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-it/pom.xml
@@ -82,6 +82,11 @@
       <artifactId>slf4j-log4j12</artifactId>
       <version>1.7.10</version>
     </dependency>
+    <dependency>
+      <groupId>com.flipkart.zjsonpatch</groupId>
+      <artifactId>zjsonpatch</artifactId>
+      <version>0.2.4</version>
+    </dependency>
   </dependencies>
 
   <build>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/LogSearchApiSteps.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/LogSearchApiSteps.java b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/LogSearchApiSteps.java
new file mode 100644
index 0000000..bcfc4db
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/LogSearchApiSteps.java
@@ -0,0 +1,95 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.steps;
+
+import com.fasterxml.jackson.databind.JsonNode;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import com.flipkart.zjsonpatch.JsonDiff;
+import com.google.common.io.Resources;
+import org.apache.ambari.logsearch.domain.StoryDataRegistry;
+import org.glassfish.jersey.client.JerseyClient;
+import org.glassfish.jersey.client.JerseyClientBuilder;
+import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
+import org.jbehave.core.annotations.Named;
+import org.jbehave.core.annotations.Then;
+import org.jbehave.core.annotations.When;
+import org.junit.Assert;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import javax.ws.rs.client.Invocation;
+import javax.ws.rs.client.WebTarget;
+import javax.ws.rs.core.MediaType;
+import java.io.File;
+import java.io.IOException;
+import java.net.URISyntaxException;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class LogSearchApiSteps {
+
+  private static Logger LOG = LoggerFactory.getLogger(LogSearchApiSteps.class);
+
+  private String response;
+
+  @When("LogSearch api query sent: <apiQuery>")
+  public void sendApiQuery(@Named("apiQuery") String apiQuery) {
+    JerseyClient jerseyClient = JerseyClientBuilder.createClient();
+    HttpAuthenticationFeature authFeature = HttpAuthenticationFeature.basicBuilder()
+      .credentials("admin", "admin")
+      .build();
+    jerseyClient.register(authFeature);
+
+    String logsearchUrl = String.format("http://%s:%d%s",
+      StoryDataRegistry.INSTANCE.getDockerHost(),
+      StoryDataRegistry.INSTANCE.getLogsearchPort(),
+      apiQuery);
+
+    LOG.info("Url: {}", logsearchUrl);
+
+    WebTarget target = jerseyClient.target(logsearchUrl);
+    Invocation.Builder invocationBuilder =  target.request(MediaType.APPLICATION_JSON_TYPE);
+    response = invocationBuilder.get().readEntity(String.class);
+  }
+
+
+  @Then("The api query result is <jsonResult>")
+  public void verifyRestApiCall(@Named("jsonResult") String jsonResult) throws IOException, URISyntaxException {
+    ObjectMapper mapper = new ObjectMapper();
+    Path jsonFilePath = new File(Resources.getResource("test-output/" + jsonResult).toURI()).toPath();
+    String jsonExpected = new String(Files.readAllBytes(jsonFilePath));
+
+    JsonNode expected = mapper.readTree(jsonExpected);
+    JsonNode result = mapper.readTree(response);
+    JsonNode patch = JsonDiff.asJson(expected, result);
+    List<Object> diffObjects = mapper.convertValue(patch, List.class);
+    assertDiffs(diffObjects, expected);
+
+  }
+
+  private void assertDiffs(List<Object> diffObjects, JsonNode expected) {
+    for (Object diffObj : diffObjects) {
+      String path = ((Map<String, String>) diffObj).get("path");
+      Assert.assertTrue(expected.at(path).isMissingNode());
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/SolrSteps.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/SolrSteps.java b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/SolrSteps.java
index e1e5b99..7c72ca7 100644
--- a/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/SolrSteps.java
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/steps/SolrSteps.java
@@ -22,25 +22,24 @@ import org.apache.ambari.logsearch.domain.StoryDataRegistry;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrQuery;
 import org.apache.solr.client.solrj.SolrServerException;
-import org.apache.solr.client.solrj.impl.CloudSolrClient;
-import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.common.SolrDocumentList;
-import org.jbehave.core.annotations.Given;
+import org.jbehave.core.annotations.Named;
 import org.jbehave.core.annotations.Then;
-import org.jbehave.core.annotations.When;
-import org.jbehave.core.model.Story;
 import org.junit.Assert;
 
 import java.io.IOException;
 
 public class SolrSteps {
 
-  @Then("the number of $component docs is: $docSize")
-  public void numberOfDocsForComponent(String component, int docSize) throws IOException, SolrServerException {
+  @Then("the number of <component> docs is: <docSize>")
+  public void numberOfDocsForComponent(@Named("component") String component, @Named("docSize") int docSize)
+    throws IOException, SolrServerException, InterruptedException {
     SolrClient solrClient = StoryDataRegistry.INSTANCE.getCloudSolrClient();
     SolrQuery solrQuery = new SolrQuery();
     solrQuery.setQuery(String.format("type:%s", component));
+    solrQuery.setStart(0);
+    solrQuery.setRows(20);
     QueryResponse queryResponse = solrClient.query(StoryDataRegistry.INSTANCE.getServiceLogsCollection(), solrQuery);
     SolrDocumentList list = queryResponse.getResults();
     Assert.assertEquals(docSize, list.size());

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchApiQueryStory.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchApiQueryStory.java b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchApiQueryStory.java
new file mode 100644
index 0000000..45455bf
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchApiQueryStory.java
@@ -0,0 +1,22 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.story;
+
+public class LogSearchApiQueryStory extends LogSearchStory {
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchStory.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchStory.java b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchStory.java
index f85eb08..ce6b9cb 100644
--- a/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchStory.java
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/java/org/apache/ambari/logsearch/story/LogSearchStory.java
@@ -18,6 +18,7 @@
  */
 package org.apache.ambari.logsearch.story;
 
+import org.apache.ambari.logsearch.steps.LogSearchApiSteps;
 import org.apache.ambari.logsearch.steps.SolrSteps;
 import org.apache.ambari.logsearch.steps.LogSearchDockerSteps;
 import org.jbehave.core.configuration.Configuration;
@@ -47,7 +48,8 @@ abstract public class LogSearchStory extends JUnitStory {
   public InjectableStepsFactory stepsFactory() {
     return new InstanceStepsFactory(configuration(),
       new LogSearchDockerSteps(),
-      new SolrSteps());
+      new SolrSteps(),
+      new LogSearchApiSteps());
   }
 
   @Test

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/log_search_api_query_story.story
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/log_search_api_query_story.story b/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/log_search_api_query_story.story
new file mode 100644
index 0000000..5abe8b4
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/log_search_api_query_story.story
@@ -0,0 +1,17 @@
+Meta:
+
+Narrative:
+As a user
+I want to perform queries against Log Search api
+So that I can validate the json outputs
+
+Scenario: scenario description
+
+Given logsearch docker container
+When LogSearch api query sent: <apiQuery>
+Then The api query result is <jsonResult>
+
+Examples:
+|apiQuery|jsonResult|
+|/api/v1/service/logs/schema/fields|service-log-schema.json|
+|/api/v1/service/logs/levels/counts/namevalues?page=0&pageSize=25&startIndex=0&q=*%3A*|service-log-level-counts-values.json|
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/logfeeder_parsing_story.story
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/logfeeder_parsing_story.story b/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/logfeeder_parsing_story.story
index a40d04a..388e624 100644
--- a/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/logfeeder_parsing_story.story
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/resources/org/apache/ambari/logsearch/story/logfeeder_parsing_story.story
@@ -5,14 +5,16 @@ As a user
 I want to start logsearch/logfeeder/solr components in a docker container with test logs
 So that I can parse and store the logs into Solr
 
-Scenario: Logsearch logs are stored into Solr.
+Scenario: Number of logs for components
 
 Given logsearch docker container
 When logfeeder started (parse logs & send data to solr)
-Then the number of logsearch_app docs is: 1
+Then the number of <component> docs is: <docSize>
 
-Scenario: Zookeeper logs are stored into Solr.
-
-Given logsearch docker container
-When logfeeder started (parse logs & send data to solr)
-Then the number of zookeeper docs is: 3
+Examples:
+|component|docSize|
+|logsearch_app|1|
+|zookeeper|3|
+|hst_agent|4|
+|secure_log|11|
+|system_message|17|

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-level-counts-values.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-level-counts-values.json b/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-level-counts-values.json
new file mode 100644
index 0000000..0ef05e8
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-level-counts-values.json
@@ -0,0 +1,33 @@
+{
+  "vNameValues": [
+    {
+      "name": "FATAL",
+      "value": "0"
+    },
+    {
+      "name": "ERROR",
+      "value": "0"
+    },
+    {
+      "name": "WARN",
+      "value": "3"
+    },
+    {
+      "name": "INFO",
+      "value": "4"
+    },
+    {
+      "name": "DEBUG",
+      "value": "1"
+    },
+    {
+      "name": "TRACE",
+      "value": "0"
+    },
+    {
+      "name": "UNKNOWN",
+      "value": "28"
+    }
+  ],
+  "listSize": 7
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-schema.json
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-schema.json b/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-schema.json
new file mode 100644
index 0000000..9efa58b
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-it/src/test/resources/test-output/service-log-schema.json
@@ -0,0 +1,18 @@
+{
+  "log_message": "Log Message",
+  "bundle_id": "Bundle Id",
+  "case_id": "Case Id",
+  "cluster": "Cluster",
+  "event_count": "Event Count",
+  "file": "File",
+  "host": "Host",
+  "id": "Id",
+  "ip": "IP",
+  "level": "Level",
+  "logfile_line_number": "Logfile Line Number",
+  "logger_name": "Logger Name",
+  "method": "method",
+  "path": "Path",
+  "text": "Text",
+  "type": "Type"
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
index 47f139d..53cb6c0 100644
--- a/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
+++ b/ambari-logsearch/ambari-logsearch-logfeeder/src/main/java/org/apache/ambari/logfeeder/output/OutputSolr.java
@@ -77,17 +77,17 @@ public class OutputSolr extends Output {
 
   private BlockingQueue<OutputData> outgoingBuffer = null;
   private List<SolrWorkerThread> workerThreadList = new ArrayList<>();
-  
+
   @Override
   protected String getStatMetricName() {
     return "output.solr.write_logs";
   }
-  
+
   @Override
   protected String getWriteBytesMetricName() {
     return "output.solr.write_bytes";
   }
-  
+
   @Override
   public void init() throws Exception {
     super.init();
@@ -263,6 +263,9 @@ public class OutputSolr extends Output {
   private void useActualDateIfNeeded(Map<String, Object> jsonObj) {
     if (skipLogtime) {
       jsonObj.put("logtime", DateUtil.getActualDateStr());
+      if (jsonObj.get("evtTime") != null) {
+        jsonObj.put("evtTime", DateUtil.getActualDateStr());
+      }
     }
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/pom.xml
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/pom.xml b/ambari-logsearch/ambari-logsearch-portal/pom.xml
index 7b3b174..486a0ba 100755
--- a/ambari-logsearch/ambari-logsearch-portal/pom.xml
+++ b/ambari-logsearch/ambari-logsearch-portal/pom.xml
@@ -36,6 +36,7 @@
     <jersey.version>2.23.2</jersey.version>
     <jetty-version>9.2.11.v20150529</jetty-version>
     <swagger.version>1.5.8</swagger.version>
+    <spring-data-solr.version>2.0.2.RELEASE</spring-data-solr.version>
   </properties>
   <profiles>
     <!-- Dev Profile Start -->
@@ -751,5 +752,10 @@
       <artifactId>swagger-ui</artifactId>
       <version>2.1.0</version>
     </dependency>
+    <dependency>
+      <groupId>org.springframework.data</groupId>
+      <artifactId>spring-data-solr</artifactId>
+      <version>${spring-data-solr.version}</version>
+    </dependency>
   </dependencies>
 </project>

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/LogSearch.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/LogSearch.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/LogSearch.java
index 27b943a..75d8be3 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/LogSearch.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/LogSearch.java
@@ -24,11 +24,11 @@ import java.net.ServerSocket;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.net.URL;
+import java.util.EnumSet;
 
-import org.apache.ambari.logsearch.common.ConfigHelper;
 import org.apache.ambari.logsearch.common.ManageStartEndTime;
 import org.apache.ambari.logsearch.common.PropertiesHelper;
-import org.apache.ambari.logsearch.solr.metrics.SolrMetricsLoader;
+import org.apache.ambari.logsearch.conf.ApplicationConfig;
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.eclipse.jetty.server.Connector;
@@ -40,10 +40,18 @@ import org.eclipse.jetty.server.ServerConnector;
 import org.eclipse.jetty.server.SslConnectionFactory;
 import org.eclipse.jetty.server.handler.HandlerList;
 import org.eclipse.jetty.server.handler.ResourceHandler;
+import org.eclipse.jetty.servlet.FilterHolder;
 import org.eclipse.jetty.servlet.ServletContextHandler;
+import org.eclipse.jetty.servlet.ServletHolder;
 import org.eclipse.jetty.util.resource.Resource;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.eclipse.jetty.webapp.WebAppContext;
+import org.springframework.web.context.ContextLoaderListener;
+import org.springframework.web.context.request.RequestContextListener;
+import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
+import org.springframework.web.filter.DelegatingFilterProxy;
+
+import javax.servlet.DispatcherType;
 
 public class LogSearch {
   private static final Logger logger = Logger.getLogger(LogSearch.class);
@@ -65,6 +73,7 @@ public class LogSearch {
   
   private static final String WEB_RESOURCE_FOLDER = "webapps/app";
   private static final String ROOT_CONTEXT = "/";
+  private static final Integer SESSION_TIMEOUT = 30;
 
  
   public static void main(String[] argv) {
@@ -75,7 +84,6 @@ public class LogSearch {
     } catch (Throwable e) {
       logger.error("Error running logsearch server", e);
     }
-    SolrMetricsLoader.startSolrMetricsLoaderTasks();
   }
   
   public void run(String[] argv) throws Exception {
@@ -150,6 +158,21 @@ public class LogSearch {
     context.setBaseResource(Resource.newResource(webResourceBase));
     context.setContextPath(ROOT_CONTEXT);
     context.setParentLoaderPriority(true);
+
+    // Configure Spring
+    context.addEventListener(new ContextLoaderListener());
+    context.addEventListener(new RequestContextListener());
+    context.addFilter(new FilterHolder(new DelegatingFilterProxy("springSecurityFilterChain")), "/*", EnumSet.allOf(DispatcherType.class));
+    context.setInitParameter("contextClass", AnnotationConfigWebApplicationContext.class.getName());
+    context.setInitParameter("contextConfigLocation", ApplicationConfig.class.getName());
+
+    // Configure Jersey
+    ServletHolder jerseyServlet = context.addServlet(org.glassfish.jersey.servlet.ServletContainer.class, "/api/v1/*");
+    jerseyServlet.setInitOrder(1);
+    jerseyServlet.setInitParameter("jersey.config.server.provider.packages","org.apache.ambari.logsearch.rest,io.swagger.jaxrs.listing");
+
+    context.getSessionHandler().getSessionManager().setMaxInactiveInterval(SESSION_TIMEOUT);
+
     return context;
   }
 
@@ -167,18 +190,19 @@ public class LogSearch {
   private URI findWebResourceBase() {
     URL fileCompleteUrl = Thread.currentThread().getContextClassLoader()
         .getResource(WEB_RESOURCE_FOLDER);
+    String errorMessage = "Web Resource Folder " + WEB_RESOURCE_FOLDER+ " not found in classpath";
     if (fileCompleteUrl != null) {
       try {
         return fileCompleteUrl.toURI().normalize();
       } catch (URISyntaxException e) {
-        logger.error("Web Resource Folder " + WEB_RESOURCE_FOLDER+ " not found in classpath", e);
+        logger.error(errorMessage, e);
         System.exit(1);
       }
-    }else{
-      logger.error("Web Resource Folder " + WEB_RESOURCE_FOLDER+ " not found in classpath");
+    } else {
+      logger.error(errorMessage);
       System.exit(1);
     }
-    return null;
+    throw new IllegalStateException(errorMessage);
   }
 
   private void checkPort(int port) {

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java
index edc78d1..2590dfe 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/common/ExternalServerClient.java
@@ -21,7 +21,6 @@ package org.apache.ambari.logsearch.common;
 import java.util.List;
 import java.util.Map;
 
-import javax.annotation.PostConstruct;
 import javax.inject.Inject;
 import javax.ws.rs.client.Invocation;
 import javax.ws.rs.client.WebTarget;
@@ -29,7 +28,6 @@ import javax.ws.rs.core.MediaType;
 import javax.ws.rs.core.MultivaluedMap;
 
 import org.apache.ambari.logsearch.conf.AuthConfig;
-import org.apache.ambari.logsearch.web.security.LogsearchAbstractAuthenticationProvider;
 import org.apache.commons.lang.StringUtils;
 import org.apache.log4j.Logger;
 import org.glassfish.jersey.client.JerseyClient;
@@ -55,23 +53,18 @@ public class ExternalServerClient {
   @Inject
   private AuthConfig authConfig;
 
-  private boolean enableLog = false;// default
-
   /**
    * Send GET request to an external server
    */
-  @SuppressWarnings({ "unchecked", "rawtypes" })
   public Object sendGETRequest(String url, Class klass, MultivaluedMap<String, String> queryParam,
                                String username, String password)
       throws Exception {
     url = authConfig.getExternalAuthHostUrl() + url;
     JerseyClient client = localJerseyClient.get();
-    HttpAuthenticationFeature authFeature = HttpAuthenticationFeature.basicBuilder().build();
-
+    HttpAuthenticationFeature authFeature = HttpAuthenticationFeature.basicBuilder()
+      .credentials(username, password)
+      .build();
     client.register(authFeature);
-    if (enableLog) {
-      client.register(LoggingFilter.class);
-    }
 
     WebTarget target = client.target(url);
     LOG.debug("URL: " + url);
@@ -80,9 +73,6 @@ public class ExternalServerClient {
       LOG.debug(
         String.format("Query parameter: name - %s  ; value - %s ;" + entry.getKey(), StringUtils.join(entry.getValue(),',')));
     }
-    target
-      .property(HttpAuthenticationFeature.HTTP_AUTHENTICATION_BASIC_USERNAME, username)
-      .property(HttpAuthenticationFeature.HTTP_AUTHENTICATION_BASIC_PASSWORD, password);
     Invocation.Builder invocationBuilder =  target.request(MediaType.APPLICATION_JSON_TYPE);
     try {
       return invocationBuilder.get().readEntity(klass);

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApplicationConfig.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApplicationConfig.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApplicationConfig.java
index 72ea942..b279a83 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApplicationConfig.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/ApplicationConfig.java
@@ -18,38 +18,16 @@
  */
 package org.apache.ambari.logsearch.conf;
 
-import org.apache.ambari.logsearch.query.converter.AnyGraphRequestConverter;
-import org.apache.ambari.logsearch.query.converter.AuditBarGraphRequestConverter;
-import org.apache.ambari.logsearch.query.converter.AuditLogRequestConverter;
-import org.apache.ambari.logsearch.query.converter.BaseAuditLogRequestConverter;
-import org.apache.ambari.logsearch.query.converter.BaseServiceLogRequestConverter;
-import org.apache.ambari.logsearch.query.converter.FieldAuditLogRequestConverter;
-import org.apache.ambari.logsearch.query.converter.FieldBarGraphRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceAnyGraphRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceExtremeDatesRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceGraphRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceLogExportRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceLogFileRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceLogRequestConverter;
-import org.apache.ambari.logsearch.query.converter.ServiceLogTruncatedRequestConverter;
-import org.apache.ambari.logsearch.query.converter.SimpleQueryRequestConverter;
-import org.apache.ambari.logsearch.query.converter.UserExportRequestConverter;
 import org.springframework.context.annotation.Bean;
 import org.springframework.context.annotation.ComponentScan;
 import org.springframework.context.annotation.Configuration;
-import org.springframework.context.annotation.ImportResource;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.context.support.ConversionServiceFactoryBean;
 import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
-import org.springframework.core.convert.converter.Converter;
-
-import java.util.HashSet;
-import java.util.Set;
 
 @Configuration
 @ComponentScan("org.apache.ambari.logsearch")
 @PropertySource(value = {"classpath:default.properties", "classpath:logsearch.properties"})
-@ImportResource("META-INF/security-applicationContext.xml")
 public class ApplicationConfig {
 
   @Bean
@@ -60,24 +38,7 @@ public class ApplicationConfig {
   @Bean(name="conversionService")
   public ConversionServiceFactoryBean conversionServiceFactoryBean() {
     ConversionServiceFactoryBean conversionServiceFactoryBean = new ConversionServiceFactoryBean();
-    Set<Converter> converters = new HashSet<>();
-    converters.add(new AnyGraphRequestConverter());
-    converters.add(new AuditBarGraphRequestConverter());
-    converters.add(new AuditLogRequestConverter());
-    converters.add(new BaseAuditLogRequestConverter());
-    converters.add(new BaseServiceLogRequestConverter());
-    converters.add(new FieldAuditLogRequestConverter());
-    converters.add(new FieldBarGraphRequestConverter());
-    converters.add(new SimpleQueryRequestConverter());
-    converters.add(new UserExportRequestConverter());
-    converters.add(new ServiceAnyGraphRequestConverter());
-    converters.add(new ServiceExtremeDatesRequestConverter());
-    converters.add(new ServiceGraphRequestConverter());
-    converters.add(new ServiceLogExportRequestConverter());
-    converters.add(new ServiceLogFileRequestConverter());
-    converters.add(new ServiceLogRequestConverter());
-    converters.add(new ServiceLogTruncatedRequestConverter());
-    conversionServiceFactoryBean.setConverters(converters);
+    conversionServiceFactoryBean.afterPropertiesSet();
     return conversionServiceFactoryBean;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/AuthConfig.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/AuthConfig.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/AuthConfig.java
index 3398a83..46d07bd 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/AuthConfig.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/AuthConfig.java
@@ -30,9 +30,11 @@ public class AuthConfig {
   boolean authLdapEnabled;
   @Value("${logsearch.auth.simple.enable:false}")
   boolean authSimpleEnabled;
+  @Value("${logsearch.auth.external_auth.enable:false}")
+  boolean authExternalEnabled;
   @Value("${logsearch.auth.external_auth.host_url:'http://ip:port'}")
   private String externalAuthHostUrl;
-  @Value("${logsearch.auth.login_url:/api/v1/users/$USERNAME/privileges?fields=*}")
+  @Value("${logsearch.auth.external_auth.login_url:/api/v1/users/$USERNAME/privileges?fields=*}")
   private String externalAuthLoginUrl;
   @Value("${logsearch.login.credentials.file:user_pass.json}")
   private String credentialsFile;
@@ -84,4 +86,12 @@ public class AuthConfig {
   public void setExternalAuthLoginUrl(String externalAuthLoginUrl) {
     this.externalAuthLoginUrl = externalAuthLoginUrl;
   }
+
+  public boolean isAuthExternalEnabled() {
+    return authExternalEnabled;
+  }
+
+  public void setAuthExternalEnabled(boolean authExternalEnabled) {
+    this.authExternalEnabled = authExternalEnabled;
+  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
new file mode 100644
index 0000000..d3db110
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/conf/SecurityConfig.java
@@ -0,0 +1,112 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.conf;
+
+import org.apache.ambari.logsearch.web.authenticate.LogsearchAuthFailureHandler;
+import org.apache.ambari.logsearch.web.authenticate.LogsearchAuthSuccessHandler;
+import org.apache.ambari.logsearch.web.authenticate.LogsearchLogoutSuccessHandler;
+import org.apache.ambari.logsearch.web.filters.LogsearchAuthenticationEntryPoint;
+import org.apache.ambari.logsearch.web.filters.LogsearchKRBAuthenticationFilter;
+import org.apache.ambari.logsearch.web.filters.LogsearchSecurityContextFormationFilter;
+import org.apache.ambari.logsearch.web.filters.LogsearchUsernamePasswordAuthenticationFilter;
+import org.apache.ambari.logsearch.web.security.LogsearchAuthenticationProvider;
+import org.springframework.context.annotation.Bean;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.security.config.annotation.web.builders.HttpSecurity;
+import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
+import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
+import org.springframework.security.config.http.SessionCreationPolicy;
+import org.springframework.security.web.access.intercept.FilterSecurityInterceptor;
+import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
+
+@Configuration
+@EnableWebSecurity
+public class SecurityConfig extends WebSecurityConfigurerAdapter {
+
+  @Override
+  protected void configure(HttpSecurity http) throws Exception {
+    http
+      .csrf().disable()
+      .sessionManagement()
+         .sessionFixation()
+         .newSession()
+         .sessionCreationPolicy(SessionCreationPolicy.ALWAYS)
+      .and()
+      .authorizeRequests()
+        .antMatchers("/login.html").permitAll()
+        .antMatchers("/styles/**").permitAll()
+        .antMatchers("/fonts/**").permitAll()
+        .antMatchers("/fonts/**").permitAll()
+        .antMatchers("/scripts/**").permitAll()
+        .antMatchers("/libs/**").permitAll()
+        .antMatchers("/images/**").permitAll()
+        .antMatchers("/templates/**").permitAll()
+        .antMatchers("/favicon.ico").permitAll()
+        .antMatchers("/api/v1/public/**").permitAll()
+        .antMatchers("/api/v1/swagger.json").permitAll()
+        .antMatchers("/**").authenticated()
+      .and()
+      .authenticationProvider(logsearchAuthenticationProvider())
+        .formLogin()
+        .loginPage("/login.html")
+      .and()
+      .httpBasic()
+        .authenticationEntryPoint(logsearchAuthenticationEntryPoint())
+      .and()
+      .addFilterBefore(logsearchUsernamePasswordAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)
+      .addFilterBefore(new LogsearchKRBAuthenticationFilter(), UsernamePasswordAuthenticationFilter.class)
+      .addFilterAfter(securityContextFormationFilter(), FilterSecurityInterceptor.class)
+      .logout()
+        .logoutUrl("/logout.html")
+        .deleteCookies("JSESSIONID")
+        .logoutSuccessHandler(new LogsearchLogoutSuccessHandler());
+  }
+
+  @Bean
+  public LogsearchSecurityContextFormationFilter securityContextFormationFilter() {
+    return new LogsearchSecurityContextFormationFilter();
+  }
+
+  @Bean
+  public LogsearchKRBAuthenticationFilter logsearchKRBAuthenticationFilter() {
+    return new LogsearchKRBAuthenticationFilter();
+  }
+
+  @Bean
+  public LogsearchAuthenticationProvider logsearchAuthenticationProvider() {
+    return new LogsearchAuthenticationProvider();
+  }
+
+  @Bean
+  public LogsearchAuthenticationEntryPoint logsearchAuthenticationEntryPoint() {
+    LogsearchAuthenticationEntryPoint entryPoint = new LogsearchAuthenticationEntryPoint("/login.html");
+    entryPoint.setForceHttps(false);
+    return entryPoint;
+  }
+
+  @Bean
+  public LogsearchUsernamePasswordAuthenticationFilter logsearchUsernamePasswordAuthenticationFilter() throws Exception {
+    LogsearchUsernamePasswordAuthenticationFilter filter = new LogsearchUsernamePasswordAuthenticationFilter();
+    filter.setAuthenticationSuccessHandler(new LogsearchAuthSuccessHandler());
+    filter.setAuthenticationFailureHandler(new LogsearchAuthFailureHandler());
+    filter.setAuthenticationManager(authenticationManagerBean());
+    return filter;
+  }
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java
index b325171..ac7f56f 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrDaoBase.java
@@ -29,7 +29,6 @@ import java.util.List;
 import org.apache.ambari.logsearch.common.ConfigHelper;
 import org.apache.ambari.logsearch.common.LogSearchContext;
 import org.apache.ambari.logsearch.common.MessageEnums;
-import org.apache.ambari.logsearch.common.PropertiesHelper;
 import org.apache.ambari.logsearch.conf.SolrKerberosConfig;
 import org.apache.ambari.logsearch.conf.SolrUserConfig;
 import org.apache.ambari.logsearch.manager.ManagerBase.LogType;

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java
index a04dee4..4ca9df6 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/UserDao.java
@@ -52,9 +52,6 @@ public class UserDao {
   private static final String NAME = "name";
 
   @Inject
-  private LogsearchFileAuthenticationProvider fileAuthenticationProvider;
-
-  @Inject
   private AuthConfig authConfig;
 
   private ArrayList<HashMap<String, String>> userList = null;
@@ -62,7 +59,7 @@ public class UserDao {
   @SuppressWarnings("unchecked")
   @PostConstruct
   public void initialization() {
-    if (fileAuthenticationProvider.isEnable()) {
+    if (authConfig.isAuthFileEnabled()) {
       try {
         String userPassJsonFileName = authConfig.getCredentialsFile();
         logger.info("USER PASS JSON  file NAME:" + userPassJsonFileName);
@@ -151,12 +148,4 @@ public class UserDao {
     }
     return isUpdated;
   }
-  
-  public String encryptPassword(String username, String password) {
-    if (!StringUtils.isEmpty(username)) {
-      username = username.toLowerCase();
-    }
-    String saltEncodedpasswd = CommonUtil.encryptPassword(password, username);
-    return saltEncodedpasswd;
-  }
 }

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/AuditLogsManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/AuditLogsManager.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/AuditLogsManager.java
index 7affc5a..c64cf71 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/AuditLogsManager.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/AuditLogsManager.java
@@ -49,6 +49,12 @@ import org.apache.ambari.logsearch.model.response.LogData;
 import org.apache.ambari.logsearch.model.response.LogSearchResponse;
 import org.apache.ambari.logsearch.model.response.NameValueData;
 import org.apache.ambari.logsearch.model.response.NameValueDataListResponse;
+import org.apache.ambari.logsearch.query.model.AnyGraphSearchCriteria;
+import org.apache.ambari.logsearch.query.model.AuditBarGraphSearchCriteria;
+import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
+import org.apache.ambari.logsearch.query.model.FieldAuditBarGraphSearchCriteria;
+import org.apache.ambari.logsearch.query.model.FieldAuditLogSearchCriteria;
+import org.apache.ambari.logsearch.query.model.UserExportSearchCriteria;
 import org.apache.ambari.logsearch.solr.model.SolrAuditLogData;
 import org.apache.ambari.logsearch.solr.model.SolrComponentTypeLogData;
 import org.apache.ambari.logsearch.util.BizUtil;
@@ -82,7 +88,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
   private SolrAuditLogConfig solrAuditLogConfig;
 
   public AuditLogResponse getLogs(AuditLogSearchCriteria searchCriteria) {
-    Boolean isLastPage = (Boolean) searchCriteria.getParamValue("isLastPage");
+    Boolean isLastPage = searchCriteria.isLastPage();
     if (isLastPage) {
       SolrQuery lastPageQuery = queryGenerator.commonAuditFilterQuery(searchCriteria);
       LogSearchResponse logResponse = getLastPage(searchCriteria, LogSearchConstants.AUDIT_EVTTIME, auditSolrDao, lastPageQuery);
@@ -95,7 +101,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
     return getLogAsPaginationProvided(solrQuery, auditSolrDao);
   }
 
-  private List<LogData> getComponents(SearchCriteria searchCriteria) {
+  private List<LogData> getComponents(CommonSearchCriteria searchCriteria) {
     SolrQuery solrQuery = queryGenerator.commonAuditFilterQuery(searchCriteria);
     List<LogData> docList = new ArrayList<>();
     try {
@@ -133,7 +139,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
     }
   }
 
-  public GroupListResponse getAuditComponents(SearchCriteria searchCriteria) {
+  public GroupListResponse getAuditComponents(CommonSearchCriteria searchCriteria) {
     GroupListResponse componentResponse = new GroupListResponse();
     List<LogData> docList = getComponents(searchCriteria);
     componentResponse.setGroupList(docList);
@@ -141,13 +147,13 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
   }
 
   @SuppressWarnings("unchecked")
-  public BarGraphDataListResponse getAuditBarGraphData(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse getAuditBarGraphData(AuditBarGraphSearchCriteria searchCriteria) {
     BarGraphDataListResponse dataList = new BarGraphDataListResponse();
     SolrQuery solrQuery = queryGenerator.commonAuditFilterQuery(searchCriteria);
 
-    String from = getFrom((String) searchCriteria.getParamValue("startTime"));
-    String to = getTo((String) searchCriteria.getParamValue("endTime"));
-    String unit = getUnit((String) searchCriteria.getParamValue("unit"));
+    String from = getFrom(searchCriteria.getStartTime());
+    String to = getTo(searchCriteria.getEndTime());
+    String unit = getUnit(searchCriteria.getUnit());
 
     List<BarGraphData> histogramData = new ArrayList<BarGraphData>();
     String jsonHistogramQuery = queryGenerator.buildJSONFacetTermTimeRangeQuery(LogSearchConstants.AUDIT_COMPONENT,
@@ -225,7 +231,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
     }
   }
 
-  public BarGraphDataListResponse topTenUsers(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse topTenUsers(FieldAuditBarGraphSearchCriteria searchCriteria) {
 
     String jsonUserQuery =
       "{Users:{type:terms, field:reqUser, facet:{ Repo:{ type:terms, field:repo, facet:{eventCount:\"sum(event_count)\"}}}}}";
@@ -262,7 +268,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
     }
   }
 
-  public BarGraphDataListResponse topTenResources(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse topTenResources(FieldAuditLogSearchCriteria searchCriteria) {
 
     String jsonUserQuery =
       "{Users:{type:terms,field:resource,facet:{Repo:{type:terms,field:repo,facet:{eventCount:\"sum(event_count)\"}}}}}";
@@ -294,11 +300,11 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
   }
 
   @SuppressWarnings("unchecked")
-  public BarGraphDataListResponse getRequestUserLineGraph(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse getRequestUserLineGraph(FieldAuditBarGraphSearchCriteria searchCriteria) {
 
-    String from = getFrom((String) searchCriteria.getParamValue("startTime"));
-    String to = getTo((String) searchCriteria.getParamValue("endTime"));
-    String unit = getUnit((String) searchCriteria.getParamValue("unit"));
+    String from = getFrom(searchCriteria.getStartTime());
+    String to = getTo(searchCriteria.getEndTime());
+    String unit = getUnit(searchCriteria.getUnit());
 
     SolrQuery solrQuery = queryGenerator.commonAuditFilterQuery(searchCriteria);
 
@@ -355,7 +361,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
 
   }
 
-  public BarGraphDataListResponse getAnyGraphData(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse getAnyGraphData(AnyGraphSearchCriteria searchCriteria) {
     searchCriteria.addParam("fieldTime", LogSearchConstants.AUDIT_EVTTIME);
     SolrQuery solrQuery = queryGenerator.commonAuditFilterQuery(searchCriteria);
     BarGraphDataListResponse result = graphDataGenerator.getAnyGraphData(searchCriteria, auditSolrDao, solrQuery);
@@ -396,13 +402,13 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
   }
 
   @SuppressWarnings({"unchecked"})
-  public Response exportUserTableToTextFile(SearchCriteria searchCriteria) {
+  public Response exportUserTableToTextFile(UserExportSearchCriteria searchCriteria) {
     String jsonUserQuery =
       "{ Users: { type: terms, field: reqUser, facet:  {Repo: {  type: terms, field: repo, facet: {  eventCount: \"sum(event_count)\"}}}},x:{ type: terms,field: resource, facet: {y: {  type: terms, field: repo,facet: {  eventCount: \"sum(event_count)\"}}}}}";
 
     SolrQuery solrQuery = queryGenerator.commonAuditFilterQuery(searchCriteria);
-    String startTime = (String) searchCriteria.getParamValue("startTime");
-    String endTime = (String) searchCriteria.getParamValue("endTime");
+    String startTime = searchCriteria.getStartTime();
+    String endTime = searchCriteria.getEndTime();
 
     startTime = startTime == null ? "" : startTime;
     endTime = endTime == null ? "" : "_" + endTime;
@@ -410,7 +416,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
     SolrUtil.setJSONFacet(solrQuery, jsonUserQuery);
     SolrUtil.setRowCount(solrQuery, 0);
 
-    String dataFormat = (String) searchCriteria.getParamValue("format");
+    String dataFormat = searchCriteria.getFormat();
     FileOutputStream fis = null;
     try {
       QueryResponse queryResponse = auditSolrDao.process(solrQuery);
@@ -543,7 +549,7 @@ public class AuditLogsManager extends ManagerBase<SolrAuditLogData, AuditLogResp
     return fieldWithBlank;
   }
 
-  public BarGraphDataListResponse getServiceLoad(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse getServiceLoad(CommonSearchCriteria searchCriteria) {
     BarGraphDataListResponse dataList = new BarGraphDataListResponse();
     Collection<BarGraphData> vaDatas = new ArrayList<BarGraphData>();
     dataList.setGraphData(vaDatas);

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/PublicManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/PublicManager.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/PublicManager.java
index 23f62aa..3ac2be6 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/PublicManager.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/PublicManager.java
@@ -22,9 +22,9 @@ package org.apache.ambari.logsearch.manager;
 import java.util.ArrayList;
 import java.util.List;
 
+import org.apache.ambari.logsearch.conf.AuthConfig;
 import org.apache.ambari.logsearch.model.response.NameValueData;
 import org.apache.ambari.logsearch.model.response.NameValueDataListResponse;
-import org.apache.ambari.logsearch.web.security.LogsearchSimpleAuthenticationProvider;
 import org.springframework.stereotype.Component;
 
 import javax.inject.Inject;
@@ -33,14 +33,14 @@ import javax.inject.Inject;
 public class PublicManager extends JsonManagerBase {
 
   @Inject
-  private LogsearchSimpleAuthenticationProvider simpleAuthenticationProvider;
+  private AuthConfig authConfig;
 
   public String getGeneralConfig() {
     NameValueDataListResponse nameValueList = new NameValueDataListResponse();
     List<NameValueData> nameValues = new ArrayList<>();
     NameValueData nameValue = new NameValueData();
     nameValue.setName("simpleAuth");
-    nameValue.setValue("" + simpleAuthenticationProvider.isEnable());
+    nameValue.setValue("" + authConfig.isAuthSimpleEnabled());
     nameValues.add(nameValue);
     nameValueList.setvNameValues(nameValues);
     return convertObjToString(nameValueList);

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/ServiceLogsManager.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/ServiceLogsManager.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/ServiceLogsManager.java
index c4d14a9..02309fc 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/ServiceLogsManager.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/manager/ServiceLogsManager.java
@@ -43,7 +43,6 @@ import javax.ws.rs.core.Response;
 import org.apache.ambari.logsearch.common.ConfigHelper;
 import org.apache.ambari.logsearch.common.LogSearchConstants;
 import org.apache.ambari.logsearch.common.MessageEnums;
-import org.apache.ambari.logsearch.common.PropertiesHelper;
 import org.apache.ambari.logsearch.conf.SolrServiceLogConfig;
 import org.apache.ambari.logsearch.dao.ServiceLogsSolrDao;
 import org.apache.ambari.logsearch.graph.GraphDataGenerator;
@@ -64,6 +63,13 @@ import org.apache.ambari.logsearch.model.response.NodeListResponse;
 import org.apache.ambari.logsearch.model.response.ServiceLogData;
 import org.apache.ambari.logsearch.model.response.ServiceLogResponse;
 import org.apache.ambari.logsearch.query.QueryGenerationBase;
+import org.apache.ambari.logsearch.query.model.CommonServiceLogSearchCriteria;
+import org.apache.ambari.logsearch.query.model.ServiceAnyGraphSearchCriteria;
+import org.apache.ambari.logsearch.query.model.ServiceGraphSearchCriteria;
+import org.apache.ambari.logsearch.query.model.ServiceLogExportSearchCriteria;
+import org.apache.ambari.logsearch.query.model.ServiceLogFileSearchCriteria;
+import org.apache.ambari.logsearch.query.model.ServiceLogSearchCriteria;
+import org.apache.ambari.logsearch.query.model.ServiceLogTruncatedSearchCriteria;
 import org.apache.ambari.logsearch.solr.model.SolrComponentTypeLogData;
 import org.apache.ambari.logsearch.solr.model.SolrHostLogData;
 import org.apache.ambari.logsearch.solr.model.SolrServiceLogData;
@@ -83,7 +89,6 @@ import org.apache.solr.client.solrj.response.FacetField;
 import org.apache.solr.client.solrj.response.FacetField.Count;
 import org.apache.solr.client.solrj.response.PivotField;
 import org.apache.solr.client.solrj.response.QueryResponse;
-import org.apache.solr.client.solrj.response.RangeFacet;
 import org.apache.solr.common.SolrDocument;
 import org.apache.solr.common.SolrDocumentList;
 import org.apache.solr.common.SolrException;
@@ -114,10 +119,10 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
   @Inject
   private SolrServiceLogConfig solrServiceLogConfig;
 
-  public ServiceLogResponse searchLogs(SearchCriteria searchCriteria) {
-    String keyword = (String) searchCriteria.getParamValue("keyword");
-    String logId = (String) searchCriteria.getParamValue("sourceLogId");
-    Boolean isLastPage = (Boolean) searchCriteria.getParamValue("isLastPage");
+  public ServiceLogResponse searchLogs(ServiceLogSearchCriteria searchCriteria) {
+    String keyword = searchCriteria.getKeyword();
+    String logId = searchCriteria.getSourceLogId();
+    Boolean isLastPage = searchCriteria.isLastPage();
 
     if (!StringUtils.isBlank(keyword)) {
       try {
@@ -203,7 +208,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     return getFields(LogSearchConstants.SOLR_COMPONENT, SolrComponentTypeLogData.class);
   }
 
-  public GraphDataListResponse getAggregatedInfo(SearchCriteria searchCriteria) {
+  public GraphDataListResponse getAggregatedInfo(CommonServiceLogSearchCriteria searchCriteria) {
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
     String hierarchy = "host,type,level";
     GraphDataListResponse graphInfo = new GraphDataListResponse();
@@ -401,7 +406,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     return extensionTree;
   }
 
-  public NodeListResponse getTreeExtension(SearchCriteria searchCriteria) {
+  public NodeListResponse getTreeExtension(ServiceLogFileSearchCriteria searchCriteria) {
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
     solrQuery.setParam("event", "/getTreeExtension");
 
@@ -464,7 +469,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     return list;
   }
 
-  public NodeListResponse getHostListByComponent(SearchCriteria searchCriteria) {
+  public NodeListResponse getHostListByComponent(ServiceLogFileSearchCriteria searchCriteria) {
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
     solrQuery.setParam("event", "/service/hosts/components");
 
@@ -524,7 +529,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     }
   }
 
-  public NameValueDataListResponse getLogsLevelCount(SearchCriteria sc) {
+  public NameValueDataListResponse getLogsLevelCount(ServiceLogFileSearchCriteria sc) {
     NameValueDataListResponse nameValueList = new NameValueDataListResponse();
     SolrQuery query = queryGenerator.commonServiceFilterQuery(sc);
     query.setParam("event", "/service/logs/levels/counts/namevalues");
@@ -584,11 +589,11 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     return list;
   }
 
-  public LogListResponse getPageByKeyword(SearchCriteria searchCriteria)
+  public LogListResponse getPageByKeyword(ServiceLogSearchCriteria searchCriteria)
     throws SolrServerException {
     String defaultChoice = "0";
 
-    String key = (String) searchCriteria.getParamValue("keyword");
+    String key = (String) searchCriteria.getKeyword();
     if(StringUtils.isBlank(key)){
       throw RESTErrorUtil.createRESTException("Keyword was not given",
           MessageEnums.DATA_NOT_FOUND);
@@ -603,7 +608,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     keyword = "*" + keyword + "*";
 
 
-    String keyType = (String) searchCriteria.getParamValue("keywordType");
+    String keyType = (String) searchCriteria.getKeywordType();
     QueryResponse queryResponse = null;
 
     if (!defaultChoice.equals(keyType)) {
@@ -689,9 +694,8 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
         }
 
         // Keyword Sequence Number Calculation
-        String endTime = (String) searchCriteria.getParamValue("to");
-        String startTime = (String) searchCriteria
-          .getParamValue("from");
+        String endTime = searchCriteria.getTo();
+        String startTime = searchCriteria.getFrom();
         SolrQuery logTimeThroughRangeQuery = queryGenerator
           .commonServiceFilterQuery(searchCriteria);
         logTimeThroughRangeQuery.remove("start");
@@ -809,8 +813,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
         rangeLogQuery.remove("rows");
         logIdQuery.setStart(start);
         logIdQuery.setRows(searchCriteria.getMaxRows());
-        LogListResponse logResponse = getLogAsPaginationProvided(logIdQuery, serviceLogsSolrDao);
-        return logResponse;
+        return getLogAsPaginationProvided(logIdQuery, serviceLogsSolrDao);
 
       } catch (Exception e) {
         //do nothing
@@ -899,9 +902,8 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
 
 
         // Keyword LogTime Calculation
-        String endTime = (String) searchCriteria.getParamValue("to");
-        String startTime = (String) searchCriteria
-          .getParamValue("from");
+        String endTime = (String) searchCriteria.getTo();
+        String startTime = searchCriteria.getFrom();
         SolrQuery logTimeThroughRangeQuery = queryGenerator
           .commonServiceFilterQuery(searchCriteria);
         logTimeThroughRangeQuery.remove("start");
@@ -1034,7 +1036,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
         MessageEnums.ERROR_SYSTEM);
   }
 
-  private LogSearchResponse getPageByLogId(SearchCriteria searchCriteria) {
+  private LogSearchResponse getPageByLogId(ServiceLogSearchCriteria searchCriteria) {
     LogSearchResponse logResponse = new ServiceLogResponse();
     String endLogTime = (String) searchCriteria.getParamValue("to");
     if(StringUtils.isBlank(endLogTime)){
@@ -1135,68 +1137,14 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
   }
 
   @SuppressWarnings("unchecked")
-  public List<NameValueData> getHistogramCounts(SolrQuery solrQuery,
-                                             String from, String to, String unit) {
-    List<NameValueData> logsCounts = new ArrayList<>();
-    try {
-
-      SolrUtil.setFacetRange(solrQuery, LogSearchConstants.LOGTIME,
-        from, to, unit);
-
-      List<RangeFacet.Count> logLevelCounts = null;
-
-      QueryResponse response = serviceLogsSolrDao.process(solrQuery);
-      if(response == null){
-        return logsCounts;
-      }
-      @SuppressWarnings("rawtypes")
-      List<RangeFacet> rangeFacetList = response.getFacetRanges();
-      if (rangeFacetList == null) {
-        return logsCounts;
-
-      }
-
-      @SuppressWarnings("rawtypes")
-      RangeFacet rangeFacet=rangeFacetList.get(0);
-      if (rangeFacet == null) {
-        return logsCounts;
-      }
-      logLevelCounts = rangeFacet.getCounts();
-
-      if(logLevelCounts == null){
-        return logsCounts;
-      }
-      for (RangeFacet.Count logCount : logLevelCounts) {
-        NameValueData nameValue = new NameValueData();
-        nameValue.setName(logCount.getValue());
-        nameValue.setValue("" + logCount.getCount());
-        logsCounts.add(nameValue);
-      }
-    } catch (SolrException | SolrServerException | IOException e) {
-      logger.error("Error during solrQuery=" + solrQuery, e);
-    }
-    return logsCounts;
-  }
-
-  public List<Count> getFacetCountsByDate(SolrQuery solrQuery,
-                                          String facetField) throws SolrServerException, IOException,
-    SolrException {
-
-    QueryResponse response = serviceLogsSolrDao.process(solrQuery);
-
-    FacetField field = response.getFacetDate(facetField);
-    return field.getValues();
-  }
-
-  @SuppressWarnings("unchecked")
-  public BarGraphDataListResponse getHistogramData(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse getHistogramData(ServiceGraphSearchCriteria searchCriteria) {
     String deafalutValue = "0";
     BarGraphDataListResponse dataList = new BarGraphDataListResponse();
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
     solrQuery.set("event", "/audit/logs/histogram");
-    String from = getFrom((String) searchCriteria.getParamValue("from"));
-    String to = getTo((String) searchCriteria.getParamValue("to"));
-    String unit = getUnit((String) searchCriteria.getParamValue("unit"));
+    String from = getFrom(searchCriteria.getFrom());
+    String to = getTo(searchCriteria.getTo());
+    String unit = getUnit(searchCriteria.getUnit());
 
     List<BarGraphData> histogramData = new ArrayList<>();
 
@@ -1267,16 +1215,6 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     }
   }
 
-  public void arrangeLevel(String level,
-                           List<BarGraphData> histogramDataLocal,
-                           List<BarGraphData> histogramData) {
-    for (BarGraphData histData : histogramData) {
-      if (histData != null && level.equals(histData.getName())) {
-        histogramDataLocal.add(histData);
-      }
-    }
-  }
-
   public String cancelFindRequestByDate(String uniqueId) {
     if (StringUtils.isEmpty(uniqueId)) {
       logger.error("Unique id is Empty");
@@ -1305,13 +1243,13 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     return true;
   }
 
-  public Response exportToTextFile(SearchCriteria searchCriteria) {
+  public Response exportToTextFile(ServiceLogExportSearchCriteria searchCriteria) {
     String defaultFormat = "text";
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
-    String from = (String) searchCriteria.getParamValue("from");
-    String to = (String) searchCriteria.getParamValue("to");
-    String utcOffset = (String) searchCriteria.getParamValue("utcOffset");
-    String format = (String) searchCriteria.getParamValue("format");
+    String from = searchCriteria.getFrom();
+    String to = searchCriteria.getTo();
+    String utcOffset = searchCriteria.getUtcOffset();
+    String format = searchCriteria.getFormat();
 
     format = defaultFormat.equalsIgnoreCase(format) && format != null ? ".txt"
         : ".json";
@@ -1449,7 +1387,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     }
   }
 
-  public NodeListResponse getComponentListWithLevelCounts(SearchCriteria searchCriteria) {
+  public NodeListResponse getComponentListWithLevelCounts(ServiceLogFileSearchCriteria searchCriteria) {
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
     solrQuery.setParam("event", "/service/logs/components/levels/counts");
 
@@ -1670,7 +1608,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     }
   }
 
-  public BarGraphDataListResponse getAnyGraphData(SearchCriteria searchCriteria) {
+  public BarGraphDataListResponse getAnyGraphData(ServiceAnyGraphSearchCriteria searchCriteria) {
     searchCriteria.addParam("fieldTime", LogSearchConstants.LOGTIME);
     SolrQuery solrQuery = queryGenerator.commonServiceFilterQuery(searchCriteria);
     BarGraphDataListResponse result = graphDataGenerator.getAnyGraphData(searchCriteria, serviceLogsSolrDao, solrQuery);
@@ -1681,7 +1619,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
 
   }
 
-  public ServiceLogResponse getAfterBeforeLogs(SearchCriteria searchCriteria) {
+  public ServiceLogResponse getAfterBeforeLogs(ServiceLogTruncatedSearchCriteria searchCriteria) {
     ServiceLogResponse logResponse = new ServiceLogResponse();
     List<SolrServiceLogData> docList = null;
     String id = (String) searchCriteria
@@ -1692,11 +1630,11 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     }
     String maxRows = "";
 
-    maxRows = (String) searchCriteria.getParamValue("numberRows");
+    maxRows = searchCriteria.getNumberRows();
     if (StringUtils.isBlank(maxRows)){
       maxRows = ""+maxRows;
     }
-    String scrollType = (String) searchCriteria.getParamValue("scrollType");
+    String scrollType = searchCriteria.getScrollType();
     if(StringUtils.isBlank(scrollType)){
       scrollType = "";
     }
@@ -1803,7 +1741,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     searchCriteria.addParam(LogSearchConstants.SORT, sortOrder);
     queryGenerator.setMultipleSortOrder(solrQuery, searchCriteria);
 
-    return (ServiceLogResponse) getLogAsPaginationProvided(solrQuery, serviceLogsSolrDao);
+    return getLogAsPaginationProvided(solrQuery, serviceLogsSolrDao);
   }
 
   private ServiceLogResponse whenScrollDown(SearchCriteria searchCriteria,
@@ -1835,7 +1773,7 @@ public class ServiceLogsManager extends ManagerBase<SolrServiceLogData, ServiceL
     searchCriteria.addParam(LogSearchConstants.SORT, sortOrder);
     queryGenerator.setMultipleSortOrder(solrQuery, searchCriteria);
 
-    return (ServiceLogResponse) getLogAsPaginationProvided(solrQuery, serviceLogsSolrDao);
+    return getLogAsPaginationProvided(solrQuery, serviceLogsSolrDao);
   }
 
   @Scheduled(cron = "${logsearch.solr.warming.cron}")

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
index 6df56a1..41eca1e 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/model/response/AuditLogData.java
@@ -98,9 +98,9 @@ public interface AuditLogData extends CommonLogData {
   void setRepo(String repo);
 
   @JsonProperty("repoType")
-  String getRepoType();
+  Integer getRepoType();
 
-  void setRepoType(String repoType);
+  void setRepoType(Integer repoType);
 
   @JsonProperty("reqData")
   String getRequestData();

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/QueryGeneration.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/QueryGeneration.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/QueryGeneration.java
index 10224bc..9ea29c2 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/QueryGeneration.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/QueryGeneration.java
@@ -30,6 +30,9 @@ import org.apache.ambari.logsearch.common.LogSearchConstants;
 import org.apache.ambari.logsearch.common.PropertiesHelper;
 import org.apache.ambari.logsearch.conf.SolrAuditLogConfig;
 import org.apache.ambari.logsearch.conf.SolrServiceLogConfig;
+import org.apache.ambari.logsearch.query.model.AuditLogSearchCriteria;
+import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
+import org.apache.ambari.logsearch.query.model.CommonServiceLogSearchCriteria;
 import org.apache.ambari.logsearch.query.model.SearchCriteria;
 import org.apache.ambari.logsearch.dao.SolrDaoBase;
 import org.apache.ambari.logsearch.manager.ManagerBase.LogType;
@@ -59,32 +62,33 @@ public class QueryGeneration extends QueryGenerationBase {
   @Inject
   private SolrAuditLogConfig solrAuditLogConfig;
 
-  public SolrQuery commonServiceFilterQuery(SearchCriteria searchCriteria) {
+  public SolrQuery commonServiceFilterQuery(CommonServiceLogSearchCriteria searchCriteria) {
     LogType logType = LogType.SERVICE;
     SolrQuery solrQuery = new SolrQuery();
-    String treeParams = (String) searchCriteria.getParamValue("treeParams");
-    String givenQuery = (String) searchCriteria.getParamValue("q");
-    String level = (String) searchCriteria.getParamValue("level");
-    String startTime = (String) searchCriteria.getParamValue("from");
-    String endTime = (String) searchCriteria.getParamValue("to");
-    String iMessage = (String) searchCriteria.getParamValue("iMessage");
-    String eMessage = (String) searchCriteria.getParamValue("eMessage");
+    String advQuery = (String) searchCriteria.getParamValue("advanceSearch"); // TODO: check these are used from the UI or not
     String gEmessage = (String) searchCriteria.getParamValue("gEMessage");
-    String selectedComp = (String) searchCriteria.getParamValue("selectComp");
-    String bundleId = (String) searchCriteria.getParamValue(LogSearchConstants.BUNDLE_ID);
     String globalExcludeComp = (String) searchCriteria.getParamValue("gMustNot");
     String unselectedComp = (String) searchCriteria.getParamValue("unselectComp");
-    String urlHostName = (String) searchCriteria.getParamValue("host_name");
-    String urlComponentName = (String) searchCriteria.getParamValue("component_name");
-    String file_name = (String) searchCriteria.getParamValue("file_name");
-    String advQuery = (String) searchCriteria.getParamValue("advanceSearch");
+
+    String treeParams = searchCriteria.getTreeParams();
+    String givenQuery = (String) searchCriteria.getParamValue("q");
+    String level = searchCriteria.getLevel();
+    String startTime = searchCriteria.getFrom();
+    String endTime = searchCriteria.getTo();
+    String iMessage = searchCriteria.getIncludeMessage();
+    String eMessage = searchCriteria.getExcludeMessage();
+    String selectedComp = searchCriteria.getSelectComp();
+    String bundleId = searchCriteria.getBundleId();
+    String urlHostName = searchCriteria.getHostName();
+    String urlComponentName = searchCriteria.getComponentName();
+    String file_name = searchCriteria.getFileName();
     // build advance query
     if (!StringUtils.isBlank(advQuery)) {
       String advQueryParameters[] = advQuery.split(Pattern.quote("}{"));
       SolrQuery advSolrQuery = new SolrQuery();
       for (String queryParam : advQueryParameters) {
         String params[] = queryParam.split(Pattern.quote("="));
-        if (params != null && params.length > 1)
+        if (params.length > 1)
           advSolrQuery.setParam(params[0], params[1]);
       }
       setFilterClauseWithFieldName(advSolrQuery, level, LogSearchConstants.SOLR_LEVEL, "", Condition.OR);
@@ -226,18 +230,20 @@ public class QueryGeneration extends QueryGenerationBase {
     }
   }
 
-  public SolrQuery commonAuditFilterQuery(SearchCriteria searchCriteria) {
+  public SolrQuery commonAuditFilterQuery(CommonSearchCriteria searchCriteria) {
     LogType logType = LogType.AUDIT;
     SolrQuery solrQuery = new SolrQuery();
     solrQuery.setQuery("*:*");
-    String startTime = (String) searchCriteria.getParamValue("startTime");
-    String endTime = (String) searchCriteria.getParamValue("endTime");
-    String selectedComp = (String) searchCriteria.getParamValue("includeString");
+
+    String globalExcludeComp = (String) searchCriteria.getParamValue("gMustNot"); // TODO: check this are used from UI or not
+    String unselectedComp = (String) searchCriteria.getParamValue("unselectComp");
+
+    String startTime = searchCriteria.getStartTime();
+    String endTime = searchCriteria.getEndTime();
+    String selectedComp = searchCriteria.getMustBe();
     setFilterClauseWithFieldName(solrQuery, selectedComp, LogSearchConstants.AUDIT_COMPONENT, LogSearchConstants.NO_OPERATOR, Condition.OR);
-    String globalExcludeComp = (String) searchCriteria.getParamValue("gMustNot");
     setUserSpecificFilter(searchCriteria, solrQuery, LogSearchConstants.INCLUDE_QUERY, LogSearchConstants.INCLUDE_QUERY, logType);
     setUserSpecificFilter(searchCriteria, solrQuery, LogSearchConstants.EXCLUDE_QUERY, LogSearchConstants.EXCLUDE_QUERY, logType);
-    String unselectedComp = (String) searchCriteria.getParamValue("unselectComp");
     setFilterClauseWithFieldName(solrQuery, globalExcludeComp, LogSearchConstants.AUDIT_COMPONENT, LogSearchConstants.MINUS_OPERATOR, Condition.AND);
     setFilterClauseWithFieldName(solrQuery, unselectedComp, LogSearchConstants.AUDIT_COMPONENT, LogSearchConstants.MINUS_OPERATOR, Condition.AND);
     setSingleRangeFilter(solrQuery, LogSearchConstants.AUDIT_EVTTIME, startTime, endTime);

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/SearchCriteriaConstants.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/SearchCriteriaConstants.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/SearchCriteriaConstants.java
new file mode 100644
index 0000000..c67d3cd
--- /dev/null
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/SearchCriteriaConstants.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.ambari.logsearch.query;
+
+public class SearchCriteriaConstants {
+
+  private SearchCriteriaConstants() {
+  }
+
+  public static final String PARAM_FIELD = "field";
+  public static final String PARAM_UNIT = "unit";
+  public static final String PARAM_INCLUDE_MESSAGE = "iMessage";
+  public static final String PARAM_EXCLUDE_MESSAGE = "eMessage";
+  public static final String PARAM_MUST_BE_STRING = "includeString";
+  public static final String PARAM_MUST_NOT_STRING = "unselectComp";
+  public static final String PARAM_EXCLUDE_QUERY = "excludeQuery";
+  public static final String PARAM_INCLUDE_QUERY = "includeQuery";
+  public static final String PARAM_START_TIME = "startTime";
+  public static final String PARAM_END_TIME = "endTime";
+
+  public static final String PARAM_IS_LAST_PAGE = "isLastPage";
+
+  public static final String PARAM_GLOBAL_START_TIME = "globalStartTime";
+  public static final String PARAM_GLOBAL_END_TIME = "globalEndTime";
+
+  public static final String PARAM_X_AXIS = "xAxis";
+  public static final String PARAM_Y_AXIS = "yAxis";
+  public static final String PARAM_STACK_BY = "stackBy";
+  public static final String PARAM_FROM = "from";
+  public static final String PARAM_TO = "to";
+
+  public static final String PARAM_LOG_FILE_COMPONENT = "component";
+  public static final String PARAM_LOG_FILE_HOST = "host";
+  public static final String PARAM_LOG_FILE_TYPE = "logType";
+  public static final String PARAM_LOG_TAIL_SIZE = "tailSize";
+
+  public static final String PARAM_COMPONENT_NAME = "component_name";
+  public static final String PARAM_HOST_NAME = "host_name";
+  public static final String PARAM_FILE_NAME = "file_name";
+  public static final String PARAM_BUNDLE_ID = "bundle_id";
+  public static final String PARAM_SELECT_COMP = "selectComp";
+  public static final String PARAM_LEVEL = "level";
+  public static final String PARAM_TREE_PARAMS = "treeParams";
+
+  public static final String PARAM_HOST_LOG_FILE = "hostLogFile";
+  public static final String PARAM_COMPONENT_LOG_FILE = "compLogFile";
+  public static final String PARAM_ID = "id";
+  public static final String PARAM_SCROLL_TYPE = "scrollType";
+  public static final String PARAM_NUMBER_ROWS = "numberRows";
+
+  public static final String PARAM_FORMAT = "format";
+  public static final String PARAM_UTC_OFFSET = "utcOffset";
+  public static final String PARAM_KEYWORD = "keyword";
+  public static final String PARAM_SOURCE_LOG_ID = "sourceLogId";
+  public static final String PARAM_KEYWORD_TYPE = "keywordType";
+  public static final String PARAM_TOKEN = "token";
+
+  public static final String PARAM_USER_NAME = "username";
+  public static final String PARAM_FILTER_NAME = "filtername";
+  public static final String PARAM_ROW_TYPE = "rowtype";
+
+}

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonAuditLogRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonAuditLogRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonAuditLogRequestConverter.java
index 798bd47..e25eb51 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonAuditLogRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonAuditLogRequestConverter.java
@@ -32,15 +32,15 @@ public abstract class AbstractCommonAuditLogRequestConverter<SOURCE extends Base
     RESULT criteria = createCriteria(request);
     criteria.addParam("q", request.getQuery());
     criteria.addParam("columnQuery", StringEscapeUtils.unescapeXml(request.getColumnQuery()));
-    criteria.addParam("iMessage", StringEscapeUtils.unescapeXml(request.getiMessage()));
     criteria.addParam("gEMessage", StringEscapeUtils.unescapeXml(request.getgEMessage()));
-    criteria.addParam("eMessage", StringEscapeUtils.unescapeXml(request.getgEMessage()));
-    criteria.addParam("includeString", request.getMustBe());
-    criteria.addParam("unselectComp", request.getMustNot());
-    criteria.addParam("excludeQuery", StringEscapeUtils.unescapeXml(request.getExcludeQuery()));
-    criteria.addParam("includeQuery", StringEscapeUtils.unescapeXml(request.getIncludeQuery()));
-    criteria.addParam("startTime", request.getFrom());
-    criteria.addParam("endTime", request.getTo());
+    criteria.setIncludeMessage(StringEscapeUtils.unescapeXml(request.getiMessage()));
+    criteria.setExcludeMessage(StringEscapeUtils.unescapeXml(request.getgEMessage()));
+    criteria.setMustBe(request.getMustBe());
+    criteria.setMustNot(request.getMustNot());
+    criteria.setExcludeQuery(StringEscapeUtils.unescapeXml(request.getExcludeQuery()));
+    criteria.setIncludeQuery(StringEscapeUtils.unescapeXml(request.getIncludeQuery()));
+    criteria.setStartTime(request.getFrom());
+    criteria.setEndTime(request.getTo());
     return criteria;
   }
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/3d62b004/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonSearchRequestConverter.java
----------------------------------------------------------------------
diff --git a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonSearchRequestConverter.java b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonSearchRequestConverter.java
index 3fd07e2..ea2c28a 100644
--- a/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonSearchRequestConverter.java
+++ b/ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/query/converter/AbstractCommonSearchRequestConverter.java
@@ -21,10 +21,12 @@ package org.apache.ambari.logsearch.query.converter;
 import org.apache.ambari.logsearch.model.request.impl.CommonSearchRequest;
 import org.apache.ambari.logsearch.query.model.CommonSearchCriteria;
 import org.apache.commons.lang.StringUtils;
-import org.springframework.core.convert.converter.Converter;
+
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_GLOBAL_END_TIME;
+import static org.apache.ambari.logsearch.query.SearchCriteriaConstants.PARAM_GLOBAL_START_TIME;
 
 public abstract class AbstractCommonSearchRequestConverter<SOURCE extends CommonSearchRequest, RESULT extends CommonSearchCriteria>
-  implements Converter<SOURCE, RESULT> {
+  extends AbstractConverterAware<SOURCE, RESULT> {
 
   @Override
   public RESULT convert(SOURCE source) {
@@ -43,11 +45,11 @@ public abstract class AbstractCommonSearchRequestConverter<SOURCE extends Common
     criteria.setSortType(request.getSortType());
     if (StringUtils.isNotEmpty(request.getStartTime())){
       criteria.setGlobalStartTime(request.getStartTime());
-      criteria.getUrlParamMap().put("globalStartTime", request.getStartTime());
+      criteria.getUrlParamMap().put(PARAM_GLOBAL_START_TIME, request.getStartTime());
     }
     if (StringUtils.isNotEmpty(request.getEndTime())){
       criteria.setGlobalEndTime(request.getEndTime());
-      criteria.getUrlParamMap().put("globalEndTime", request.getEndTime());
+      criteria.getUrlParamMap().put(PARAM_GLOBAL_END_TIME, request.getEndTime());
     }
   }
 }


Mime
View raw message