Github user JohannesDaniel commented on a diff in the pull request: https://github.com/apache/nifi/pull/2285#discussion_r159122738 --- Diff: nifi-nar-bundles/nifi-solr-bundle/nifi-solr-processors/src/main/java/org/apache/nifi/processors/solr/SolrProcessor.java --- @@ -34,39 +31,33 @@ import org.apache.nifi.processor.util.StandardValidators; import org.apache.nifi.ssl.SSLContextService; import org.apache.solr.client.solrj.SolrClient; -import org.apache.solr.client.solrj.impl.CloudSolrClient; -import org.apache.solr.client.solrj.impl.HttpClientUtil; -import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.impl.Krb5HttpClientConfigurer; -import org.apache.solr.common.params.ModifiableSolrParams; -import javax.net.ssl.SSLContext; import javax.security.auth.login.Configuration; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.concurrent.TimeUnit; /** * A base class for processors that interact with Apache Solr. * */ public abstract class SolrProcessor extends AbstractProcessor { - public static final AllowableValue SOLR_TYPE_CLOUD = new AllowableValue( - "Cloud", "Cloud", "A SolrCloud instance."); - - public static final AllowableValue SOLR_TYPE_STANDARD = new AllowableValue( - "Standard", "Standard", "A stand-alone Solr instance."); - - public static final PropertyDescriptor SOLR_TYPE = new PropertyDescriptor - .Builder().name("Solr Type") - .description("The type of Solr instance, Cloud or Standard.") - .required(true) - .allowableValues(SOLR_TYPE_CLOUD, SOLR_TYPE_STANDARD) - .defaultValue(SOLR_TYPE_STANDARD.getValue()) - .build(); + // make PropertyDescriptors of SolrUtils visible for classes extending SolrProcessor + public static AllowableValue SOLR_TYPE_CLOUD = SolrUtils.SOLR_TYPE_CLOUD; + public static AllowableValue SOLR_TYPE_STANDARD = SolrUtils.SOLR_TYPE_STANDARD; + public static PropertyDescriptor SOLR_TYPE = SolrUtils.SOLR_TYPE; + public static PropertyDescriptor COLLECTION = SolrUtils.COLLECTION; + public static PropertyDescriptor JAAS_CLIENT_APP_NAME = SolrUtils.JAAS_CLIENT_APP_NAME; + public static PropertyDescriptor SSL_CONTEXT_SERVICE = SolrUtils.SSL_CONTEXT_SERVICE; + public static PropertyDescriptor SOLR_SOCKET_TIMEOUT = SolrUtils.SOLR_SOCKET_TIMEOUT; + public static PropertyDescriptor SOLR_CONNECTION_TIMEOUT = SolrUtils.SOLR_CONNECTION_TIMEOUT; + public static PropertyDescriptor SOLR_MAX_CONNECTIONS = SolrUtils.SOLR_MAX_CONNECTIONS; + public static PropertyDescriptor SOLR_MAX_CONNECTIONS_PER_HOST = SolrUtils.SOLR_MAX_CONNECTIONS_PER_HOST; + public static PropertyDescriptor ZK_CLIENT_TIMEOUT = SolrUtils.ZK_CLIENT_TIMEOUT; + public static PropertyDescriptor ZK_CONNECTION_TIMEOUT = SolrUtils.ZK_CONNECTION_TIMEOUT; --- End diff -- This also affects all JUnit tests for GetSolr and PutSolrContentStream. E. g. all lines like runner.setProperty(GetSolr.SOLR_TYPE, GetSolr.SOLR_TYPE_CLOUD.getValue()); have to be changed...
---