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/05/14 14:38:58 UTC
[ambari] 01/02: AMBARI-23822. Solr shards parameter should only be
required for restore command.
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
commit f4721990ab03f6ccb282576bed188836d7d36951
Author: Oliver Szabo <ol...@gmail.com>
AuthorDate: Mon May 14 14:11:21 2018 +0200
AMBARI-23822. Solr shards parameter should only be required for restore command.
---
.../AMBARI_INFRA_SOLR/0.1.0/package/scripts/collection.py | 3 +++
.../AMBARI_INFRA_SOLR/0.1.0/package/scripts/command_commons.py | 3 ---
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/collection.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/collection.py
index 4f51071..e22db93 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/collection.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/collection.py
@@ -87,6 +87,9 @@ def restore_collection(env):
import params, command_commons
env.set_params(command_commons)
+ if command_commons.solr_num_shards == 0:
+ raise Exception(format("The 'solr_shards' command parameter is required to set."))
+
host_cores_backup_map = command_commons.read_backup_json()
host_cores_map = command_commons.get_host_cores_for_collection(backup=False)
diff --git a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/command_commons.py b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/command_commons.py
index a8a17e7..9eaeea5 100644
--- a/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/command_commons.py
+++ b/ambari-server/src/main/resources/common-services/AMBARI_INFRA_SOLR/0.1.0/package/scripts/command_commons.py
@@ -85,9 +85,6 @@ solr_num_shards = int(default("/commandParams/solr_shards", "0"))
solr_hdfs_path=default("/commandParams/solr_hdfs_path", None)
-if solr_num_shards == 0:
- raise Exception(format("The 'solr_shards' command parameter is required to set."))
-
if solr_hdfs_path:
import functools
--
To stop receiving notification emails like this one, please contact
oleewere@apache.org.