manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1220738 - in /incubator/lcf/branches/CONNECTORS-314/framework: agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/ agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/ agents/src/main/java/org/apache/manifol...
Date Mon, 19 Dec 2011 13:33:47 GMT
Author: kwright
Date: Mon Dec 19 13:33:46 2011
New Revision: 1220738

URL: http://svn.apache.org/viewvc?rev=1220738&view=rev
Log:
Add ALTER TABLE functionality, and remove hack to disable index synchronization.

Modified:
    incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
    incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authconnmgr/AuthorityConnectorManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connmgr/ConnectorManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Carrydown.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopCount.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopDeleteDeps.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/IntrinsicLink.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
    incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java

Modified: incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/incrementalingest/IncrementalIngester.java
Mon Dec 19 13:33:46 2011
@@ -132,7 +132,6 @@ public class IncrementalIngester extends
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -149,7 +148,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (uriHashIndex != null)
         performAddIndex(null,uriHashIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnection/OutputConnectionManager.java
Mon Dec 19 13:33:46 2011
@@ -107,7 +107,6 @@ public class OutputConnectionManager ext
       
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -120,7 +119,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (classIndex != null)
         performAddIndex(null,classIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/agents/src/main/java/org/apache/manifoldcf/agents/outputconnmgr/OutputConnectorManager.java
Mon Dec 19 13:33:46 2011
@@ -86,7 +86,6 @@ public class OutputConnectorManager exte
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -99,7 +98,6 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
 
       // Add the ones we didn't find
       if (descriptionIndex != null)

Modified: incubator/lcf/branches/CONNECTORS-314/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/core/src/main/java/org/apache/manifoldcf/core/database/DBInterfaceMySQL.java
Mon Dec 19 13:33:46 2011
@@ -272,32 +272,37 @@ public class DBInterfaceMySQL extends Da
         queryBuffer.append(',');
       else
         first = false;
-      queryBuffer.append(columnName);
-      queryBuffer.append(' ');
-      queryBuffer.append(cd.getTypeString());
-      if (cd.getIsNull())
-        queryBuffer.append(" NULL");
-      else
-        queryBuffer.append(" NOT NULL");
-      if (cd.getIsPrimaryKey())
-        queryBuffer.append(" PRIMARY KEY");
-      if (cd.getReferenceTable() != null)
-      {
-        queryBuffer.append(" REFERENCES ");
-        queryBuffer.append(cd.getReferenceTable());
-        queryBuffer.append('(');
-        queryBuffer.append(cd.getReferenceColumn());
-        queryBuffer.append(") ON DELETE");
-        if (cd.getReferenceCascade())
-          queryBuffer.append(" CASCADE");
-        else
-          queryBuffer.append(" RESTRICT");
-      }
+      appendDescription(queryBuffer,columnName,cd,false);
     }
     queryBuffer.append(')');
     performModification(queryBuffer.toString(),null,invalidateKeys);
   }
 
+  protected static void appendDescription(StringBuilder queryBuffer, String columnName, ColumnDescription
cd, boolean forceNull)
+  {
+    queryBuffer.append(columnName);
+    queryBuffer.append(' ');
+    queryBuffer.append(cd.getTypeString());
+    if (forceNull || cd.getIsNull())
+      queryBuffer.append(" NULL");
+    else
+      queryBuffer.append(" NOT NULL");
+    if (cd.getIsPrimaryKey())
+      queryBuffer.append(" PRIMARY KEY");
+    if (cd.getReferenceTable() != null)
+    {
+      queryBuffer.append(" REFERENCES ");
+      queryBuffer.append(cd.getReferenceTable());
+      queryBuffer.append('(');
+      queryBuffer.append(cd.getReferenceColumn());
+      queryBuffer.append(") ON DELETE");
+      if (cd.getReferenceCascade())
+        queryBuffer.append(" CASCADE");
+      else
+        queryBuffer.append(" RESTRICT");
+    }
+  }
+
   /** Perform a table alter operation.
   *@param tableName is the name of the table to alter.
   *@param columnMap is the map describing the columns and types to add.  These
@@ -313,7 +318,61 @@ public class DBInterfaceMySQL extends Da
     StringSet invalidateKeys)
     throws ManifoldCFException
   {
-    // MHL
+    beginTransaction(TRANSACTION_ENCLOSING);
+    try
+    {
+      if (columnDeleteList != null)
+      {
+        int i = 0;
+        while (i < columnDeleteList.size())
+        {
+          String columnName = columnDeleteList.get(i++);
+          performModification("ALTER TABLE "+tableName+" DROP "+columnName,null,invalidateKeys);
+        }
+      }
+
+      // Do the modifies.  This involves renaming each column to a temp column, then creating
a new one, then copying
+      if (columnModifyMap != null)
+      {
+        Iterator<String> iter = columnModifyMap.keySet().iterator();
+        while (iter.hasNext())
+        {
+          String columnName = iter.next();
+          ColumnDescription cd = columnModifyMap.get(columnName);
+          StringBuilder sb = new StringBuilder();
+          appendDescription(sb,columnName,cd,false);
+          performModification("ALTER TABLE "+tableName+" MODIFY "+sb.toString(),null,invalidateKeys);
+        }
+      }
+
+      // Now, do the adds
+      if (columnMap != null)
+      {
+        Iterator<String> iter = columnMap.keySet().iterator();
+        while (iter.hasNext())
+        {
+          String columnName = iter.next();
+          ColumnDescription cd = columnMap.get(columnName);
+          StringBuilder sb = new StringBuilder();
+          appendDescription(sb,columnName,cd,false);
+          performModification("ALTER TABLE "+tableName+" ADD "+sb.toString(),null,invalidateKeys);
+        }
+      }
+    }
+    catch (ManifoldCFException e)
+    {
+      signalRollback();
+      throw e;
+    }
+    catch (Error e)
+    {
+      signalRollback();
+      throw e;
+    }
+    finally
+    {
+      endTransaction();
+    }
   }
 
   /** Add an index to a table.

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authconnmgr/AuthorityConnectorManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authconnmgr/AuthorityConnectorManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authconnmgr/AuthorityConnectorManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/authorities/authconnmgr/AuthorityConnectorManager.java
Mon Dec 19 13:33:46 2011
@@ -86,7 +86,6 @@ public class AuthorityConnectorManager e
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -99,7 +98,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (descriptionIndex != null)
         performAddIndex(null,descriptionIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connmgr/ConnectorManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connmgr/ConnectorManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connmgr/ConnectorManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/connmgr/ConnectorManager.java
Mon Dec 19 13:33:46 2011
@@ -82,7 +82,6 @@ public class ConnectorManager extends or
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -95,7 +94,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (descriptionIndex != null)
         performAddIndex(null,descriptionIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Carrydown.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Carrydown.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Carrydown.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Carrydown.java
Mon Dec 19 13:33:46 2011
@@ -122,7 +122,6 @@ public class Carrydown extends org.apach
       IndexDescription newIndex = new IndexDescription(false,new String[]{newField});
 
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -139,7 +138,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Create the indexes we are missing
 
       if (jobChildDataIndex != null)

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopCount.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopCount.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopCount.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopCount.java
Mon Dec 19 13:33:46 2011
@@ -195,7 +195,6 @@ public class HopCount extends org.apache
       IndexDescription jobDeathIndex = new IndexDescription(false,new String[]{jobIDField,markForDeathField,parentIDHashField,linkTypeField});
 
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -210,7 +209,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       if (jobLinktypeParentIndex != null)
         performAddIndex(null,jobLinktypeParentIndex);
 

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopDeleteDeps.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopDeleteDeps.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopDeleteDeps.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopDeleteDeps.java
Mon Dec 19 13:33:46 2011
@@ -92,7 +92,6 @@ public class HopDeleteDeps extends org.a
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -107,7 +106,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (completeIndex != null)
         performAddIndex(null,completeIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/HopFilterManager.java
Mon Dec 19 13:33:46 2011
@@ -87,7 +87,6 @@ public class HopFilterManager extends or
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -100,7 +99,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (ownerIndex != null)
         performAddIndex(null,ownerIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/IntrinsicLink.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/IntrinsicLink.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/IntrinsicLink.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/IntrinsicLink.java
Mon Dec 19 13:33:46 2011
@@ -112,7 +112,6 @@ public class IntrinsicLink extends org.a
       IndexDescription newIndex = new IndexDescription(false,new String[]{newField});
 
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -129,7 +128,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Create the indexes we are still missing
       if (jobChildNewIndex != null)
         performAddIndex(null,jobChildNewIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/JobQueue.java
Mon Dec 19 13:33:46 2011
@@ -212,7 +212,6 @@ public class JobQueue extends org.apache
 
       // Get rid of unused indexes
       Map indexes = getTableIndexes(null,null);
-if (indexes != null){
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -237,7 +236,7 @@ if (indexes != null){
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Build missing indexes
 
       if (jobStatusIndex != null)

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/Jobs.java
Mon Dec 19 13:33:46 2011
@@ -319,7 +319,6 @@ public class Jobs extends org.apache.man
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null) {
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -336,7 +335,7 @@ if (indexes != null) {
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (statusIndex != null)
         performAddIndex(null,statusIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/PrereqEventManager.java
Mon Dec 19 13:33:46 2011
@@ -81,7 +81,6 @@ public class PrereqEventManager extends 
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null) {
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -94,7 +93,7 @@ if (indexes != null) {
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (ownerIndex != null)
         performAddIndex(null,ownerIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/jobs/ScheduleManager.java
Mon Dec 19 13:33:46 2011
@@ -120,7 +120,6 @@ public class ScheduleManager extends org
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null) {
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -133,7 +132,7 @@ if (indexes != null) {
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (ownerIndex != null)
         performAddIndex(null,ownerIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryConnectionManager.java
Mon Dec 19 13:33:46 2011
@@ -127,7 +127,6 @@ public class RepositoryConnectionManager
       
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null) {
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -142,7 +141,7 @@ if (indexes != null) {
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (authorityIndex != null)
         performAddIndex(null,authorityIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/RepositoryHistoryManager.java
Mon Dec 19 13:33:46 2011
@@ -115,7 +115,6 @@ public class RepositoryHistoryManager ex
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null) {
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -134,7 +133,7 @@ if (indexes != null) {
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (ownerIndex != null)
         performAddIndex(null,ownerIndex);

Modified: incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java?rev=1220738&r1=1220737&r2=1220738&view=diff
==============================================================================
--- incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java
(original)
+++ incubator/lcf/branches/CONNECTORS-314/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/repository/ThrottleSpecManager.java
Mon Dec 19 13:33:46 2011
@@ -100,7 +100,6 @@ public class ThrottleSpecManager extends
 
       // Get rid of indexes that shouldn't be there
       Map indexes = getTableIndexes(null,null);
-if (indexes != null) {
       Iterator iter = indexes.keySet().iterator();
       while (iter.hasNext())
       {
@@ -113,7 +112,7 @@ if (indexes != null) {
           // This index shouldn't be here; drop it
           performRemoveIndex(indexName);
       }
-}
+
       // Add the ones we didn't find
       if (ownerIndex != null)
         performAddIndex(null,ownerIndex);



Mime
View raw message