You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ab...@apache.org on 2017/07/07 14:58:07 UTC
[20/36] ambari git commit: AMBARI-21374 : Replication factor should
be configurable in Atlas to create solr collections (Vishal Suvagia via
mugdha)
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/78ebbef3
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/78ebbef3
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/78ebbef3
Branch: refs/heads/branch-feature-logsearch-ui
Commit: 78ebbef3db12b1261d71db361bc480a374f62e92
Parents: 3dc51b0
Author: Vishal Suvagia <vi...@yahoo.com>
Authored: Mon Jul 3 10:44:43 2017 +0530
Committer: Mugdha Varadkar <mu...@apache.org>
Committed: Thu Jul 6 10:44:50 2017 +0530
----------------------------------------------------------------------
.../common-services/ATLAS/0.1.0.2.3/package/scripts/params.py | 4 +++-
.../ATLAS/0.7.0.3.0/configuration/atlas-env.xml | 6 ++++++
.../common-services/ATLAS/0.7.0.3.0/package/scripts/params.py | 4 +++-
.../stacks/HDP/2.6/services/ATLAS/configuration/atlas-env.xml | 6 ++++++
4 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/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 111a248..0c84b5c 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
@@ -212,7 +212,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/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
index c5a4fd6..f97ca98 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/configuration/atlas-env.xml
@@ -179,4 +179,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>
http://git-wip-us.apache.org/repos/asf/ambari/blob/78ebbef3/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
index d26df33..61b41d6 100644
--- a/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
+++ b/ambari-server/src/main/resources/common-services/ATLAS/0.7.0.3.0/package/scripts/params.py
@@ -211,7 +211,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/78ebbef3/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>