[ 
https://issues.apache.org/jira/browse/SOLR-5303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Shalin Shekhar Mangar resolved SOLR-5303.
-----------------------------------------

    Resolution: Cannot Reproduce

I can't reproduce this with Solr 4.3.1. I used the Example A from SolrCloud 
wiki at 
http://wiki.apache.org/solr/SolrCloud#Example_A:_Simple_two_shard_cluster with 
-DnumShards=2 and 2 shards are indeed created.

The code in question is correct. From Integer.getInteger javadocs:
{quote}
Determines the integer value of the system property with the specified name.
The first argument is treated as the name of a system property. System 
properties are accessible through the System.getProperty(String) method. The 
string value of this property is then interpreted as an integer value and an 
Integer object representing this value is returned. Details of possible numeric 
formats can be found with the definition of getProperty.
If there is no property with the specified name, if the specified name is empty 
or null, or if the property does not have the correct numeric format, then null 
is returned.
In other words, this method returns an Integer object equal to the value of:
getInteger(nm, null)
{quote}

The maxShardsPerNode is another property which limits the actual number of 
physical shards per Solr node. This defaults to 1 unless you're using the 
collection API. Perhaps that is confusing you? I'll close this issue and I 
request you to discuss this on the solr-user mailing list.

> numShards property is not properly taken into account
> -----------------------------------------------------
>
>                 Key: SOLR-5303
>                 URL: https://issues.apache.org/jira/browse/SOLR-5303
>             Project: Solr
>          Issue Type: Bug
>          Components: SolrCloud
>    Affects Versions: 4.2, 4.3.1
>         Environment: SolR on 3 VMs each with an external Zookeeper, 
> multi-core startups
>            Reporter: Federico Piai
>              Labels: shard, solrcloud, zookeeper
>
> It looks like the 'numShards' argument is ignored by SolR. The number of 
> shards is always defaulted to 1 unless cores are dynamically created with 
> Collection API.
> I had this log :
> INFO: numShards not found on descriptor - reading it from system property, I 
> looked for the piece of code where the log was located 
> ((https://svn.apache.org/repos/asf/lucene/dev/trunk/solr/core/src/java/org/apache/solr/cloud/ZkController.java))
>  and I found a possible error :
> log.info("numShards not found on descriptor - reading it from system 
> property");
> numShards = Integer.getInteger(ZkStateReader.NUM_SHARDS_PROP);



--
This message was sent by Atlassian JIRA
(v6.1#6144)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to