incubator-connectors-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r911029 [14/19] - in /incubator/lcf/trunk: modules/connectors/documentum/connector/org/apache/lcf/crawler/authorities/DCTM/ modules/connectors/documentum/connector/org/apache/lcf/crawler/connectors/DCTM/ modules/connectors/documentum/crawle...
Date Wed, 17 Feb 2010 15:57:35 GMT
Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/Carrydown.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/Carrydown.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/Carrydown.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/Carrydown.java
Wed Feb 17 15:57:27 2010
@@ -23,7 +23,7 @@
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 
 /** This class manages the table that keeps track of intrinsic relationships between documents.
 */
@@ -65,7 +65,7 @@
 	*@param database is the database handle.
 	*/
 	public Carrydown(IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"carrydown");
 	}
@@ -73,7 +73,7 @@
 	/** Install or upgrade.
 	*/
 	public void install(String jobsTable, String jobsColumn)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Since adding a unique constraint may not work, we need the possibility of retrying.
 		while (true)
@@ -146,7 +146,7 @@
 								String dataValue = (String)row.getValue(dataValueField);
 								
 								HashMap newMap = new HashMap();
-								newMap.put(dataValueHashField,Metacarta.hash(dataValue));
+								newMap.put(dataValueHashField,LCF.hash(dataValue));
 								ArrayList newList = new ArrayList();
 								newList.add(jobID);
 								if (parentIDHash != null && parentIDHash.length() > 0)
@@ -170,7 +170,7 @@
 					}
 				}
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				signalRollback();
 				throw e;
@@ -231,7 +231,7 @@
 				{
 					performAddIndex(null,uniqueIndex);
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					if (e.getMessage().indexOf("could not create unique index") == -1)
 						throw e;
@@ -252,7 +252,7 @@
 	
 	/** Remove duplicates (as part of upgrade */
 	protected void removeDuplicates()
-		throws MetacartaException
+		throws LCFException
 	{
 		// If we got here, it means adding the unique constraint failed.  Fix things up!
 		Logging.jobs.warn("Carrydown has duplicate jobid,parent,child,dataname,datavalue tuples!
 Cleaning up...");
@@ -275,7 +275,7 @@
 		}
 		catch (NumberFormatException e)
 		{
-			throw new MetacartaException(e.getMessage(),e);
+			throw new LCFException(e.getMessage(),e);
 		}
 
 		// Now, amass a list of duplicates
@@ -352,7 +352,7 @@
 				// Now, insert the proper row
 				performInsert(map,null);
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				signalRollback();
 				throw e;
@@ -376,7 +376,7 @@
 	/** Uninstall.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		performDrop(null);
 	}
@@ -384,7 +384,7 @@
 	/** Analyze job tables that need analysis.
 	*/
 	public void analyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		long startTime = System.currentTimeMillis();
 		Logging.perf.debug("Beginning to analyze carrydown table");
@@ -395,7 +395,7 @@
 	/** Delete an owning job (and clean up the corresponding carrydown rows).
 	*/
 	public void deleteOwner(Long jobID)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -415,7 +415,7 @@
 	/** Reset, at startup time. 
 	*/
 	public void reset()
-		throws MetacartaException
+		throws LCFException
 	{
 		// Delete "new" rows
 		HashMap map = new HashMap();
@@ -436,7 +436,7 @@
 	*/
 	public boolean recordCarrydownData(Long jobID, String parentDocumentIDHash, String childDocumentIDHash,
 		String[] documentDataNames, String[][] documentDataValueHashes, Object[][] documentDataValues)
-		throws MetacartaException
+		throws LCFException
 	{
 		return recordCarrydownDataMultiple(jobID,parentDocumentIDHash,new String[]{childDocumentIDHash},
 			new String[][]{documentDataNames},new String[][][]{documentDataValueHashes},new Object[][][]{documentDataValues})[0];
@@ -446,7 +446,7 @@
 	*/
 	public boolean[] recordCarrydownDataMultiple(Long jobID, String parentDocumentIDHash, String[]
childDocumentIDHashes,
 		String[][] dataNames, String[][][] dataValueHashes, Object[][][] dataValues)
-		throws MetacartaException
+		throws LCFException
 	{
 		
 		// Need to go into a transaction because we need to distinguish between update and insert.
@@ -607,7 +607,7 @@
 	
 	/** Do the exists check, in batch. */
 	protected void performExistsCheck(Map presentMap, String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Note well: presentMap is only checked for the *existence* of a record, so we do not
need to populate the datavalue field!
 		// This is crucial, because otherwise we'd either be using an undetermined amount of memory,
or we'd need to read into a temporary file.
@@ -629,7 +629,7 @@
 	* and delete the old (eliminated) child records.
 	*/
 	public void restoreRecords(Long jobID, String[] parentDocumentIDHashes)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -661,7 +661,7 @@
 			if (k > 0)
 				performRestoreRecords(sb.toString(),list);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -678,7 +678,7 @@
 	}
 
 	protected void performRestoreRecords(String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Delete
 		StringBuffer sb = new StringBuffer("WHERE (");
@@ -700,7 +700,7 @@
 	/** Delete all records that mention a particular set of document identifiers.
 	*/
 	public void deleteRecords(Long jobID, String[] documentIDHashes)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -747,7 +747,7 @@
 
 			
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -765,7 +765,7 @@
 	}
 
 	protected void performDeleteRecords(String query, String query2, ArrayList list, ArrayList
list2)
-		throws MetacartaException
+		throws LCFException
 	{
 		performDelete("WHERE "+query,list,null);
 		performDelete("WHERE "+query2,list2,null);
@@ -773,7 +773,7 @@
 
 	/** Get unique values given a document identifier, data name, an job identifier */
 	public String[] getDataValues(Long jobID, String documentIdentifierHash, String dataName)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -798,7 +798,7 @@
 	
 	/** Get unique values given a document identifier, data name, an job identifier */
 	public CharacterInput[] getDataValuesAsFiles(Long jobID, String documentIdentifierHash,
String dataName)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -847,7 +847,7 @@
 	/** Conditionally do analyze operation.
 	*/
 	public void conditionallyAnalyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (tracker.checkAnalyze())
 		{
@@ -901,7 +901,7 @@
 		*@return true if it should be included, false otherwise.
 		*/
 		public boolean checkInclude(IResultRow row)
-			throws MetacartaException
+			throws LCFException
 		{
 			// Check to be sure that this row is different from the last; only then agree to include
it.
 			String value = (String)row.getValue(dataValueHashField);
@@ -919,7 +919,7 @@
 		*@return true if we need to keep going, or false if we are done.
 		*/
 		public boolean checkContinue()
-			throws MetacartaException
+			throws LCFException
 		{
 			return true;
 		}
@@ -1091,7 +1091,7 @@
 		*@return true if it should be included, false otherwise.
 		*/
 		public boolean checkInclude(IResultRow row)
-			throws MetacartaException
+			throws LCFException
 		{
 			Long jobID = (Long)row.getValue(jobIDField);
 			String parentIDHash = (String)row.getValue(parentIDHashField);
@@ -1120,7 +1120,7 @@
 		*@return true if we need to keep going, or false if we are done.
 		*/
 		public boolean checkContinue()
-			throws MetacartaException
+			throws LCFException
 		{
 			return true;
 		}

Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/EventManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/EventManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/EventManager.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/EventManager.java
Wed Feb 17 15:57:27 2010
@@ -39,7 +39,7 @@
         *@param database is the database handle.
         */
         public EventManager(IDBInterface database)
-                throws MetacartaException
+                throws LCFException
         {
                 super(database,"events");
         }
@@ -47,7 +47,7 @@
         /** Install or upgrade this table.
         */
         public void install()
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
@@ -64,7 +64,7 @@
                                 // No upgrade is possible since this table has just been
introduced.
                         }
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -83,14 +83,14 @@
         /** Uninstall.
         */
         public void deinstall()
-                throws MetacartaException
+                throws LCFException
         {
                 beginTransaction();
                 try
                 {
                         performDrop(null);
                 }
-                catch (MetacartaException e)
+                catch (LCFException e)
                 {
                         signalRollback();
                         throw e;
@@ -109,7 +109,7 @@
         /** Prepare for restart.
         */
         public void restart()
-                throws MetacartaException
+                throws LCFException
         {
                 // Delete all rows in this table.
                 performDelete("",null,null);
@@ -117,7 +117,7 @@
         
         /** Atomically create an event - and return false if the event already exists */
         public void createEvent(String eventName)
-                throws MetacartaException
+                throws LCFException
         {
                 HashMap map = new HashMap();
                 map.put(eventNameField,eventName);
@@ -126,7 +126,7 @@
         
         /** Destroy an event */
         public void destroyEvent(String eventName)
-                throws MetacartaException
+                throws LCFException
         {
                 ArrayList list = new ArrayList();
                 list.add(eventName);

Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopCount.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopCount.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopCount.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopCount.java
Wed Feb 17 15:57:27 2010
@@ -23,7 +23,7 @@
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 
 /** This class manages the table that keeps track of hop count, and algorithmically determines
this value
 * for a document identifier upon request.
@@ -142,7 +142,7 @@
 	*@param database is the database handle.
 	*/
 	public HopCount(IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"hopcount");
 		intrinsicLinkManager = new IntrinsicLink(database);
@@ -152,7 +152,7 @@
 	/** Install or upgrade.
 	*/
 	public void install(String jobsTable, String jobsColumn)
-		throws MetacartaException
+		throws LCFException
 	{
                 // Do schema first
 		beginTransaction();
@@ -185,7 +185,7 @@
 				}
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -240,7 +240,7 @@
 	/** Uninstall.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -249,7 +249,7 @@
 			intrinsicLinkManager.deinstall();
 			performDrop(null);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -271,11 +271,11 @@
 	*@return the status value.
 	*/
 	public static int stringToMark(String value)
-		throws MetacartaException
+		throws LCFException
 	{
 		Integer x = (Integer)markMap.get(value);
 		if (x == null)
-			throw new MetacartaException("Bad mark value: '"+value+"'");
+			throw new LCFException("Bad mark value: '"+value+"'");
 		return x.intValue();
 	}
 
@@ -284,7 +284,7 @@
 	*@return the string.
 	*/
 	public static String markToString(int mark)
-		throws MetacartaException
+		throws LCFException
 	{
 		switch (mark)
 		{
@@ -295,14 +295,14 @@
 		case MARK_DELETING:
 			return "D";
 		default:
-			throw new MetacartaException("Bad mark value");
+			throw new LCFException("Bad mark value");
 		}
 	}
 
 	/** Delete an owner (and clean up the corresponding hopcount rows).
 	*/
 	public void deleteOwner(Long jobID)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -319,7 +319,7 @@
 			performDelete("WHERE "+jobIDField+"=?",list,null);
 			reindexTracker.noteInsert();
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -338,14 +338,14 @@
 	/** Reset, at startup time.
 	*/
 	public void reset()
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
 		{
 			intrinsicLinkManager.reset();
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -365,7 +365,7 @@
 	* will have a null linktype.
 	*/
 	public void recordSeedReferences(Long jobID, String[] legalLinkTypes, String[] targetDocumentIDHashes,
int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		doRecord(jobID,legalLinkTypes,"",targetDocumentIDHashes,"",hopcountMethod);
 	}
@@ -373,7 +373,7 @@
 	/** Finish seed references.  Seed references are special in that the only source is the
root.
 	*/
 	public void finishSeedReferences(Long jobID, String[] legalLinkTypes, int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		doFinish(jobID,legalLinkTypes,new String[]{""},hopcountMethod);
 	}
@@ -382,7 +382,7 @@
 	*/
 	public void recordReference(Long jobID, String[] legalLinkTypes, String sourceDocumentIDHash,
String targetDocumentIDHash, String linkType,
 		int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		doRecord(jobID,legalLinkTypes,sourceDocumentIDHash,new String[]{targetDocumentIDHash},linkType,hopcountMethod);
 	}
@@ -391,7 +391,7 @@
 	*/
 	public void recordReferences(Long jobID, String[] legalLinkTypes, String sourceDocumentIDHash,
String[] targetDocumentIDHashes, String linkType,
 		int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		doRecord(jobID,legalLinkTypes,sourceDocumentIDHash,targetDocumentIDHashes,linkType,hopcountMethod);
 	}
@@ -400,7 +400,7 @@
 	* or "existing" will be removed.  At the completion of this pass, the links will have their
"new" flag cleared.
 	*/
 	public void finishParents(Long jobID, String[] legalLinkTypes, String[] sourceDocumentHashes,
int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		doFinish(jobID,legalLinkTypes,sourceDocumentHashes,hopcountMethod);
 	}
@@ -408,7 +408,7 @@
 	/** Do the work of recording source-target references. */
 	protected void doRecord(Long jobID, String[] legalLinkTypes, String sourceDocumentIDHash,
String[] targetDocumentIDHashes, String linkType,
 		int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 
 		// We have to both add the reference, AND invalidate appropriate cached hopcounts (if it
is a NEW
@@ -515,7 +515,7 @@
 					Logging.hopcount.debug("Done queueing "+Integer.toString(targetDocumentIDHashes.length)+"
documents");
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -537,7 +537,7 @@
 	public void deleteMatchingDocuments(Long jobID, String[] legalLinkTypes,
 		String sourceTableName,
 		String sourceTableIDColumn, String sourceTableJobColumn, String sourceTableCriteria, int
hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		// This should work similarly to deleteDocumentIdentifiers() except that the identifiers
 		// come from a subquery rather than a list.
@@ -553,7 +553,7 @@
 			}
 
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -575,7 +575,7 @@
 	* identifier hashes as sources, as well as invalidating cached hop counts that depend on
them.
 	*/
 	public void deleteDocumentIdentifiers(Long jobID, String[] legalLinkTypes, String[] sourceDocumentHashes,
int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -595,7 +595,7 @@
 				doDeleteInvalidation(jobID,legalLinkTypes,false,sourceDocumentHashes,null,null,null,null);
 
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -615,7 +615,7 @@
 	* the queue has recently been processed (via processQueue below).  -1 will be returned to
indicate "infinity".
 	*/
 	public int[] findHopCounts(Long jobID, String[] parentIdentifierHashes, String linkType)
-		throws MetacartaException
+		throws LCFException
 	{
 		// No transaction, since we can happily interpret whatever comes back.
 		StringBuffer sb = new StringBuffer();
@@ -662,7 +662,7 @@
 	/** Process a portion of a find request for hopcount information.
 	*/
 	protected void processFind(int[] rval, Map rvalMap, String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		IResultSet set = performQuery("SELECT "+distanceField+","+parentIDHashField+" FROM "+getTableName()+"
WHERE "+query,list,null,null);
 		int i = 0;
@@ -680,7 +680,7 @@
 	*@return true if the queue is empty.
 	*/
 	public boolean processQueue(Long jobID, String[] legalLinkTypes, int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		// We can't instantiate the DocumentHash object here, because it will wind up having
 		// cached in it the answers from the previous round of calculation.  That round had
@@ -734,7 +734,7 @@
 	/** Limited find for missing records.
 	*/
 	protected void performFindMissingRecords(String query, ArrayList list, Map matchMap)
-		throws MetacartaException
+		throws LCFException
 	{
 		// The naive query is this - but postgres does not find the index this way:
 		//IResultSet set = performQuery("SELECT "+parentIDField+","+linkTypeField+" FROM "+getTableName()+"
WHERE "+
@@ -774,7 +774,7 @@
 	*/
 	protected void addToProcessingQueue(Long jobID, String[] affectedLinkTypes, String[] documentIDHashes,
 		Answer[] startingAnswers, String sourceDocumentIDHash, String linkType, int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		// If we're given the source hopcount distances, we should write the derived target values
into the NEW
 		// hopcount records we create, because it will save much database access in the long run,
and handles the
@@ -1002,7 +1002,7 @@
 			// A minimal path, not THE minimal path.
 
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -1021,7 +1021,7 @@
 
 	/** Do the work of marking add-dep-dependent links in the hopcount table. */
 	protected void performMarkAddDeps(String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		HashMap map = new HashMap();
 		map.put(markForDeathField,markToString(MARK_QUEUED));
@@ -1031,7 +1031,7 @@
 
 	/** Method that does the work of "finishing" a set of child references. */
 	protected void doFinish(Long jobID, String[] legalLinkTypes, String[] sourceDocumentHashes,
int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Go into a transaction!
 		beginTransaction();
@@ -1056,7 +1056,7 @@
 			// Make all new and existing links become just "base" again.
 			intrinsicLinkManager.restoreLinks(jobID,sourceDocumentHashes);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -1080,7 +1080,7 @@
 	protected void doDeleteInvalidation(Long jobID, String[] legalLinkTypes, boolean existingOnly,
 		String[] sourceDocumentHashes, String sourceTableName,
 		String sourceTableIDColumn, String sourceTableJobColumn, String sourceTableCriteria)
-		throws MetacartaException
+		throws LCFException
 	{
 		
 		String commonNewExpression = null;
@@ -1228,7 +1228,7 @@
 	}
 
 	protected void markForDelete(String query, ArrayList list, String commonNewExpression)
-		throws MetacartaException
+		throws LCFException
 	{
 		StringBuffer sb = new StringBuffer("WHERE ");
 		sb.append(idField).append(" IN(SELECT ").append(deleteDepsManager.ownerIDField).append("
FROM ")
@@ -1255,7 +1255,7 @@
 	*@return rows that contain the children.  Column names are 'linktype','childidentifier'.
 	*/
 	protected IResultSet getDocumentChildren(Long jobID, String documentIDHash)
-		throws MetacartaException
+		throws LCFException
 	{
 		return intrinsicLinkManager.getDocumentChildren(jobID,documentIDHash);
 	}
@@ -1269,7 +1269,7 @@
 	*@return the corresponding list of nodes, taking into account unknown distances.
 	*/
 	protected DocumentNode[] readCachedNodes(Long jobID, Question[] unansweredQuestions)
-		throws MetacartaException
+		throws LCFException
 	{
 	    // This all goes in a transaction; we want to insure that the data we grab is self-consistent.
 	    beginTransaction();
@@ -1368,7 +1368,7 @@
 
 		return rval;
 	    }
-	    catch (MetacartaException e)
+	    catch (LCFException e)
 	    {
 		signalRollback();
 		throw e;
@@ -1386,7 +1386,7 @@
 
 	/** Do a limited fetch of cached distance dependencies */
 	protected void performGetCachedDistanceDeps(Map depsMap, String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		IResultSet set = performQuery("SELECT "+deleteDepsManager.ownerIDField+","+
 			deleteDepsManager.linkTypeField+","+
@@ -1450,7 +1450,7 @@
 
 	/** Do a limited fetch of cached distances */
 	protected void performGetCachedDistances(DocumentNode[] rval, Map indexMap, Map depsMap,
String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		IResultSet set = performQuery("SELECT "+idField+","+parentIDHashField+","+linkTypeField+","+distanceField+","+markForDeathField+
 			" FROM "+getTableName()+" WHERE "+query,list,null,null);
@@ -1495,7 +1495,7 @@
 				else
 				{
 					Logging.hopcount.error("Document '"+parentIDHash+"' linktype '"+linkType+"' is labeled
with 'DELETING'!");
-					throw new MetacartaException("Algorithm transaction error!");
+					throw new LCFException("Algorithm transaction error!");
 				}
 			}
 
@@ -1521,7 +1521,7 @@
 	/** Write a distance into the cache.
 	*/
 	protected void writeCachedDistance(Long jobID, String[] legalLinkTypes, DocumentNode dn,
int hopcountMethod)
-		throws MetacartaException
+		throws LCFException
 	{
 		Question q = dn.getQuestion();
 		String linkType = q.getLinkType();
@@ -1573,7 +1573,7 @@
 					// Since infinity is not a reduction of any kind, we're done here.
 					return;
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					signalRollback();
 					throw e;
@@ -1595,7 +1595,7 @@
 			{
 				Logging.hopcount.error("Existing distance "+Integer.toString(existingDistance)+" better
than new distance "+
 					Integer.toString(answerValue)+" for '"+parentIDHash+"' linktype '"+linkType+"'");
-				throw new MetacartaException("Existing distance is better than new distance! Failure.");
+				throw new LCFException("Existing distance is better than new distance! Failure.");
 			}
 
 			// If the new distance is exactly the same as the old, we can leave everything as is.
@@ -1633,14 +1633,14 @@
 					
 						IResultSet set = performQuery("SHOW TRANSACTION ISOLATION LEVEL",null, null,null);
 						if (set.getRowCount() != 1)
-							throw new MetacartaException("Unexpected return: no rows");
+							throw new LCFException("Unexpected return: no rows");
 						IResultRow row = set.getRow(0);
 						if (row.getColumnCount() != 1)
-							throw new MetacartaException("Unexpected return: no columns");
+							throw new LCFException("Unexpected return: no columns");
 						Iterator itera = row.getColumns();
 						String columnName = (String)itera.next();
 						if (row.getValue(columnName).toString().indexOf("serializ") == -1)
-							throw new MetacartaException("Not in a serializable transaction! "+row.getValue(columnName).toString());
+							throw new LCFException("Not in a serializable transaction! "+row.getValue(columnName).toString());
 						*/
 					
 						// Drop these into a hash map.
@@ -1715,7 +1715,7 @@
 
 					addToProcessingQueue(jobID,new String[]{linkType},targetDocumentIDHashes,new Answer[]{answer},parentIDHash,linkType,hopcountMethod);
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					signalRollback();
 					throw e;
@@ -1789,7 +1789,7 @@
 			}
 
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -1808,7 +1808,7 @@
 	/** Conditionally do analyze operation.
 	*/
 	public void conditionallyAnalyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (tracker.checkAnalyze())
 		{
@@ -2574,7 +2574,7 @@
 
 		/** Throw in some questions, and prepare for the answers. */
 		public int[] askQuestions(Question[] questions)
-			throws MetacartaException
+			throws LCFException
 		{
 			if (Logging.hopcount.isDebugEnabled())
 			{
@@ -2624,7 +2624,7 @@
 			while (true)
 			{
 				if (Thread.currentThread().isInterrupted())
-					throw new MetacartaException("Interrupted",MetacartaException.INTERRUPTED);
+					throw new LCFException("Interrupted",LCFException.INTERRUPTED);
 
 				// Early decision!
 				// For each question, see if there's a completed answer yet
@@ -2713,7 +2713,7 @@
 		/** Evaluate a node from the evaluation queue.
 		*/
 		protected void evaluateNode(DocumentNode node)
-			throws MetacartaException
+			throws LCFException
 		{
 			if (Logging.hopcount.isDebugEnabled())
 			{
@@ -2875,7 +2875,7 @@
 		/** Fetch a the children of a bunch of nodes, and initialize all of the nodes appropriately.
 		*/
 		protected void getNodeChildren(DocumentNode[] nodes)
-			throws MetacartaException
+			throws LCFException
 		{
 			if (Logging.hopcount.isDebugEnabled())
 			{
@@ -3143,7 +3143,7 @@
 		/** Get the children of a bunch of nodes.
 		*/
 		protected void findChildren(Map referenceMap, String query, ArrayList list)
-			throws MetacartaException
+			throws LCFException
 		{
 			// Grab the appropriate rows from the intrinsic link table.
 			IResultSet set = performQuery("SELECT "+intrinsicLinkManager.childIDHashField+","+intrinsicLinkManager.linkTypeField+","+
@@ -3190,7 +3190,7 @@
 		* if appropriate.
 		*/
 		protected void makeNodeComplete(DocumentNode node)
-			throws MetacartaException
+			throws LCFException
 		{
 			node.makeComplete();
 			// Clean up children.
@@ -3210,7 +3210,7 @@
 		*@param questions are the set of questions.
 		*/
 		protected DocumentNode[] queueQuestions(Question[] questions)
-			throws MetacartaException
+			throws LCFException
 		{
 		    DocumentNode[] rval = new DocumentNode[questions.length];
 

Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopDeleteDeps.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopDeleteDeps.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopDeleteDeps.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopDeleteDeps.java
Wed Feb 17 15:57:27 2010
@@ -21,7 +21,7 @@
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 import java.util.*;
 
 /** This class manages the table that keeps track of link deletion dependencies for cached
@@ -50,7 +50,7 @@
 	*@param database is the database handle.
 	*/
 	public HopDeleteDeps(IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"hopdeletedeps");
 	}
@@ -58,7 +58,7 @@
 	/** Install or upgrade.
 	*/
 	public void install(String jobsTable, String jobsColumn, String hopCountTable, String idColumn)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -115,7 +115,7 @@
 			}
 			return;
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -134,7 +134,7 @@
 	/** Uninstall.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		performDrop(null);
 	}
@@ -142,7 +142,7 @@
 	/** Analyze job tables that need analysis.
 	*/
 	public void analyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		long startTime = System.currentTimeMillis();
 		Logging.perf.debug("Beginning to analyze hopdeletedeps table");
@@ -152,7 +152,7 @@
 
 	/** Delete a job. */
 	public void deleteJob(Long jobID)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -164,7 +164,7 @@
 	/** Remove rows that correspond to specific hopcount records.
 	*/
 	public void removeMarkedRows(String parentTable, String parentIDHashField, String query,
ArrayList queryList)
-		throws MetacartaException
+		throws LCFException
 	{
 		// This didn't perform very well.
 		//performDelete("WHERE EXISTS(SELECT 'x' FROM "+parentTable+" t0 WHERE t0."+parentIDField+"="+ownerIDField+
@@ -180,7 +180,7 @@
 	* size.
 	*/
 	public void deleteOwnerRows(Long[] ownerIDs)
-		throws MetacartaException
+		throws LCFException
 	{
 		StringBuffer sb = new StringBuffer("WHERE ");
 		sb.append(ownerIDField).append(" IN(");
@@ -202,7 +202,7 @@
 	*@return the links
 	*/
 	public DeleteDependency[] getDeleteDependencies(Long ownerID)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(ownerID);
@@ -223,7 +223,7 @@
 
 	/** Delete a dependency */
 	public void deleteDependency(Long ownerID, DeleteDependency dd)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		StringBuffer sb = new StringBuffer("WHERE ");
@@ -252,7 +252,7 @@
 	/** Write a delete dependency.
 	*/
 	public void writeDependency(Long ownerID, Long jobID, DeleteDependency dd)
-		throws MetacartaException
+		throws LCFException
 	{
 		HashMap map = new HashMap();
 		map.put(jobIDField,jobID);
@@ -272,7 +272,7 @@
 	/** Conditionally do analyze operation.
 	*/
 	public void conditionallyAnalyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (tracker.checkAnalyze())
 		{

Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopFilterManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopFilterManager.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopFilterManager.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/HopFilterManager.java
Wed Feb 17 15:57:27 2010
@@ -40,7 +40,7 @@
 	*@param database is the database instance.
 	*/
 	public HopFilterManager(IThreadContext threadContext, IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"jobhopfilters");
 	}
@@ -50,7 +50,7 @@
 	*@param owningTablePrimaryKey is the primary key of the owning table.
 	*/
 	public void install(String ownerTable, String owningTablePrimaryKey)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -71,7 +71,7 @@
 				addTableIndex(true,list);
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -90,7 +90,7 @@
 	/** Uninstall.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		performDrop(null);
 	}
@@ -100,7 +100,7 @@
 	*@return a map of link type to max hop count (as a Long).
 	*/
 	public Map readRows(Long id)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(id);
@@ -127,7 +127,7 @@
 	*@param ownerIDParams is the corresponding set of owner id parameters.
 	*/
 	public void getRows(Map returnValues, String ownerIDList, ArrayList ownerIDParams)
-		throws MetacartaException
+		throws LCFException
 	{
 		IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+"
IN ("+ownerIDList+")",ownerIDParams,
 			null,null);
@@ -148,7 +148,7 @@
 	*@param list is the job description to write hopcount filters for.
 	*/
 	public void writeRows(Long ownerID, IJobDescription list)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -168,7 +168,7 @@
 				performInsert(map,null);
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -188,7 +188,7 @@
 	*@param ownerID is the owner whose rows to delete.
 	*/
 	public void deleteRows(Long ownerID)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(ownerID);

Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/IntrinsicLink.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/IntrinsicLink.java?rev=911029&r1=911028&r2=911029&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/IntrinsicLink.java
(original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/lcf/crawler/jobs/IntrinsicLink.java
Wed Feb 17 15:57:27 2010
@@ -23,7 +23,7 @@
 import org.apache.lcf.core.interfaces.*;
 import org.apache.lcf.crawler.interfaces.*;
 import org.apache.lcf.crawler.system.Logging;
-import org.apache.lcf.crawler.system.Metacarta;
+import org.apache.lcf.crawler.system.LCF;
 
 /** This class manages the table that keeps track of intrinsic relationships between documents.
 */
@@ -70,7 +70,7 @@
 	*@param database is the database handle.
 	*/
 	public IntrinsicLink(IDBInterface database)
-		throws MetacartaException
+		throws LCFException
 	{
 		super(database,"intrinsiclink");
 	}
@@ -78,7 +78,7 @@
 	/** Install or upgrade.
 	*/
 	public void install(String jobsTable, String jobsColumn)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Creating a unique index as part of upgrading could well fail, so we must have the ability
to fix things up and retry if that happens.
 		while (true)
@@ -113,7 +113,7 @@
 					}
 				}
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				signalRollback();
 				throw e;
@@ -165,7 +165,7 @@
 				{
 					performAddIndex(null,uniqueIndex);
 				}
-				catch (MetacartaException e)
+				catch (LCFException e)
 				{
 					if (e.getMessage().indexOf("could not create unique index") == -1)
 						throw e;
@@ -182,7 +182,7 @@
 	
 	/** Remove duplicates, as part of upgrade */
 	protected void removeDuplicates()
-		throws MetacartaException
+		throws LCFException
 	{
 		// If we get here, it's because we couldn't create the necessary unique table constraint.
 Fix this by removing undesired duplicates.
 			
@@ -206,7 +206,7 @@
 		}
 		catch (NumberFormatException e)
 		{
-			throw new MetacartaException(e.getMessage(),e);
+			throw new LCFException(e.getMessage(),e);
 		}
 
 		// Now, amass a list of duplicates
@@ -268,7 +268,7 @@
 						
 				performInsert(map,null);
 			}
-			catch (MetacartaException e)
+			catch (LCFException e)
 			{
 				signalRollback();
 				throw e;
@@ -294,7 +294,7 @@
 	/** Uninstall.
 	*/
 	public void deinstall()
-		throws MetacartaException
+		throws LCFException
 	{
 		performDrop(null);
 	}
@@ -302,7 +302,7 @@
 	/** Analyze job tables that need analysis.
 	*/
 	public void analyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		long startTime = System.currentTimeMillis();
 		Logging.perf.debug("Beginning to analyze intrinsiclink table");
@@ -313,7 +313,7 @@
 	/** Delete an owner (and clean up the corresponding hopcount rows).
 	*/
 	public void deleteOwner(Long jobID)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -327,7 +327,7 @@
 	* is processed, the links will be updated properly.
 	*/
 	public void reset()
-		throws MetacartaException
+		throws LCFException
 	{
 		HashMap map = new HashMap();
 		ArrayList list = new ArrayList();
@@ -341,7 +341,7 @@
 	*@return the target document ID's that are considered "new".
 	*/
 	public String[] recordReferences(Long jobID, String sourceDocumentIDHash, String[] targetDocumentIDHashes,
String linkType)
-		throws MetacartaException
+		throws LCFException
 	{
 		// Need to go into a transaction because we need to distinguish between update and insert.
 		beginTransaction();
@@ -433,7 +433,7 @@
 			}
 			return newReferences;
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -452,7 +452,7 @@
 
 	/** Do the exists check, in batch. */
 	protected void performExistsCheck(Map presentMap, String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		IResultSet result = performQuery("SELECT "+parentIDHashField+" FROM "+getTableName()+"
WHERE "+query+" FOR UPDATE",list,null,null);
 		int i = 0;
@@ -470,7 +470,7 @@
 	public void removeLinks(Long jobID, String commonNewExpression, String[] sourceDocumentIDHashes,
 		String sourceTableName,
 		String sourceTableIDColumn, String sourceTableJobColumn, String sourceTableCriteria)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -517,7 +517,7 @@
 				reindexTracker.noteInsert();
 			}
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -535,7 +535,7 @@
 	}
 
 	protected void performRemoveLinks(String query, ArrayList list, String commonNewExpression)
-		throws MetacartaException
+		throws LCFException
 	{
 		StringBuffer sb = new StringBuffer("WHERE (");
 		sb.append(query).append(")");
@@ -547,7 +547,7 @@
 	/** Return all target links of the specified source documents to their base state.
 	*/
 	public void restoreLinks(Long jobID, String[] sourceDocumentIDHashes)
-		throws MetacartaException
+		throws LCFException
 	{
 		beginTransaction();
 		try
@@ -579,7 +579,7 @@
 			if (k > 0)
 				performRestoreLinks(sb.toString(),list);
 		}
-		catch (MetacartaException e)
+		catch (LCFException e)
 		{
 			signalRollback();
 			throw e;
@@ -597,7 +597,7 @@
 	}
 
 	protected void performRestoreLinks(String query, ArrayList list)
-		throws MetacartaException
+		throws LCFException
 	{
 		StringBuffer sb = new StringBuffer("WHERE (");
 		sb.append(query).append(") AND (").append(newField).append("=? OR ").append(newField).append("=?)");
@@ -612,7 +612,7 @@
 	*@return rows that contain the children.  Column names are 'linktype','childidentifier'.
 	*/
 	public IResultSet getDocumentChildren(Long jobID, String parentIDHash)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -625,7 +625,7 @@
 	*@return a set of document identifier hashes that constitute parents of the specified identifier.
 	*/
 	public String[] getDocumentUniqueParents(Long jobID, String childIDHash)
-		throws MetacartaException
+		throws LCFException
 	{
 		ArrayList list = new ArrayList();
 		list.add(jobID);
@@ -668,7 +668,7 @@
 	/** Conditionally do analyze operation.
 	*/
 	public void conditionallyAnalyzeTables()
-		throws MetacartaException
+		throws LCFException
 	{
 		if (tracker.checkAnalyze())
 		{
@@ -816,7 +816,7 @@
 		*@return true if it should be included, false otherwise.
 		*/
 		public boolean checkInclude(IResultRow row)
-			throws MetacartaException
+			throws LCFException
 		{
 			Long jobID = (Long)row.getValue(jobIDField);
 			String linkType = (String)row.getValue(linkTypeField);
@@ -841,7 +841,7 @@
 		*@return true if we need to keep going, or false if we are done.
 		*/
 		public boolean checkContinue()
-			throws MetacartaException
+			throws LCFException
 		{
 			return true;
 		}



Mime
View raw message