Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 cba018eb6 -> 395cdcf33


AMBARI-21374 : Replication factor should be configurable in Atlas to create 
solr collections (Vishal Suvagia via mugdha)


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

Branch: refs/heads/branch-2.5
Commit: 395cdcf33ce25ead47bcf7c2463cbad1a9fb3d86
Parents: cba018e
Author: Vishal Suvagia <vishalsuva...@yahoo.com>
Authored: Mon Jul 3 10:47:20 2017 +0530
Committer: Mugdha Varadkar <mug...@apache.org>
Committed: Thu Jul 6 10:53:51 2017 +0530

----------------------------------------------------------------------
 .../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py  | 4 +++-
 .../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml  | 6 ++++++
 2 files changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/395cdcf3/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
index a8bfeb7..bdc9ec4 100644
--- 
a/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
+++ 
b/ambari-server/src/main/resources/common-services/ATLAS/0.1.0.2.3/package/scripts/params.py
@@ -209,7 +209,9 @@ search_backend_solr = 
atlas_search_backend.startswith('solr')
 infra_solr_znode = default("/configurations/infra-solr-env/infra_solr_znode", 
None)
 infra_solr_hosts = default("/clusterHostInfo/infra_solr_hosts", [])
 infra_solr_replication_factor = 2 if len(infra_solr_hosts) > 1 else 1
-atlas_solr_shards = default("/configurations/atlas-env/atlas_solr-shards", 1)
+if 'atlas_solr_replication_factor' in config['configurations']['atlas-env']:
+  infra_solr_replication_factor = 
int(default("/configurations/atlas-env/atlas_solr_replication_factor", 1))
+atlas_solr_shards = default("/configurations/atlas-env/atlas_solr_shards", 1)
 has_infra_solr = len(infra_solr_hosts) > 0
 infra_solr_role_atlas = 
default('configurations/infra-solr-security-json/infra_solr_role_atlas', 
'atlas_user')
 infra_solr_role_dev = 
default('configurations/infra-solr-security-json/infra_solr_role_dev', 'dev')

http://git-wip-us.apache.org/repos/asf/ambari/blob/395cdcf3/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
index d54cf15..821fafa 100644
--- 
a/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
+++ 
b/ambari-server/src/main/resources/stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml
@@ -38,4 +38,10 @@
     </value-attributes>
     <on-ambari-upgrade add="false"/>
   </property>
+   <property>
+    <name>atlas_solr_replication_factor</name>
+    <value>1</value>
+    <description>Replication factor for the atlas solr 
collections.</description>
+    <on-ambari-upgrade add="false" />
+  </property>
 </configuration>

Reply via email to