You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metron.apache.org by GitBox <gi...@apache.org> on 2019/08/22 22:17:51 UTC

[GitHub] [metron] merrimanr commented on a change in pull request #1492: METRON-2225: Upgrade Solr

merrimanr commented on a change in pull request #1492: METRON-2225: Upgrade Solr
URL: https://github.com/apache/metron/pull/1492#discussion_r316907719
 
 

 ##########
 File path: metron-platform/metron-solr/metron-solr-common/src/main/java/org/apache/metron/solr/writer/SolrClientFactory.java
 ##########
 @@ -31,21 +31,33 @@
 import org.slf4j.LoggerFactory;
 
 import java.io.IOException;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
-public class MetronSolrClient extends CloudSolrClient {
+public class SolrClientFactory {
 
   private static final Logger LOG = LoggerFactory
-          .getLogger(MetronSolrClient.class);
+          .getLogger(SolrClientFactory.class);
 
 
-  public MetronSolrClient(String zkHost) {
-    super(zkHost);
+  public static CloudSolrClient create(String zkHost) {
+    CloudSolrClient.Builder builder = getBuilder(zkHost);
+    return builder.build();
   }
 
-  public MetronSolrClient(String zkHost, Map<String, Object> solrHttpConfig) {
-    super(zkHost, HttpClientUtil.createClient(toSolrProps(solrHttpConfig)));
+  public static CloudSolrClient create(String zkHost, Map<String, Object> solrHttpConfig) {
 
 Review comment:
   Yes I believe so.  ‘MetronSolrClient’ wrapped a ‘SolrCloudClient’ instance.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services