[ https://issues.apache.org/jira/browse/NIFI-4583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16247224#comment-16247224 ]
Koji Kawamura commented on NIFI-4583: ------------------------------------- [~jope] I presume the motivation for this is to expand Solr integration not only as processor but also as other type of component, such as ControllerService. Then I do agree with having a common place to implement these functionalities. I'd suggest one thing, that is to avoid making everything as static methods. Some of them, 'createSolrClien' for example, would be useful if we can alter its behavior especially in unit testing code. Static methods in an utility class are hard to customize and better to be used with only simple functions. > Restructure package nifi-solr-processors > ---------------------------------------- > > Key: NIFI-4583 > URL: https://issues.apache.org/jira/browse/NIFI-4583 > Project: Apache NiFi > Issue Type: Improvement > Reporter: Johannes Peter > Assignee: Johannes Peter > Priority: Minor > > Several functionalities currently implemented e. g. in GetSolr or > SolrProcessor should be made available for other processors or controller > services. A class SolrUtils should be created containing several static > methods. This includes the methods > - getRequestParams (PutSolrContentStream) > - solrDocumentsToRecordSet (GetSolr) > - createSolrClient (SolrProcessor) > and the inner class QueryResponseOutputStreamCallback (GetSolr) > Some unit tests might be affected. > The method declaration > protected SolrClient createSolrClient(final ProcessContext context, final > String solrLocation) > should be changed to > public static SolrClient createSolrClient(final PropertyContext context, > final String solrLocation) > to be suitable also for controller services. -- This message was sent by Atlassian JIRA (v6.4.14#64029)