manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1427427 - in /manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr: HttpPoster.java SolrConnector.java
Date Tue, 01 Jan 2013 14:43:36 GMT
Author: kwright
Date: Tue Jan  1 14:43:36 2013
New Revision: 1427427

URL: http://svn.apache.org/viewvc?rev=1427427&view=rev
Log:
Keystore and basic auth are confined to standard solr connection

Modified:
    manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
    manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java

Modified: manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java?rev=1427427&r1=1427426&r2=1427427&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
(original)
+++ manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/HttpPoster.java
Tue Jan  1 14:43:36 2013
@@ -120,9 +120,8 @@ public class HttpPoster
   public HttpPoster(String zookeeperHosts, String collection,
     int zkClientTimeout, int zkConnectTimeout,
     String updatePath, String removePath, String statusPath,
-    String realm, String userID, String password,
     String allowAttributeName, String denyAttributeName, String idAttributeName,
-    IKeystoreManager keystoreManager, Long maxDocumentLength,
+    Long maxDocumentLength,
     String commitWithin)
     throws ManifoldCFException
   {
@@ -139,9 +138,6 @@ public class HttpPoster
     
     this.maxDocumentLength = maxDocumentLength;
     
-    // What to do with basic auth and keystore manager parameters?  Do they even make sense?
-    // MHL
-    
     try
     {
       CloudSolrServer cloudSolrServer = new CloudSolrServer(zookeeperHosts);
@@ -1098,9 +1094,6 @@ public class HttpPoster
     @Override
     public Reader getReader() throws IOException
     {
-      // MHL - I think this should always return null, but we need to confirm
-      //String charset = getCharsetFromContentType( this.getContentType() );
-      //return charset == null ? new InputStreamReader( this.getStream() ) : new InputStreamReader(
this.getStream(), charset );
       return null;
     }
 

Modified: manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java?rev=1427427&r1=1427426&r2=1427427&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-594/connectors/solr/connector/src/main/java/org/apache/manifoldcf/agents/output/solr/SolrConnector.java
Tue Jan  1 14:43:36 2013
@@ -185,15 +185,6 @@ public class SolrConnector extends org.a
         }
       }
       
-      String userID = params.getParameter(SolrConfig.PARAM_USERID);
-      String password = params.getObfuscatedParameter(SolrConfig.PARAM_PASSWORD);
-      String realm = params.getParameter(SolrConfig.PARAM_REALM);
-      String keystoreData = params.getParameter(SolrConfig.PARAM_KEYSTORE);
-      IKeystoreManager keystoreManager;
-      if (keystoreData != null)
-        keystoreManager = KeystoreManagerFactory.make("",keystoreData);
-      else
-        keystoreManager = null;
 
       // Now, initialize Solr-j
       String solrType = params.getParameter(SolrConfig.PARAM_SOLR_TYPE);
@@ -202,6 +193,16 @@ public class SolrConnector extends org.a
 
       if (solrType.equals(SolrConfig.SOLR_TYPE_STANDARD))
       {
+        String userID = params.getParameter(SolrConfig.PARAM_USERID);
+        String password = params.getObfuscatedParameter(SolrConfig.PARAM_PASSWORD);
+        String realm = params.getParameter(SolrConfig.PARAM_REALM);
+        String keystoreData = params.getParameter(SolrConfig.PARAM_KEYSTORE);
+        IKeystoreManager keystoreManager;
+        if (keystoreData != null)
+          keystoreManager = KeystoreManagerFactory.make("",keystoreData);
+        else
+          keystoreManager = null;
+
         String protocol = params.getParameter(SolrConfig.PARAM_PROTOCOL);
         if (protocol == null || protocol.length() == 0)
           throw new ManifoldCFException("Missing parameter: "+SolrConfig.PARAM_PROTOCOL);
@@ -285,9 +286,9 @@ public class SolrConnector extends org.a
           
           poster = new HttpPoster(zookeeperHost,collection,
             zkClientTimeout,zkConnectTimeout,
-            updatePath,removePath,statusPath,realm,userID,password,
+            updatePath,removePath,statusPath,
             allowAttributeName,denyAttributeName,idAttributeName,
-            keystoreManager,maxDocumentLength,commitWithin);
+            maxDocumentLength,commitWithin);
           
         }
         catch (NumberFormatException e)



Mime
View raw message