lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject svn commit: r899579 - in /lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport: DataImportHandler.java DataImporter.java
Date Fri, 15 Jan 2010 09:53:44 GMT
Author: noble
Date: Fri Jan 15 09:53:43 2010
New Revision: 899579

URL: http://svn.apache.org/viewvc?rev=899579&view=rev
Log:
SOLR-1721 Add explicit option to run DataImportHandler in synchronous mode

Modified:
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
    lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java?rev=899579&r1=899578&r2=899579&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImportHandler.java
Fri Jan 15 09:53:43 2010
@@ -211,7 +211,7 @@
           }
         } else {
           // Asynchronous request for normal mode
-          if(requestParams.contentStream == null){
+          if(requestParams.contentStream == null && !requestParams.syncMode){
             importer.runAsync(requestParams, sw);
           } else {
               importer.runCmd(requestParams, sw);

Modified: lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java?rev=899579&r1=899578&r2=899579&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java
(original)
+++ lucene/solr/trunk/contrib/dataimporthandler/src/main/java/org/apache/solr/handler/dataimport/DataImporter.java
Fri Jan 15 09:53:43 2010
@@ -470,6 +470,8 @@
 
     public boolean verbose = false;
 
+    public boolean syncMode = false;
+
     public boolean commit = true;
 
     public boolean optimize = true;
@@ -504,6 +506,7 @@
         verbose = "true".equals(requestParams.get("verbose"))
                 || "on".equals(requestParams.get("verbose"));
       }
+      syncMode = "true".equals(requestParams.get("synchronous"));
       if (DELTA_IMPORT_CMD.equals(command) || IMPORT_CMD.equals(command)) {
         clean = false;
       }



Mime
View raw message