incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1157065 [1/2] - in /incubator/lcf/trunk: ./ connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/ framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/
Date Fri, 12 Aug 2011 12:12:26 GMT
Author: kwright
Date: Fri Aug 12 12:12:26 2011
New Revision: 1157065

URL: http://svn.apache.org/viewvc?rev=1157065&view=rev
Log:
Fix for CONNECTORS-226.  Roll back special treatment of the REPOSITORY_CONNECTION_ERROR ManifoldCFException
type.

Modified:
    incubator/lcf/trunk/CHANGES.txt
    incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java
    incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java

Modified: incubator/lcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/CHANGES.txt (original)
+++ incubator/lcf/trunk/CHANGES.txt Fri Aug 12 12:12:26 2011
@@ -3,6 +3,10 @@ $Id$
 
 ======================= 0.3-dev =========================
 
+CONNECTORS-226: Clean up usage of REPOSITORY_CONNECTION_ERROR
+ManifoldCFException type.
+(Karl Wright)
+
 CONNECTORS-236: Add tests for CMIS connector.
 (Piergiorgio Lucidi, Karl Wright)
 

Modified: incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
(original)
+++ incubator/lcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Fri Aug 12 12:12:26 2011
@@ -6175,7 +6175,8 @@ public class LivelinkConnector extends o
     )
     {
       String details = llServer.getErrors();
-      throw new ManifoldCFException("Livelink API error: "+e.getMessage()+((details==null)?"":";
"+details),e,ManifoldCFException.REPOSITORY_CONNECTION_ERROR);
+      long currentTime = System.currentTimeMillis();
+      throw new ServiceInterruption("Livelink API error: "+e.getMessage()+((details==null)?"":";
"+details),e,currentTime + 5*60000L,currentTime+12*60*60000L,-1,failIfTimeout);
     }
     else if (
       e instanceof com.opentext.api.LLBadServerCertificateException ||

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java
(original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/DocumentCleanupThread.java
Fri Aug 12 12:12:26 2011
@@ -142,126 +142,110 @@ public class DocumentCleanupThread exten
             }
 
             // Grab one connection for each connectionName.  If we fail, nothing is lost
and retries are possible.
+            IRepositoryConnector connector = RepositoryConnectorFactory.grab(threadContext,connection.getClassName(),connection.getConfigParams(),connection.getMaxConnections());
             try
             {
-              IRepositoryConnector connector = RepositoryConnectorFactory.grab(threadContext,connection.getClassName(),connection.getConfigParams(),connection.getMaxConnections());
-              try
-              {
 
-                // Iterate over the outputs
-                boolean[] deleteFromQueue = new boolean[arrayDocHashes.size()];
+              // Iterate over the outputs
+              boolean[] deleteFromQueue = new boolean[arrayDocHashes.size()];
                     
-                // Count the number of docs to actually delete.  This will be a subset of
the documents in the list.
-                int k = 0;
-                int removeCount = 0;
-                while (k < arrayDocHashes.size())
+              // Count the number of docs to actually delete.  This will be a subset of the
documents in the list.
+              int k = 0;
+              int removeCount = 0;
+              while (k < arrayDocHashes.size())
+              {
+                if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
                 {
-                  if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
-                  {
-                    deleteFromQueue[k] = false;
-                    removeCount++;
-                  }
-                  else
-                    deleteFromQueue[k] = true;
-                  k++;
+                  deleteFromQueue[k] = false;
+                  removeCount++;
                 }
+                else
+                  deleteFromQueue[k] = true;
+                k++;
+              }
                     
-                // Allocate removal arrays
-                String[] docClassesToRemove = new String[removeCount];
-                String[] hashedDocsToRemove = new String[removeCount];
-
-                // Now, iterate over the list
-                k = 0;
-                removeCount = 0;
-                while (k < arrayDocHashes.size())
+              // Allocate removal arrays
+              String[] docClassesToRemove = new String[removeCount];
+              String[] hashedDocsToRemove = new String[removeCount];
+
+              // Now, iterate over the list
+              k = 0;
+              removeCount = 0;
+              while (k < arrayDocHashes.size())
+              {
+                if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
                 {
-                  if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
-                  {
-                    docClassesToRemove[removeCount] = connectionName;
-                    hashedDocsToRemove[removeCount] = (String)arrayDocHashes.get(k);
-                    removeCount++;
-                  }
-                  k++;
+                  docClassesToRemove[removeCount] = connectionName;
+                  hashedDocsToRemove[removeCount] = (String)arrayDocHashes.get(k);
+                  removeCount++;
                 }
+                k++;
+              }
                 
-                OutputRemoveActivity activities = new OutputRemoveActivity(connectionName,connMgr,outputConnectionName);
+              OutputRemoveActivity activities = new OutputRemoveActivity(connectionName,connMgr,outputConnectionName);
 
-                // Finally, go ahead and delete the documents from the ingestion system.
+              // Finally, go ahead and delete the documents from the ingestion system.
 
-                try
-                {
-                  ingester.documentDeleteMultiple(outputConnectionName,docClassesToRemove,hashedDocsToRemove,activities);
-                  // Success!  Label all these as needing deletion from queue.
-                  k = 0;
-                  while (k < arrayDocHashes.size())
-                  {
-                    if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
-                      deleteFromQueue[k] = true;
-                    k++;
-                  }
-                }
-                catch (ServiceInterruption e)
+              try
+              {
+                ingester.documentDeleteMultiple(outputConnectionName,docClassesToRemove,hashedDocsToRemove,activities);
+                // Success!  Label all these as needing deletion from queue.
+                k = 0;
+                while (k < arrayDocHashes.size())
                 {
-                  // We don't know which failed, or maybe they all did.
-                  // Go through the list of documents we just tried, and reset them on the
queue based on the
-                  // ServiceInterruption parameters.  Then we must proceed to delete ONLY
the documents that
-                  // were not part of the index deletion attempt.
-                  k = 0;
-                  while (k < arrayDocHashes.size())
-                  {
-                    CleanupQueuedDocument cqd = (CleanupQueuedDocument)arrayDocsToDelete.get(k);
-                    if (cqd.shouldBeRemovedFromIndex())
-                    {
-                      DocumentDescription dd = cqd.getDocumentDescription();
-                      // To recover from a cleanup failure, requeue the document to PURGATORY.
-                      jobManager.resetCleaningDocument(dd,e.getRetryTime());
-                      cqd.setProcessed();
-                    }
-                    k++;
-                  }
+                  if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
+                    deleteFromQueue[k] = true;
+                  k++;
                 }
-
-                // Successfully deleted some documents from ingestion system.  Now, remove
them from job queue.  This
-                // must currently happen one document at a time, because the jobs and connectors
for each document
-                // potentially differ.
+              }
+              catch (ServiceInterruption e)
+              {
+                // We don't know which failed, or maybe they all did.
+                // Go through the list of documents we just tried, and reset them on the
queue based on the
+                // ServiceInterruption parameters.  Then we must proceed to delete ONLY the
documents that
+                // were not part of the index deletion attempt.
                 k = 0;
                 while (k < arrayDocHashes.size())
                 {
-                  if (deleteFromQueue[k])
+                  CleanupQueuedDocument cqd = (CleanupQueuedDocument)arrayDocsToDelete.get(k);
+                  if (cqd.shouldBeRemovedFromIndex())
                   {
-                    DeleteQueuedDocument dqd = (DeleteQueuedDocument)arrayDocsToDelete.get(k);
-                    DocumentDescription ddd = dqd.getDocumentDescription();
-                    Long jobID = ddd.getJobID();
-                    int hopcountMethod = ((Integer)hopcountMethods.get(k)).intValue();
-                    String[] legalLinkTypes = (String[])arrayRelationshipTypes.get(k);
-                    DocumentDescription[] requeueCandidates = jobManager.markDocumentDeleted(jobID,legalLinkTypes,ddd,hopcountMethod);
-                    // Use the common method for doing the requeuing
-                    ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,
-                      connector,connection,queueTracker,currentTime);
-                    // Finally, completed expiration of the document.
-                    dqd.setProcessed();
+                    DocumentDescription dd = cqd.getDocumentDescription();
+                    // To recover from a cleanup failure, requeue the document to PURGATORY.
+                    jobManager.resetCleaningDocument(dd,e.getRetryTime());
+                    cqd.setProcessed();
                   }
                   k++;
                 }
               }
-              finally
+
+              // Successfully deleted some documents from ingestion system.  Now, remove
them from job queue.  This
+              // must currently happen one document at a time, because the jobs and connectors
for each document
+              // potentially differ.
+              k = 0;
+              while (k < arrayDocHashes.size())
               {
-                // Free up the reserved connector instance
-                RepositoryConnectorFactory.release(connector);
+                if (deleteFromQueue[k])
+                {
+                  DeleteQueuedDocument dqd = (DeleteQueuedDocument)arrayDocsToDelete.get(k);
+                  DocumentDescription ddd = dqd.getDocumentDescription();
+                  Long jobID = ddd.getJobID();
+                  int hopcountMethod = ((Integer)hopcountMethods.get(k)).intValue();
+                  String[] legalLinkTypes = (String[])arrayRelationshipTypes.get(k);
+                  DocumentDescription[] requeueCandidates = jobManager.markDocumentDeleted(jobID,legalLinkTypes,ddd,hopcountMethod);
+                  // Use the common method for doing the requeuing
+                  ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,
+                    connector,connection,queueTracker,currentTime);
+                  // Finally, completed expiration of the document.
+                  dqd.setProcessed();
+                }
+                k++;
               }
             }
-            catch (ManifoldCFException e)
+            finally
             {
-              if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR)
-              {
-                // This error can only come from grabbing the connections.  So, if this occurs
it means that
-                // all the documents we've been handed have to be stuffed back onto the queue
for processing at a later time.
-                Logging.threads.warn("Document cleanup thread couldn't establish necessary
connections, retrying later: "+e.getMessage(),e);
-
-                // Let the unprocessed documents get requeued!  This is handled at the end
of the loop...
-              }
-              else
-                throw e;
+              // Free up the reserved connector instance
+              RepositoryConnectorFactory.release(connector);
             }
           }
           catch (ManifoldCFException e)

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
(original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ExpireThread.java
Fri Aug 12 12:12:26 2011
@@ -134,137 +134,121 @@ public class ExpireThread extends Thread
             }
 
             // Grab one connection for the connectionName.  If we fail, nothing is lost and
retries are possible.
+            IRepositoryConnector connector = RepositoryConnectorFactory.grab(threadContext,connection.getClassName(),connection.getConfigParams(),connection.getMaxConnections());
             try
             {
-              IRepositoryConnector connector = RepositoryConnectorFactory.grab(threadContext,connection.getClassName(),connection.getConfigParams(),connection.getMaxConnections());
-              try
-              {
 
-                // Iterate over the outputs
-                boolean[] deleteFromQueue = new boolean[arrayDocHashes.size()];
+              // Iterate over the outputs
+              boolean[] deleteFromQueue = new boolean[arrayDocHashes.size()];
                     
-                // Count the number of docs to actually delete.  This will be a subset of
the documents in the list.
-                int k = 0;
-                int removeCount = 0;
-                while (k < arrayDocHashes.size())
+              // Count the number of docs to actually delete.  This will be a subset of the
documents in the list.
+              int k = 0;
+              int removeCount = 0;
+              while (k < arrayDocHashes.size())
+              {
+                if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
                 {
-                  if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
-                  {
-                    deleteFromQueue[k] = false;
-                    removeCount++;
-                  }
-                  else
-                    deleteFromQueue[k] = true;
-                  k++;
+                  deleteFromQueue[k] = false;
+                  removeCount++;
                 }
+                else
+                  deleteFromQueue[k] = true;
+                k++;
+              }
                     
-                // Allocate removal arrays
-                String[] docClassesToRemove = new String[removeCount];
-                String[] hashedDocsToRemove = new String[removeCount];
+              // Allocate removal arrays
+              String[] docClassesToRemove = new String[removeCount];
+              String[] hashedDocsToRemove = new String[removeCount];
+
+              // Now, iterate over the list
+              k = 0;
+              removeCount = 0;
+              while (k < arrayDocHashes.size())
+              {
+                if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
+                {
+                  docClassesToRemove[removeCount] = connectionName;
+                  hashedDocsToRemove[removeCount] = (String)arrayDocHashes.get(k);
+                  removeCount++;
+                }
+                k++;
+              }
+
+              OutputRemoveActivity activities = new OutputRemoveActivity(connectionName,connMgr,outputConnectionName);
 
-                // Now, iterate over the list
+              // Finally, go ahead and delete the documents from the ingestion system.
+              // If we fail, we need to put the documents back on the queue.
+              try
+              {
+                ingester.documentDeleteMultiple(outputConnectionName,docClassesToRemove,hashedDocsToRemove,activities);
+                // Success!  Label all these as needing deletion from queue.
                 k = 0;
-                removeCount = 0;
                 while (k < arrayDocHashes.size())
                 {
                   if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
-                  {
-                    docClassesToRemove[removeCount] = connectionName;
-                    hashedDocsToRemove[removeCount] = (String)arrayDocHashes.get(k);
-                    removeCount++;
-                  }
+                    deleteFromQueue[k] = true;
                   k++;
                 }
-
-                OutputRemoveActivity activities = new OutputRemoveActivity(connectionName,connMgr,outputConnectionName);
-
-                // Finally, go ahead and delete the documents from the ingestion system.
-                // If we fail, we need to put the documents back on the queue.
-                try
-                {
-                  ingester.documentDeleteMultiple(outputConnectionName,docClassesToRemove,hashedDocsToRemove,activities);
-                  // Success!  Label all these as needing deletion from queue.
-                  k = 0;
-                  while (k < arrayDocHashes.size())
-                  {
-                    if (((CleanupQueuedDocument)arrayDocsToDelete.get(k)).shouldBeRemovedFromIndex())
-                      deleteFromQueue[k] = true;
-                    k++;
-                  }
-                }
-                catch (ServiceInterruption e)
-                {
-                  // We don't know which failed, or maybe they all did.
-                  // Go through the list of documents we just tried, and reset them on the
queue based on the
-                  // ServiceInterruption parameters.  Then we must proceed to delete ONLY
the documents that
-                  // were not part of the index deletion attempt.
-                  k = 0;
-                  while (k < arrayDocHashes.size())
-                  {
-                    CleanupQueuedDocument cqd = (CleanupQueuedDocument)arrayDocsToDelete.get(k);
-                    if (cqd.shouldBeRemovedFromIndex())
-                    {
-                      DocumentDescription dd = cqd.getDocumentDescription();
-                      if (dd.getFailTime() != -1L && dd.getFailTime() < e.getRetryTime()
||
-                        dd.getFailRetryCount() == 0)
-                      {
-                        // Treat this as a hard failure.
-                        if (e.isAbortOnFail())
-                          throw new ManifoldCFException("Repeated service interruptions -
failure expiring document"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause());
-                      }
-                      else
-                      {
-                        // To recover from an expiration failure, requeue the document to
PENDING etc.
-                        jobManager.resetDocument(dd,e.getRetryTime(),
-                          IJobManager.ACTION_REMOVE,e.getFailTime(),e.getFailRetryCount());
-                        cqd.setProcessed();
-                      }
-                    }
-                    k++;
-                  }
-                }
-
-                // Successfully deleted some documents from ingestion system.  Now, remove
them from job queue.  This
-                // must currently happen one document at a time, because the jobs and connectors
for each document
-                // potentially differ.
+              }
+              catch (ServiceInterruption e)
+              {
+                // We don't know which failed, or maybe they all did.
+                // Go through the list of documents we just tried, and reset them on the
queue based on the
+                // ServiceInterruption parameters.  Then we must proceed to delete ONLY the
documents that
+                // were not part of the index deletion attempt.
                 k = 0;
                 while (k < arrayDocHashes.size())
                 {
-                  if (deleteFromQueue[k])
+                  CleanupQueuedDocument cqd = (CleanupQueuedDocument)arrayDocsToDelete.get(k);
+                  if (cqd.shouldBeRemovedFromIndex())
                   {
-                    CleanupQueuedDocument dqd = (CleanupQueuedDocument)arrayDocsToDelete.get(k);
-                    DocumentDescription ddd = dqd.getDocumentDescription();
-                    Long jobID = ddd.getJobID();
-                    int hopcountMethod = ((Integer)hopcountMethods.get(k)).intValue();
-                    String[] legalLinkTypes = (String[])arrayRelationshipTypes.get(k);
-                    DocumentDescription[] requeueCandidates = jobManager.markDocumentDeleted(jobID,legalLinkTypes,ddd,hopcountMethod);
-                    // Use the common method for doing the requeuing
-                    ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,
-                      connector,connection,queueTracker,currentTime);
-                    // Finally, completed expiration of the document.
-                    dqd.setProcessed();
+                    DocumentDescription dd = cqd.getDocumentDescription();
+                    if (dd.getFailTime() != -1L && dd.getFailTime() < e.getRetryTime()
||
+                      dd.getFailRetryCount() == 0)
+                    {
+                      // Treat this as a hard failure.
+                      if (e.isAbortOnFail())
+                        throw new ManifoldCFException("Repeated service interruptions - failure
expiring document"+((e.getCause()!=null)?": "+e.getCause().getMessage():""),e.getCause());
+                    }
+                    else
+                    {
+                      // To recover from an expiration failure, requeue the document to PENDING
etc.
+                      jobManager.resetDocument(dd,e.getRetryTime(),
+                        IJobManager.ACTION_REMOVE,e.getFailTime(),e.getFailRetryCount());
+                      cqd.setProcessed();
+                    }
                   }
                   k++;
                 }
               }
-              finally
+
+              // Successfully deleted some documents from ingestion system.  Now, remove
them from job queue.  This
+              // must currently happen one document at a time, because the jobs and connectors
for each document
+              // potentially differ.
+              k = 0;
+              while (k < arrayDocHashes.size())
               {
-                // Free up the reserved connector instance
-                RepositoryConnectorFactory.release(connector);
+                if (deleteFromQueue[k])
+                {
+                  CleanupQueuedDocument dqd = (CleanupQueuedDocument)arrayDocsToDelete.get(k);
+                  DocumentDescription ddd = dqd.getDocumentDescription();
+                  Long jobID = ddd.getJobID();
+                  int hopcountMethod = ((Integer)hopcountMethods.get(k)).intValue();
+                  String[] legalLinkTypes = (String[])arrayRelationshipTypes.get(k);
+                  DocumentDescription[] requeueCandidates = jobManager.markDocumentDeleted(jobID,legalLinkTypes,ddd,hopcountMethod);
+                  // Use the common method for doing the requeuing
+                  ManifoldCF.requeueDocumentsDueToCarrydown(jobManager,requeueCandidates,
+                    connector,connection,queueTracker,currentTime);
+                  // Finally, completed expiration of the document.
+                  dqd.setProcessed();
+                }
+                k++;
               }
             }
-            catch (ManifoldCFException e)
+            finally
             {
-              if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR)
-              {
-                // This error can only come from grabbing the connections.  So, if this occurs
it means that
-                // all the documents we've been handed have to be stuffed back onto the queue
for processing at a later time.
-                Logging.threads.warn("Expire thread couldn't establish necessary connections,
retrying later: "+e.getMessage(),e);
-
-                // Let the unprocessed documents get requeued!  This is handled at the end
of the loop...
-              }
-              else
-                throw e;
+              // Free up the reserved connector instance
+              RepositoryConnectorFactory.release(connector);
             }
           }
           catch (ManifoldCFException e)

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
(original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Fri Aug 12 12:12:26 2011
@@ -980,34 +980,22 @@ public class ManifoldCF extends org.apac
       }
 
       String[] binNames;
+      // Grab a connector handle
+      IRepositoryConnector connector = RepositoryConnectorFactory.grab(threadContext,
+        connection.getClassName(),
+        connection.getConfigParams(),
+        connection.getMaxConnections());
       try
       {
-        // Grab a connector handle
-        IRepositoryConnector connector = RepositoryConnectorFactory.grab(threadContext,
-          connection.getClassName(),
-          connection.getConfigParams(),
-          connection.getMaxConnections());
-        try
-        {
-          if (connector == null)
-            binNames = new String[]{""};
-          else
-            // Get the bins for the document identifier
-            binNames = connector.getBinNames(descs[i].getDocumentIdentifier());
-        }
-        finally
-        {
-          RepositoryConnectorFactory.release(connector);
-        }
-      }
-      catch (ManifoldCFException e)
-      {
-        if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR)
-        {
+        if (connector == null)
           binNames = new String[]{""};
-        }
         else
-          throw e;
+          // Get the bins for the document identifier
+          binNames = connector.getBinNames(descs[i].getDocumentIdentifier());
+      }
+      finally
+      {
+        RepositoryConnectorFactory.release(connector);
       }
 
       priorities[i] = queueTracker.calculatePriority(binNames,connection);

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java
(original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingThread.java
Fri Aug 12 12:12:26 2011
@@ -189,11 +189,6 @@ public class SeedingThread extends Threa
                   throw new InterruptedException();
                 if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
                   throw e;
-                if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR)
-                {
-                  Logging.threads.warn("Seeding thread: Ignoring connection error: "+e.getMessage(),e);
-                  continue;
-                }
                 if (jobManager.errorAbort(jobID,e.getMessage()))
                   Logging.threads.error("Exception tossed: "+e.getMessage(),e);
                 // We DO have to clean up, because there is otherwise no

Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java?rev=1157065&r1=1157064&r2=1157065&view=diff
==============================================================================
--- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java
(original)
+++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/StartupThread.java
Fri Aug 12 12:12:26 2011
@@ -185,7 +185,7 @@ public class StartupThread extends Threa
                   catch (ServiceInterruption e)
                   {
                     // Note the service interruption
-                    Logging.threads.warn("Service interruption for job "+jobID,e);
+                    Logging.threads.warn("Service interruption for job "+jobID+": "+e.getMessage(),e);
                     long retryInterval = e.getRetryTime() - currentTime;
                     if (retryInterval >= 0L && retryInterval < waitTime)
                       waitTime = retryInterval;
@@ -208,11 +208,6 @@ public class StartupThread extends Threa
                   throw new InterruptedException();
                 if (e.getErrorCode() == ManifoldCFException.DATABASE_CONNECTION_ERROR)
                   throw e;
-                if (e.getErrorCode() == ManifoldCFException.REPOSITORY_CONNECTION_ERROR)
-                {
-                  Logging.threads.warn("Startup thread: connection error; continuing: "+e.getMessage(),e);
-                  continue;
-                }
                 // Note: The error abort below will put the job in the "ABORTINGSTARTUP"
state.  We still need a reset at that point
                 // to get all the way back to an "aborting" state.
                 if (jobManager.errorAbort(jobID,e.getMessage()))



Mime
View raw message