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 a0a0947  AMBARI-23499. Infra Solr - ambari commons - max_shard 
calculation can be wrong if shard or replica value is string. (#922)
a0a0947 is described below

commit a0a09471e15ebc4c2ee3ec959fa263499b4afa61
Author: Olivér Szabó <oleew...@gmail.com>
AuthorDate: Fri Apr 6 20:12:19 2018 +0200

    AMBARI-23499. Infra Solr - ambari commons - max_shard calculation can be 
wrong if shard or replica value is string. (#922)
---
 .../python/resource_management/libraries/functions/solr_cloud_util.py   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
 
b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
index a630a1f..53f8496 100644
--- 
a/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
+++ 
b/ambari-common/src/main/python/resource_management/libraries/functions/solr_cloud_util.py
@@ -103,7 +103,7 @@ def create_collection(zookeeper_quorum, solr_znode, 
collection, config_set, java
   solr_cli_prefix = __create_solr_cloud_cli_prefix(zookeeper_quorum, 
solr_znode, java64_home, java_opts)
 
   if max_shards == 1: # if max shards is not specified use this strategy
-    max_shards = replication_factor * shards
+    max_shards = int(replication_factor) * int(shards)
 
   create_collection_cmd = format('{solr_cli_prefix} --create-collection 
--collection {collection} --config-set {config_set} '\
                                  '--shards {shards} --replication 
{replication_factor} --max-shards {max_shards} --retry {retry} '\

-- 
To stop receiving notification emails like this one, please contact
oleew...@apache.org.

Reply via email to