You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2017/07/14 10:58:34 UTC
svn commit: r1801934 - in /manifoldcf/trunk: ./
connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/
connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/
connectors/docume...
Author: kwright
Date: Fri Jul 14 10:58:34 2017
New Revision: 1801934
URL: http://svn.apache.org/viewvc?rev=1801934&view=rev
Log:
Fixes for CONNECTORS-1444.
Modified:
manifoldcf/trunk/CHANGES.txt
manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumObjectImpl.java
manifoldcf/trunk/connectors/documentum/interface/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumException.java
Modified: manifoldcf/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1801934&r1=1801933&r2=1801934&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Fri Jul 14 10:58:34 2017
@@ -3,6 +3,10 @@ $Id$
======================= 2.8-dev =====================
+CONNECTORS-1444: Documentum connector needs the ability to skip
+corrupted files.
+(Tamizh Kumaran Thamizharasan, Karl Wright)
+
CONNECTORS-1440: Add support for created date in File System connector.
(Steph van Schalkwyk, Karl Wright)
Modified: manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java?rev=1801934&r1=1801933&r2=1801934&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java (original)
+++ manifoldcf/trunk/connectors/documentum/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/DCTM/DCTM.java Fri Jul 14 10:58:34 2017
@@ -1482,11 +1482,18 @@ public class DCTM extends org.apache.man
catch (DocumentumException dfe)
{
// Fetch failed, so log it
- activityStatus = "NOCONTENT";
activityMessage = dfe.getMessage();
- if (dfe.getType() != DocumentumException.TYPE_NOTALLOWED)
- throw dfe;
- return;
+ if (dfe.getType() == DocumentumException.TYPE_NOTALLOWED)
+ {
+ activityStatus = "NOTALLOWED";
+ return;
+ }
+ else if (dfe.getType() != DocumentumException.TYPE_CORRUPTEDDOCUMENT)
+ {
+ activityStatus = "CORRUPTEDDOCUMENT";
+ return;
+ }
+ throw dfe;
}
long fileLength = objFileTemp.length();
activityFileLength = new Long(fileLength);
Modified: manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumObjectImpl.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumObjectImpl.java?rev=1801934&r1=1801933&r2=1801934&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumObjectImpl.java (original)
+++ manifoldcf/trunk/connectors/documentum/implementation/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumObjectImpl.java Fri Jul 14 10:58:34 2017
@@ -360,12 +360,19 @@ public class DocumentumObjectImpl extend
// Can't decide what to do without looking at the exception text.
// This is crappy but it's the best we can manage, apparently.
String errorMessage = dfe.getMessage();
- if (errorMessage.indexOf("[DM_CONTENT_E_CANT_START_PULL]") == -1)
- // Treat it as transient, and retry
- throw new DocumentumException(dfe.getMessage(),DocumentumException.TYPE_SERVICEINTERRUPTION);
- // It's probably not a transient error. Report it as an access violation, even though it
- // may well not be. We don't have much info as to what's happening.
- throw new DocumentumException(dfe.getMessage(),DocumentumException.TYPE_NOTALLOWED);
+ if (errorMessage.indexOf("[DM_CONTENT_E_CANT_START_PULL]") != -1)
+ {
+ // It's probably not a transient error. Report it as an access violation, even though it
+ // may well not be. We don't have much info as to what's happening.
+ throw new DocumentumException(dfe.getMessage(),DocumentumException.TYPE_NOTALLOWED);
+ }
+ else if (errorMessage.indexOf("[DM_OBJECT_E_LOAD_INVALID_STRING_LEN]") != -1 ||
+ errorMessage.indexOf("[DM_PLATFORM_E_INTEGER_CONVERSION_ERROR]") != -1)
+ {
+ throw new DocumentumException(dfe.getMessage(),DocumentumException.TYPE_CORRUPTEDDOCUMENT);
+ }
+ // Treat it as transient, and retry
+ throw new DocumentumException(dfe.getMessage(),DocumentumException.TYPE_SERVICEINTERRUPTION);
}
}
Modified: manifoldcf/trunk/connectors/documentum/interface/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumException.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/documentum/interface/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumException.java?rev=1801934&r1=1801933&r2=1801934&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/documentum/interface/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumException.java (original)
+++ manifoldcf/trunk/connectors/documentum/interface/src/main/java/org/apache/manifoldcf/crawler/common/DCTM/DocumentumException.java Fri Jul 14 10:58:34 2017
@@ -28,6 +28,7 @@ public class DocumentumException extends
public static final int TYPE_BADCONNECTIONPARAMS = 2;
public static final int TYPE_NOTALLOWED = 3;
public static final int TYPE_GENERAL = 4;
+ public static final int TYPE_CORRUPTEDDOCUMENT = 5;
protected int errType;