Re: Review Request 54208: Log Search: Cannot increase the number of shards per node for solr collections

2016-12-01 Thread Oliver Szabo

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54208/
---

(Updated Dec. 1, 2016, 10:32 a.m.)


Review request for Ambari, Miklos Gergely, Robert Nettleton, and Sandor Magyari.


Changes
---

slices collection response can be null, so check null instead of not empty


Bugs: AMBARI-19033
https://issues.apache.org/jira/browse/AMBARI-19033


Repository: ambari


Description
---

In case of in logsearch.properties, the number of shards changes -> it cannot 
create new shards per cores, because there is a maxShardsPerCore property is 
set in zk config. To change that we need to use MODIFYCOLLECTION http call 
against any solr server on solr cloud.

solr4j client library does not support MODIFYCOLLECTION action on collections, 
so i had to implement the behaviour through a simple http call. (HttpCleintUtil 
is used, so it should work with ssl and kerberos as well)


Diffs (updated)
-

  
ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrCollectionDao.java
 834ba38 

Diff: https://reviews.apache.org/r/54208/diff/


Testing
---

testing done (manually increase the number of shards with  changing the 
logsearch.properties)


Thanks,

Oliver Szabo



Re: Review Request 54208: Log Search: Cannot increase the number of shards per node for solr collections

2016-11-30 Thread Miklos Gergely

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54208/#review157486
---


Fix it, then Ship it!





ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrCollectionDao.java
 (line 237)


If you assume that slices isn't null, then there is no point to check if 
it's not empty, you may as well iterate over an empty collection too, the 
result would be the same. I suggest to remove this line to have less levels.


- Miklos Gergely


On Nov. 30, 2016, 5:15 p.m., Oliver Szabo wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54208/
> ---
> 
> (Updated Nov. 30, 2016, 5:15 p.m.)
> 
> 
> Review request for Ambari, Miklos Gergely, Robert Nettleton, and Sandor 
> Magyari.
> 
> 
> Bugs: AMBARI-19033
> https://issues.apache.org/jira/browse/AMBARI-19033
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> In case of in logsearch.properties, the number of shards changes -> it cannot 
> create new shards per cores, because there is a maxShardsPerCore property is 
> set in zk config. To change that we need to use MODIFYCOLLECTION http call 
> against any solr server on solr cloud.
> 
> solr4j client library does not support MODIFYCOLLECTION action on 
> collections, so i had to implement the behaviour through a simple http call. 
> (HttpCleintUtil is used, so it should work with ssl and kerberos as well)
> 
> 
> Diffs
> -
> 
>   
> ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrCollectionDao.java
>  834ba38 
> 
> Diff: https://reviews.apache.org/r/54208/diff/
> 
> 
> Testing
> ---
> 
> testing done (manually increase the number of shards with  changing the 
> logsearch.properties)
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>



Re: Review Request 54208: Log Search: Cannot increase the number of shards per node for solr collections

2016-11-30 Thread Robert Nettleton

---
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54208/#review157437
---


Ship it!




Ship It!

- Robert Nettleton


On Nov. 30, 2016, 5:15 p.m., Oliver Szabo wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54208/
> ---
> 
> (Updated Nov. 30, 2016, 5:15 p.m.)
> 
> 
> Review request for Ambari, Miklos Gergely, Robert Nettleton, and Sandor 
> Magyari.
> 
> 
> Bugs: AMBARI-19033
> https://issues.apache.org/jira/browse/AMBARI-19033
> 
> 
> Repository: ambari
> 
> 
> Description
> ---
> 
> In case of in logsearch.properties, the number of shards changes -> it cannot 
> create new shards per cores, because there is a maxShardsPerCore property is 
> set in zk config. To change that we need to use MODIFYCOLLECTION http call 
> against any solr server on solr cloud.
> 
> solr4j client library does not support MODIFYCOLLECTION action on 
> collections, so i had to implement the behaviour through a simple http call. 
> (HttpCleintUtil is used, so it should work with ssl and kerberos as well)
> 
> 
> Diffs
> -
> 
>   
> ambari-logsearch/ambari-logsearch-portal/src/main/java/org/apache/ambari/logsearch/dao/SolrCollectionDao.java
>  834ba38 
> 
> Diff: https://reviews.apache.org/r/54208/diff/
> 
> 
> Testing
> ---
> 
> testing done (manually increase the number of shards with  changing the 
> logsearch.properties)
> 
> 
> Thanks,
> 
> Oliver Szabo
> 
>