You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ol...@apache.org on 2018/06/18 10:16:07 UTC
[ambari] branch trunk updated: AMBARI-24125. Infra Solr: set hdfs
kerberos principal in infra-solr-env. (#1558)
This is an automated email from the ASF dual-hosted git repository.
oleewere pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new 543dc9f AMBARI-24125. Infra Solr: set hdfs kerberos principal in infra-solr-env. (#1558)
543dc9f is described below
commit 543dc9fea00f3f1dd7196bec6b6c1c458039fa21
Author: Olivér Szabó <ol...@gmail.com>
AuthorDate: Mon Jun 18 12:16:03 2018 +0200
AMBARI-24125. Infra Solr: set hdfs kerberos principal in infra-solr-env. (#1558)
---
.../AMBARI_INFRA_SOLR/0.1.0/configuration/infra-solr-env.xml | 11 +++++++++++
.../AMBARI_INFRA_SOLR/0.1.0/package/scripts/params.py | 1 +
.../AMBARI_INFRA_SOLR/0.1.0/properties/infra-solr-env.sh.j2 | 4 ++++
3 files changed, 16 insertions(+)
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/configuration/infra-solr-env.xml b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/configuration/infra-solr-env.xml
index 5852a4a..e9b6f4d 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/configuration/infra-solr-env.xml
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/configuration/infra-solr-env.xml
@@ -293,6 +293,17 @@
</property>
<property>
+ <name>infra_solr_extra_java_opts</name>
+ <value></value>
+ <display-name>Infra Solr extra java options</display-name>
+ <description>Extra Solr java options (e.g.: -Dproperty=value), that will be added to SOLR_OPTS environment variable</description>
+ <value-attributes>
+ <empty-value-valid>true</empty-value-valid>
+ </value-attributes>
+ <on-ambari-upgrade add="true"/>
+ </property>
+
+ <property>
<name>infra_solr_gc_log_opts</name>
<value>-verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime</value>
<display-name>Infra Solr GC log options</display-name>
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/params.py
index 2098d32..6bb6c1c 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/params.py
@@ -124,6 +124,7 @@ if "infra-solr-env" in config['configurations']:
solr_env_content = config['configurations']['infra-solr-env']['content']
infra_solr_gc_log_opts = format(config['configurations']['infra-solr-env']['infra_solr_gc_log_opts'])
infra_solr_gc_tune = format(config['configurations']['infra-solr-env']['infra_solr_gc_tune'])
+ infra_solr_extra_java_opts = format(default('configurations/infra-solr-env/infra_solr_extra_java_opts', ""))
zk_quorum = format(default('configurations/infra-solr-env/infra_solr_zookeeper_quorum', zookeeper_quorum))
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/properties/infra-solr-env.sh.j2 b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/properties/infra-solr-env.sh.j2
index 9c183a2..44a1aa2 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/properties/infra-solr-env.sh.j2
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/properties/infra-solr-env.sh.j2
@@ -58,6 +58,9 @@ RMI_PORT={{infra_solr_jmx_port}}
#SOLR_OPTS="$SOLR_OPTS -Dsolr.autoCommit.maxTime=60000"
#SOLR_OPTS="$SOLR_OPTS -Dsolr.clustering.enabled=true"
SOLR_OPTS="$SOLR_OPTS -Djava.rmi.server.hostname={{hostname}}"
+{% if infra_solr_extra_java_opts -%}
+SOLR_OPTS="$SOLR_OPTS {{infra_solr_extra_java_opts}}"
+{% endif %}
# Location where the bin/solr script will save PID files for running instances
# If not set, the script will create PID files in $SOLR_TIP/bin
@@ -97,6 +100,7 @@ SOLR_SSL_WANT_CLIENT_AUTH=false
SOLR_JAAS_FILE={{infra_solr_jaas_file}}
SOLR_KERB_KEYTAB={{infra_solr_web_kerberos_keytab}}
SOLR_KERB_PRINCIPAL={{infra_solr_web_kerberos_principal}}
+SOLR_OPTS="$SOLR_OPTS -Dsolr.hdfs.security.kerberos.principal={{infra_solr_kerberos_principal}}"
SOLR_OPTS="$SOLR_OPTS {{zk_security_opts}}"
SOLR_AUTH_TYPE="kerberos"
--
To stop receiving notification emails like this one, please contact
oleewere@apache.org.