Repository: ambari Updated Branches: refs/heads/trunk b91322036 -> f44b99e93
AMBARI-16200. Add smartconfig for Logsearch (oleewere) Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/f44b99e9 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/f44b99e9 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/f44b99e9 Branch: refs/heads/trunk Commit: f44b99e93ccf3465c2995e46d32d79d5a4ba160c Parents: b913220 Author: oleewere <[email protected]> Authored: Mon May 2 16:18:26 2016 +0200 Committer: oleewere <[email protected]> Committed: Mon May 2 19:18:24 2016 +0200 ---------------------------------------------------------------------- .../0.5.0/configuration/logfeeder-env.xml | 6 + .../logsearch-audit_logs-solrconfig.xml | 18 ++ .../0.5.0/configuration/logsearch-env.xml | 19 ++- .../configuration/logsearch-properties.xml | 18 +- .../logsearch-service_logs-solrconfig.xml | 18 ++ .../logsearch-solr-client-log4j.xml | 38 +++++ .../0.5.0/configuration/logsearch-solr-env.xml | 22 ++- .../LOGSEARCH/0.5.0/metainfo.xml | 14 ++ .../LOGSEARCH/0.5.0/package/scripts/params.py | 4 + .../package/scripts/setup_logsearch_solr.py | 2 +- .../templates/solr-client-log4j.properties.j2 | 38 ----- .../properties/audit_logs-solrconfig.xml.j2 | 2 +- .../0.5.0/properties/logsearch-env.sh.j2 | 2 +- .../0.5.0/properties/logsearch-solr-env.sh.j2 | 2 +- .../properties/service_logs-solrconfig.xml.j2 | 2 +- .../properties/solr-client-log4j.properties.j2 | 38 +++++ .../LOGSEARCH/0.5.0/themes/theme.json | 164 +++++++++++++++++++ .../test/python/stacks/2.4/configs/default.json | 4 +- ambari-web/app/data/HDP2/site_properties.js | 18 +- 19 files changed, 375 insertions(+), 54 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml index 8ac7c1f..55e5efe 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logfeeder-env.xml @@ -76,6 +76,9 @@ <value>true</value> <display-name>Service Logs enabled</display-name> <description>Enable service logs to Solr</description> + <value-attributes> + <type>boolean</type> + </value-attributes> </property> <property> @@ -83,6 +86,9 @@ <value>true</value> <display-name>Audit Logs enabled</display-name> <description>Enable audit logs to Solr</description> + <value-attributes> + <type>boolean</type> + </value-attributes> </property> <property> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-audit_logs-solrconfig.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-audit_logs-solrconfig.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-audit_logs-solrconfig.xml index 694f2db..828738e 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-audit_logs-solrconfig.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-audit_logs-solrconfig.xml @@ -28,6 +28,24 @@ <value>7</value> <display-name>Max retention</display-name> <description>Days to retain the audit logs in Solr</description> + <value-attributes> + <type>int</type> + <overridable>false</overridable> + </value-attributes> + </property> + + <property> + <name>logsearch_audit_logs_merge_factor</name> + <value>5</value> + <display-name>Merge factor</display-name> + <description>The mergeFactor value tells Lucene how many segments of equal size to build before merging them into a + single segment. High value merge factor (e.g. 25) improves indexing speed, but slows down searching. Low value + (e.g. 5) improves searching, but slows down indexing. + </description> + <value-attributes> + <type>int</type> + <overridable>false</overridable> + </value-attributes> </property> <!-- solrconfig.xml --> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml index 018cffd..c0aa8f4 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-env.xml @@ -71,9 +71,16 @@ <property> <name>logsearch_app_max_memory</name> - <value>1g</value> - <description>Max memory for LogSearch</description> - <display-name>Logearch Max Memory</display-name> + <value>1024</value> + <description>Max memory for LogSearch Portal</description> + <display-name>Logsearch Max Memory</display-name> + <value-attributes> + <type>int</type> + <minimum>512</minimum> + <maximum>2048</maximum> + <unit>MB</unit> + <increment-step>256</increment-step> + </value-attributes> </property> <property> @@ -82,6 +89,9 @@ <display-name>Ranger Audit Enabled</display-name> <description>Use Ranger Audit collection. This is supported only if Ranger Solr is installed in SolrCloud mode </description> + <value-attributes> + <type>boolean</type> + </value-attributes> </property> <property> @@ -89,6 +99,9 @@ <value>false</value> <display-name>Logsearch Debug Enabled</display-name> <description>Enable debug mode for Logsearch Server</description> + <value-attributes> + <type>boolean</type> + </value-attributes> </property> <property> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml index 9dfbaf7..dc5ebb6 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-properties.xml @@ -24,15 +24,29 @@ <property> <name>logsearch.collection.numshards</name> <value>5</value> - <display-name>Logsearch Solr Shards</display-name> + <display-name>Logsearch Solr Collection Shards</display-name> <description>Number of shards for Solr collections</description> + <value-attributes> + <type>int</type> + <minimum>1</minimum> + <maximum>20</maximum> + <unit>int</unit> + <increment-step>1</increment-step> + </value-attributes> </property> <property> <name>logsearch.collection.replication.factor</name> <value>1</value> - <display-name>Logsearch Solr Replication Factor</display-name> + <display-name>Logsearch Solr Collection Replication Factor</display-name> <description>Replication factor for Solr collections</description> + <value-attributes> + <type>int</type> + <minimum>1</minimum> + <maximum>20</maximum> + <unit>int</unit> + <increment-step>1</increment-step> + </value-attributes> </property> <property> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-service_logs-solrconfig.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-service_logs-solrconfig.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-service_logs-solrconfig.xml index 01dff67..a5a1114 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-service_logs-solrconfig.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-service_logs-solrconfig.xml @@ -27,6 +27,24 @@ <value>7</value> <display-name>Max retention</display-name> <description>Days to retain the service logs in Solr</description> + <value-attributes> + <type>int</type> + <overridable>false</overridable> + </value-attributes> + </property> + + <property> + <name>logsearch_service_logs_merge_factor</name> + <value>5</value> + <display-name>Merge factor</display-name> + <description>The mergeFactor value tells Lucene how many segments of equal size to build before merging them into a + single segment. High value merge factor (e.g. 25) improves indexing speed, but slows down searching. Low value + (e.g. 5) improves searching, but slows down indexing. + </description> + <value-attributes> + <type>int</type> + <overridable>false</overridable> + </value-attributes> </property> <!-- solrconfig.xml --> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-client-log4j.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-client-log4j.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-client-log4j.xml new file mode 100644 index 0000000..089976d --- /dev/null +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-client-log4j.xml @@ -0,0 +1,38 @@ +<?xml version="1.0"?> +<?xml-stylesheet type="text/xsl" href="configuration.xsl"?> +<!-- +/** + * 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. + */ +--> + +<!-- This is a special config file for properties used to monitor status of the service --> +<configuration supports_adding_forbidden="true"> + + <!-- log4j.xml --> + <property> + <name>content</name> + <description>This is the jinja template for log4j.properties file for logsearch solr client</description> + <value></value> + <property-type>VALUE_FROM_PROPERTY_FILE</property-type> + <value-attributes> + <property-file-name>solr-client-log4j.properties.j2</property-file-name> + <property-file-type>text</property-file-type> + </value-attributes> + </property> + +</configuration> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-env.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-env.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-env.xml index 69aead7..f08e57d 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-env.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/configuration/logsearch-solr-env.xml @@ -86,6 +86,7 @@ <description>Directory for storting Solr index. Make sure you have enough disk space</description> <value-attributes> <type>directory</type> + <overridable>false</overridable> </value-attributes> </property> @@ -94,20 +95,37 @@ <value>/logsearch</value> <description>Zookeeper znode, e.g: /logsearch</description> <display-name>Logsearch Solr ZNode</display-name> + <value-attributes> + <overridable>false</overridable> + </value-attributes> </property> <property> <name>logsearch_solr_minmem</name> - <value>512m</value> + <value>512</value> <display-name>Logsearch Solr minimum heap size</display-name> <description>Solr minimum heap size e.g.512m</description> + <value-attributes> + <type>int</type> + <minimum>512</minimum> + <maximum>5120</maximum> + <unit>MB</unit> + <increment-step>256</increment-step> + </value-attributes> </property> <property> <name>logsearch_solr_maxmem</name> - <value>512m</value> + <value>1024</value> <display-name>Logsearch Solr maximum heap size</display-name> <description>Solr maximum heap size e.g. 512m</description> + <value-attributes> + <type>int</type> + <minimum>512</minimum> + <maximum>5120</maximum> + <unit>MB</unit> + <increment-step>256</increment-step> + </value-attributes> </property> <!-- logsearch-solr-env.sh --> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml index 56a5cf9..3f96571 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/metainfo.xml @@ -123,6 +123,13 @@ <script>scripts/logsearch_solr_client.py</script> <scriptType>PYTHON</scriptType> </commandScript> + <configFiles> + <configFile> + <type>env</type> + <fileName>log4j.properties</fileName> + <dictionaryName>logsearch-solr-client-log4j</dictionaryName> + </configFile> + </configFiles> </component> </components> @@ -188,6 +195,13 @@ <default>true</default> </quickLinksConfiguration> </quickLinksConfigurations> + + <themes> + <theme> + <fileName>theme.json</fileName> + <default>true</default> + </theme> + </themes> </service> </services> </metainfo> http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py index 6d9d305..97ad191 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/params.py @@ -94,7 +94,9 @@ logsearch_solr_instance_count = len(config['clusterHostInfo']['logsearch_solr_ho logsearch_solr_datadir = format(config['configurations']['logsearch-solr-env']['logsearch_solr_datadir']) logsearch_solr_data_resources_dir = os.path.join(logsearch_solr_datadir, 'resources') logsearch_service_logs_max_retention = config['configurations']['logsearch-service_logs-solrconfig']['logsearch_service_logs_max_retention'] +logsearch_service_logs_merge_factor = config['configurations']['logsearch-service_logs-solrconfig']['logsearch_service_logs_merge_factor'] logsearch_audit_logs_max_retention = config['configurations']['logsearch-audit_logs-solrconfig']['logsearch_audit_logs_max_retention'] +logsearch_audit_logs_merge_factor = config['configurations']['logsearch-audit_logs-solrconfig']['logsearch_audit_logs_merge_factor'] logsearch_service_logs_fields = config['configurations']['logsearch-properties']['logsearch.service.logs.fields'] @@ -129,6 +131,8 @@ solr_xml_content = config['configurations']['logsearch-solr-xml']['content'] solr_log4j_content = config['configurations']['logsearch-solr-log4j']['content'] +solr_client_log4j_content = config['configurations']['logsearch-solr-client-log4j']['content'] + ##################################### # Logsearch configs ##################################### http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch_solr.py ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch_solr.py b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch_solr.py index 80c5cca..e1e26cf 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch_solr.py +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/scripts/setup_logsearch_solr.py @@ -88,7 +88,7 @@ def setup_logsearch_solr(name = None): ) File(format("{solr_client_dir}/log4j.properties"), - content=Template("solr-client-log4j.properties.j2"), + content=InlineTemplate(params.solr_client_log4j_content), owner=params.logsearch_solr_user ) http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/solr-client-log4j.properties.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/solr-client-log4j.properties.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/solr-client-log4j.properties.j2 deleted file mode 100644 index 67806d7..0000000 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/package/templates/solr-client-log4j.properties.j2 +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2011 The Apache Software Foundation -# -# 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. - -log4j.rootLogger=INFO,file,stdout,stderr - -log4j.appender.file=org.apache.log4j.RollingFileAppender -log4j.appender.file.File={{logsearch_solr_client_log}} -log4j.appender.file.MaxFileSize=80MB -log4j.appender.file.MaxBackupIndex=60 -log4j.appender.file.layout=org.apache.log4j.PatternLayout -log4j.appender.file.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.Threshold=INFO -log4j.appender.stdout.Target=System.out -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%m%n - -log4j.appender.stderr=org.apache.log4j.ConsoleAppender -log4j.appender.stderr.Threshold=ERROR -log4j.appender.stderr.Target=System.err -log4j.appender.stderr.layout=org.apache.log4j.PatternLayout -log4j.appender.stderr.layout.ConversionPattern=%m%n \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2 index eb71d6f..c870edc 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2 +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/audit_logs-solrconfig.xml.j2 @@ -237,7 +237,7 @@ this file, see http://wiki.apache.org/solr/SolrConfigXml. <mergeFactor>10</mergeFactor> --> <!-- LogSearch customization. Set to 5 to trigger purging of deleted documents more often --> - <mergeFactor>5</mergeFactor> + <mergeFactor>{{logsearch_audit_logs_merge_factor}}</mergeFactor> <!-- Expert: Merge Scheduler The Merge Scheduler in Lucene controls how merges are http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-env.sh.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-env.sh.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-env.sh.j2 index 890a990..c2a4172 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-env.sh.j2 +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-env.sh.j2 @@ -29,7 +29,7 @@ export PID_FILE={{logsearch_pid_file}} export JAVA_HOME={{java64_home}} -export LOGSEARCH_JAVA_MEM=-Xmx{{logsearch_app_max_memory}} +export LOGSEARCH_JAVA_MEM=-Xmx{{logsearch_app_max_memory}}m if [ "$LOGSEARCH_JAVA_MEM" = "" ]; then export LOGSEARCH_JAVA_MEM="-Xmx1g" fi http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-solr-env.sh.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-solr-env.sh.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-solr-env.sh.j2 index 703792b..357a429 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-solr-env.sh.j2 +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/logsearch-solr-env.sh.j2 @@ -20,7 +20,7 @@ SOLR_JAVA_HOME={{java64_home}} # Increase Java Min/Max Heap as needed to support your indexing / query needs -SOLR_JAVA_MEM="-Xms{{logsearch_solr_min_mem}} -Xmx{{logsearch_solr_max_mem}}" +SOLR_JAVA_MEM="-Xms{{logsearch_solr_min_mem}}m -Xmx{{logsearch_solr_max_mem}}m" # Enable verbose GC logging GC_LOG_OPTS="-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails \ http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 index b3e4dbf..a06a900 100644 --- a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/service_logs-solrconfig.xml.j2 @@ -237,7 +237,7 @@ this file, see http://wiki.apache.org/solr/SolrConfigXml. <mergeFactor>10</mergeFactor> --> <!-- LogSearch customization. Set to 5 to trigger purging of deleted documents more often --> - <mergeFactor>5</mergeFactor> + <mergeFactor>{{logsearch_service_logs_merge_factor}}</mergeFactor> <!-- Expert: Merge Scheduler The Merge Scheduler in Lucene controls how merges are http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/solr-client-log4j.properties.j2 ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/solr-client-log4j.properties.j2 b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/solr-client-log4j.properties.j2 new file mode 100644 index 0000000..67806d7 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/properties/solr-client-log4j.properties.j2 @@ -0,0 +1,38 @@ +# Copyright 2011 The Apache Software Foundation +# +# 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. + +log4j.rootLogger=INFO,file,stdout,stderr + +log4j.appender.file=org.apache.log4j.RollingFileAppender +log4j.appender.file.File={{logsearch_solr_client_log}} +log4j.appender.file.MaxFileSize=80MB +log4j.appender.file.MaxBackupIndex=60 +log4j.appender.file.layout=org.apache.log4j.PatternLayout +log4j.appender.file.layout.ConversionPattern=%d{DATE} %5p [%t] %c{1}:%L - %m%n + +log4j.appender.stdout=org.apache.log4j.ConsoleAppender +log4j.appender.stdout.Threshold=INFO +log4j.appender.stdout.Target=System.out +log4j.appender.stdout.layout=org.apache.log4j.PatternLayout +log4j.appender.stdout.layout.ConversionPattern=%m%n + +log4j.appender.stderr=org.apache.log4j.ConsoleAppender +log4j.appender.stderr.Threshold=ERROR +log4j.appender.stderr.Target=System.err +log4j.appender.stderr.layout=org.apache.log4j.PatternLayout +log4j.appender.stderr.layout.ConversionPattern=%m%n \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/themes/theme.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/themes/theme.json b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/themes/theme.json new file mode 100644 index 0000000..248bbd3 --- /dev/null +++ b/ambari-server/src/main/resources/common-services/LOGSEARCH/0.5.0/themes/theme.json @@ -0,0 +1,164 @@ +{ + "name": "default", + "description": "Default theme for LOGSEARCH service", + "configuration": { + "layouts": [ + { + "name": "default", + "tabs": [ + { + "name": "settings", + "display-name": "Settings", + "layout": { + "tab-columns": "2", + "tab-rows": "1", + "sections": [ + { + "name": "section-logsearch-solr", + "display-name": "LogSearch Solr", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1", + "section-columns": "1", + "section-rows": "4", + "subsections": [ + { + "name": "subsection-logsearch-solr-col1", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + } + ] + }, + { + "name": "section-logsearch-server", + "display-name": "LogSearch Server", + "row-index": "0", + "column-index": "1", + "row-span": "1", + "column-span": "1", + "section-columns": "3", + "section-rows": "1", + "subsections": [ + { + "name": "subsection-logsearch-server-col1", + "row-index": "0", + "column-index": "0", + "row-span": "1", + "column-span": "1" + } + ] + } + ] + } + } + ] + } + ], + "placement": { + "configuration-layout": "default", + "configs": [ + { + "config": "logsearch-solr-env/logsearch_solr_minmem", + "subsection-name": "subsection-logsearch-solr-col1" + }, + { + "config": "logsearch-solr-env/logsearch_solr_maxmem", + "subsection-name": "subsection-logsearch-solr-col1" + }, + { + "config": "logsearch-solr-env/logsearch_solr_datadir", + "subsection-name": "subsection-logsearch-solr-col1" + }, + { + "config": "logsearch-solr-env/logsearch_solr_znode", + "subsection-name": "subsection-logsearch-solr-col1" + }, + { + "config": "logsearch-env/logsearch_app_max_memory", + "subsection-name": "subsection-logsearch-server-col1" + }, + { + "config": "logsearch-properties/logsearch.collection.numshards", + "subsection-name": "subsection-logsearch-server-col1" + }, + { + "config": "logsearch-properties/logsearch.collection.replication.factor", + "subsection-name": "subsection-logsearch-server-col1" + } + ] + }, + "widgets": [ + { + "config": "logsearch-solr-env/logsearch_solr_minmem", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "GB" + } + ] + } + }, + { + "config": "logsearch-solr-env/logsearch_solr_maxmem", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "GB" + } + ] + } + }, + { + "config": "logsearch-solr-env/logsearch_solr_datadir", + "widget": { + "type": "directory" + } + }, + { + "config": "logsearch-solr-env/logsearch_solr_znode", + "widget": { + "type": "directory" + } + }, + { + "config": "logsearch-env/logsearch_app_max_memory", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "GB" + } + ] + } + }, + { + "config": "logsearch-properties/logsearch.collection.numshards", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "int" + } + ] + } + }, + { + "config": "logsearch-properties/logsearch.collection.replication.factor", + "widget": { + "type": "slider", + "units": [ + { + "unit-name": "int" + } + ] + } + } + ] + } +} + http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-server/src/test/python/stacks/2.4/configs/default.json ---------------------------------------------------------------------- diff --git a/ambari-server/src/test/python/stacks/2.4/configs/default.json b/ambari-server/src/test/python/stacks/2.4/configs/default.json index cab15a4..8909431 100644 --- a/ambari-server/src/test/python/stacks/2.4/configs/default.json +++ b/ambari-server/src/test/python/stacks/2.4/configs/default.json @@ -230,8 +230,8 @@ "logsearch_solr_user": "solr", "logsearch_solr_group": "solr", "logsearch_solr_port": "8886", - "logsearch_solr_minmem": "512m", - "logsearch_solr_maxmem": "512m", + "logsearch_solr_minmem": "512", + "logsearch_solr_maxmem": "512", "logsearch_solr_znode": "/logsearch", "logsearch_solr_conf": "/etc/ambari-logsearch-solr", "logsearch_solr_pid_dir": "/var/run/ambari-logsearch-solr", http://git-wip-us.apache.org/repos/asf/ambari/blob/f44b99e9/ambari-web/app/data/HDP2/site_properties.js ---------------------------------------------------------------------- diff --git a/ambari-web/app/data/HDP2/site_properties.js b/ambari-web/app/data/HDP2/site_properties.js index 9ca0218..45c54a0 100644 --- a/ambari-web/app/data/HDP2/site_properties.js +++ b/ambari-web/app/data/HDP2/site_properties.js @@ -1993,11 +1993,18 @@ var hdp2properties = [ "index": 1 }, { + "name": "logsearch_audit_logs_merge_factor", + "serviceName": "LOGSEARCH", + "filename": "logsearch-audit_logs-solrconfig.xml", + "category": "Advanced logsearch-audit_logs-solrconfig", + "index": 2 + }, + { "name": "content", "serviceName": "LOGSEARCH", "filename": "logsearch-audit_logs_logs-solrconfig.xml", "category": "Advanced logsearch-audit_logs-solrconfig", - "index": 2 + "index": 3 }, /*logsearch-env*/ { @@ -2087,12 +2094,19 @@ var hdp2properties = [ "index": 1 }, { - "name": "content", + "name": "logsearch_service_logs_merge_factor", "serviceName": "LOGSEARCH", "filename": "logsearch-service_logs-solrconfig.xml", "category": "Advanced logsearch-service_logs-solrconfig", "index": 2 }, + { + "name": "content", + "serviceName": "LOGSEARCH", + "filename": "logsearch-service_logs-solrconfig.xml", + "category": "Advanced logsearch-service_logs-solrconfig", + "index": 3 + }, /*logsearch-properties*/ { "name": "logsearch.collection.numshards",
