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 2010/08/23 20:08:42 UTC
svn commit: r988237 [18/24] - in /incubator/lcf/trunk:
modules/connectors/activedirectory/connector/org/apache/acf/authorities/authorities/activedirectory/
modules/connectors/documentum/connector/org/apache/acf/crawler/authorities/DCTM/
modules/connect...
Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopCount.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopCount.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopCount.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopCount.java Mon Aug 23 18:08:32 2010
@@ -23,7 +23,7 @@ import java.util.*;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
/** This class manages the table that keeps track of hop count, and algorithmically determines this value
* for a document identifier upon request.
@@ -145,7 +145,7 @@ public class HopCount extends org.apache
*@param database is the database handle.
*/
public HopCount(IThreadContext tc, IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"hopcount");
this.threadContext = tc;
@@ -156,7 +156,7 @@ public class HopCount extends org.apache
/** Install or upgrade.
*/
public void install(String jobsTable, String jobsColumn)
- throws LCFException
+ throws ACFException
{
// Per convention, always have outer loop in install() methods
while (true)
@@ -222,7 +222,7 @@ public class HopCount extends org.apache
/** Uninstall.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -231,7 +231,7 @@ public class HopCount extends org.apache
intrinsicLinkManager.deinstall();
performDrop(null);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -253,11 +253,11 @@ public class HopCount extends org.apache
*@return the status value.
*/
public static int stringToMark(String value)
- throws LCFException
+ throws ACFException
{
Integer x = (Integer)markMap.get(value);
if (x == null)
- throw new LCFException("Bad mark value: '"+value+"'");
+ throw new ACFException("Bad mark value: '"+value+"'");
return x.intValue();
}
@@ -266,7 +266,7 @@ public class HopCount extends org.apache
*@return the string.
*/
public static String markToString(int mark)
- throws LCFException
+ throws ACFException
{
switch (mark)
{
@@ -277,14 +277,14 @@ public class HopCount extends org.apache
case MARK_DELETING:
return "D";
default:
- throw new LCFException("Bad mark value");
+ throw new ACFException("Bad mark value");
}
}
/** Delete an owner (and clean up the corresponding hopcount rows).
*/
public void deleteOwner(Long jobID)
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -301,7 +301,7 @@ public class HopCount extends org.apache
performDelete("WHERE "+jobIDField+"=?",list,null);
reindexTracker.noteInsert();
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -320,14 +320,14 @@ public class HopCount extends org.apache
/** Reset, at startup time.
*/
public void reset()
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
{
intrinsicLinkManager.reset();
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -347,7 +347,7 @@ public class HopCount extends org.apache
* will have a null linktype.
*/
public void recordSeedReferences(Long jobID, String[] legalLinkTypes, String[] targetDocumentIDHashes, int hopcountMethod)
- throws LCFException
+ throws ACFException
{
doRecord(jobID,legalLinkTypes,"",targetDocumentIDHashes,"",hopcountMethod);
}
@@ -355,7 +355,7 @@ public class HopCount extends org.apache
/** 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 LCFException
+ throws ACFException
{
doFinish(jobID,legalLinkTypes,new String[]{""},hopcountMethod);
}
@@ -364,7 +364,7 @@ public class HopCount extends org.apache
*/
public void recordReference(Long jobID, String[] legalLinkTypes, String sourceDocumentIDHash, String targetDocumentIDHash, String linkType,
int hopcountMethod)
- throws LCFException
+ throws ACFException
{
doRecord(jobID,legalLinkTypes,sourceDocumentIDHash,new String[]{targetDocumentIDHash},linkType,hopcountMethod);
}
@@ -373,7 +373,7 @@ public class HopCount extends org.apache
*/
public void recordReferences(Long jobID, String[] legalLinkTypes, String sourceDocumentIDHash, String[] targetDocumentIDHashes, String linkType,
int hopcountMethod)
- throws LCFException
+ throws ACFException
{
doRecord(jobID,legalLinkTypes,sourceDocumentIDHash,targetDocumentIDHashes,linkType,hopcountMethod);
}
@@ -382,7 +382,7 @@ public class HopCount extends org.apache
* 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 LCFException
+ throws ACFException
{
doFinish(jobID,legalLinkTypes,sourceDocumentHashes,hopcountMethod);
}
@@ -390,7 +390,7 @@ public class HopCount extends org.apache
/** Do the work of recording source-target references. */
protected void doRecord(Long jobID, String[] legalLinkTypes, String sourceDocumentIDHash, String[] targetDocumentIDHashes, String linkType,
int hopcountMethod)
- throws LCFException
+ throws ACFException
{
// We have to both add the reference, AND invalidate appropriate cached hopcounts (if it is a NEW
@@ -497,7 +497,7 @@ public class HopCount extends org.apache
Logging.hopcount.debug("Done queueing "+Integer.toString(targetDocumentIDHashes.length)+" documents");
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -519,7 +519,7 @@ public class HopCount extends org.apache
public void deleteMatchingDocuments(Long jobID, String[] legalLinkTypes,
String sourceTableName,
String sourceTableIDColumn, String sourceTableJobColumn, String sourceTableCriteria, int hopcountMethod)
- throws LCFException
+ throws ACFException
{
// This should work similarly to deleteDocumentIdentifiers() except that the identifiers
// come from a subquery rather than a list.
@@ -535,7 +535,7 @@ public class HopCount extends org.apache
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -557,7 +557,7 @@ public class HopCount extends org.apache
* 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 LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -577,7 +577,7 @@ public class HopCount extends org.apache
doDeleteInvalidation(jobID,legalLinkTypes,false,sourceDocumentHashes,null,null,null,null);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -597,7 +597,7 @@ public class HopCount extends org.apache
* 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 LCFException
+ throws ACFException
{
// No transaction, since we can happily interpret whatever comes back.
StringBuffer sb = new StringBuffer();
@@ -644,7 +644,7 @@ public class HopCount extends org.apache
/** Process a portion of a find request for hopcount information.
*/
protected void processFind(int[] rval, Map rvalMap, String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
IResultSet set = performQuery("SELECT "+distanceField+","+parentIDHashField+" FROM "+getTableName()+" WHERE "+query,list,null,null);
int i = 0;
@@ -662,7 +662,7 @@ public class HopCount extends org.apache
*@return true if the queue is empty.
*/
public boolean processQueue(Long jobID, String[] legalLinkTypes, int hopcountMethod)
- throws LCFException
+ throws ACFException
{
// 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
@@ -716,7 +716,7 @@ public class HopCount extends org.apache
/** Limited find for missing records.
*/
protected void performFindMissingRecords(String query, ArrayList list, Map matchMap)
- throws LCFException
+ throws ACFException
{
// The naive query is this - but postgres does not find the index this way:
//IResultSet set = performQuery("SELECT "+parentIDField+","+linkTypeField+" FROM "+getTableName()+" WHERE "+
@@ -755,7 +755,7 @@ public class HopCount extends org.apache
*/
protected void addToProcessingQueue(Long jobID, String[] affectedLinkTypes, String[] documentIDHashes,
Answer[] startingAnswers, String sourceDocumentIDHash, String linkType, int hopcountMethod)
- throws LCFException
+ throws ACFException
{
// 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
@@ -983,7 +983,7 @@ public class HopCount extends org.apache
// A minimal path, not THE minimal path.
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -1002,7 +1002,7 @@ public class HopCount extends org.apache
/** Do the work of marking add-dep-dependent links in the hopcount table. */
protected void performMarkAddDeps(String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
HashMap map = new HashMap();
map.put(markForDeathField,markToString(MARK_QUEUED));
@@ -1012,7 +1012,7 @@ public class HopCount extends org.apache
/** Method that does the work of "finishing" a set of child references. */
protected void doFinish(Long jobID, String[] legalLinkTypes, String[] sourceDocumentHashes, int hopcountMethod)
- throws LCFException
+ throws ACFException
{
// Go into a transaction!
beginTransaction();
@@ -1037,7 +1037,7 @@ public class HopCount extends org.apache
// Make all new and existing links become just "base" again.
intrinsicLinkManager.restoreLinks(jobID,sourceDocumentHashes);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -1061,7 +1061,7 @@ public class HopCount extends org.apache
protected void doDeleteInvalidation(Long jobID, String[] legalLinkTypes, boolean existingOnly,
String[] sourceDocumentHashes, String sourceTableName,
String sourceTableIDColumn, String sourceTableJobColumn, String sourceTableCriteria)
- throws LCFException
+ throws ACFException
{
String commonNewExpression = null;
@@ -1209,7 +1209,7 @@ public class HopCount extends org.apache
}
protected void markForDelete(String query, ArrayList list, String commonNewExpression)
- throws LCFException
+ throws ACFException
{
StringBuffer sb = new StringBuffer("WHERE ");
sb.append(idField).append(" IN(SELECT ").append(deleteDepsManager.ownerIDField).append(" FROM ")
@@ -1236,7 +1236,7 @@ public class HopCount extends org.apache
*@return rows that contain the children. Column names are 'linktype','childidentifier'.
*/
protected IResultSet getDocumentChildren(Long jobID, String documentIDHash)
- throws LCFException
+ throws ACFException
{
return intrinsicLinkManager.getDocumentChildren(jobID,documentIDHash);
}
@@ -1250,7 +1250,7 @@ public class HopCount extends org.apache
*@return the corresponding list of nodes, taking into account unknown distances.
*/
protected DocumentNode[] readCachedNodes(Long jobID, Question[] unansweredQuestions)
- throws LCFException
+ throws ACFException
{
// This all goes in a transaction; we want to insure that the data we grab is self-consistent.
beginTransaction();
@@ -1349,7 +1349,7 @@ public class HopCount extends org.apache
return rval;
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -1367,7 +1367,7 @@ public class HopCount extends org.apache
/** Do a limited fetch of cached distance dependencies */
protected void performGetCachedDistanceDeps(Map depsMap, String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
IResultSet set = performQuery("SELECT "+deleteDepsManager.ownerIDField+","+
deleteDepsManager.linkTypeField+","+
@@ -1431,7 +1431,7 @@ public class HopCount extends org.apache
/** Do a limited fetch of cached distances */
protected void performGetCachedDistances(DocumentNode[] rval, Map indexMap, Map depsMap, String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
IResultSet set = performQuery("SELECT "+idField+","+parentIDHashField+","+linkTypeField+","+distanceField+","+markForDeathField+
" FROM "+getTableName()+" WHERE "+query,list,null,null);
@@ -1476,7 +1476,7 @@ public class HopCount extends org.apache
else
{
Logging.hopcount.error("Document '"+parentIDHash+"' linktype '"+linkType+"' is labeled with 'DELETING'!");
- throw new LCFException("Algorithm transaction error!");
+ throw new ACFException("Algorithm transaction error!");
}
}
@@ -1502,7 +1502,7 @@ public class HopCount extends org.apache
/** Write a distance into the cache.
*/
protected void writeCachedDistance(Long jobID, String[] legalLinkTypes, DocumentNode dn, int hopcountMethod)
- throws LCFException
+ throws ACFException
{
Question q = dn.getQuestion();
String linkType = q.getLinkType();
@@ -1554,7 +1554,7 @@ public class HopCount extends org.apache
// Since infinity is not a reduction of any kind, we're done here.
return;
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -1576,7 +1576,7 @@ public class HopCount extends org.apache
{
Logging.hopcount.error("Existing distance "+Integer.toString(existingDistance)+" better than new distance "+
Integer.toString(answerValue)+" for '"+parentIDHash+"' linktype '"+linkType+"'");
- throw new LCFException("Existing distance is better than new distance! Failure.");
+ throw new ACFException("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.
@@ -1614,14 +1614,14 @@ public class HopCount extends org.apache
IResultSet set = performQuery("SHOW TRANSACTION ISOLATION LEVEL",null, null,null);
if (set.getRowCount() != 1)
- throw new LCFException("Unexpected return: no rows");
+ throw new ACFException("Unexpected return: no rows");
IResultRow row = set.getRow(0);
if (row.getColumnCount() != 1)
- throw new LCFException("Unexpected return: no columns");
+ throw new ACFException("Unexpected return: no columns");
Iterator itera = row.getColumns();
String columnName = (String)itera.next();
if (row.getValue(columnName).toString().indexOf("serializ") == -1)
- throw new LCFException("Not in a serializable transaction! "+row.getValue(columnName).toString());
+ throw new ACFException("Not in a serializable transaction! "+row.getValue(columnName).toString());
*/
// Drop these into a hash map.
@@ -1696,7 +1696,7 @@ public class HopCount extends org.apache
addToProcessingQueue(jobID,new String[]{linkType},targetDocumentIDHashes,new Answer[]{answer},parentIDHash,linkType,hopcountMethod);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -1770,7 +1770,7 @@ public class HopCount extends org.apache
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -1789,7 +1789,7 @@ public class HopCount extends org.apache
/** Conditionally do analyze operation.
*/
public void conditionallyAnalyzeTables()
- throws LCFException
+ throws ACFException
{
if (tracker.checkAnalyze())
{
@@ -2556,7 +2556,7 @@ public class HopCount extends org.apache
/** Throw in some questions, and prepare for the answers. */
public int[] askQuestions(Question[] questions)
- throws LCFException
+ throws ACFException
{
if (Logging.hopcount.isDebugEnabled())
{
@@ -2606,7 +2606,7 @@ public class HopCount extends org.apache
while (true)
{
if (Thread.currentThread().isInterrupted())
- throw new LCFException("Interrupted",LCFException.INTERRUPTED);
+ throw new ACFException("Interrupted",ACFException.INTERRUPTED);
// Early decision!
// For each question, see if there's a completed answer yet
@@ -2695,7 +2695,7 @@ public class HopCount extends org.apache
/** Evaluate a node from the evaluation queue.
*/
protected void evaluateNode(DocumentNode node)
- throws LCFException
+ throws ACFException
{
if (Logging.hopcount.isDebugEnabled())
{
@@ -2857,7 +2857,7 @@ public class HopCount extends org.apache
/** Fetch a the children of a bunch of nodes, and initialize all of the nodes appropriately.
*/
protected void getNodeChildren(DocumentNode[] nodes)
- throws LCFException
+ throws ACFException
{
if (Logging.hopcount.isDebugEnabled())
{
@@ -3125,7 +3125,7 @@ public class HopCount extends org.apache
/** Get the children of a bunch of nodes.
*/
protected void findChildren(Map referenceMap, String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
// Grab the appropriate rows from the intrinsic link table.
IResultSet set = performQuery("SELECT "+intrinsicLinkManager.childIDHashField+","+intrinsicLinkManager.linkTypeField+","+
@@ -3172,7 +3172,7 @@ public class HopCount extends org.apache
* if appropriate.
*/
protected void makeNodeComplete(DocumentNode node)
- throws LCFException
+ throws ACFException
{
node.makeComplete();
// Clean up children.
@@ -3192,7 +3192,7 @@ public class HopCount extends org.apache
*@param questions are the set of questions.
*/
protected DocumentNode[] queueQuestions(Question[] questions)
- throws LCFException
+ throws ACFException
{
DocumentNode[] rval = new DocumentNode[questions.length];
Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopDeleteDeps.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopDeleteDeps.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopDeleteDeps.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopDeleteDeps.java Mon Aug 23 18:08:32 2010
@@ -21,7 +21,7 @@ package org.apache.acf.crawler.jobs;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
import java.util.*;
/** This class manages the table that keeps track of link deletion dependencies for cached
@@ -50,7 +50,7 @@ public class HopDeleteDeps extends org.a
*@param database is the database handle.
*/
public HopDeleteDeps(IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"hopdeletedeps");
}
@@ -58,7 +58,7 @@ public class HopDeleteDeps extends org.a
/** Install or upgrade.
*/
public void install(String jobsTable, String jobsColumn, String hopCountTable, String idColumn)
- throws LCFException
+ throws ACFException
{
// Standard practice: outer retry loop
while (true)
@@ -124,7 +124,7 @@ public class HopDeleteDeps extends org.a
/** Uninstall.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
performDrop(null);
}
@@ -132,7 +132,7 @@ public class HopDeleteDeps extends org.a
/** Analyze job tables that need analysis.
*/
public void analyzeTables()
- throws LCFException
+ throws ACFException
{
long startTime = System.currentTimeMillis();
Logging.perf.debug("Beginning to analyze hopdeletedeps table");
@@ -142,7 +142,7 @@ public class HopDeleteDeps extends org.a
/** Delete a job. */
public void deleteJob(Long jobID)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -154,7 +154,7 @@ public class HopDeleteDeps extends org.a
/** Remove rows that correspond to specific hopcount records.
*/
public void removeMarkedRows(String parentTable, String parentIDHashField, String query, ArrayList queryList)
- throws LCFException
+ throws ACFException
{
// This didn't perform very well.
//performDelete("WHERE EXISTS(SELECT 'x' FROM "+parentTable+" t0 WHERE t0."+parentIDField+"="+ownerIDField+
@@ -170,7 +170,7 @@ public class HopDeleteDeps extends org.a
* size.
*/
public void deleteOwnerRows(Long[] ownerIDs)
- throws LCFException
+ throws ACFException
{
StringBuffer sb = new StringBuffer("WHERE ");
sb.append(ownerIDField).append(" IN(");
@@ -192,7 +192,7 @@ public class HopDeleteDeps extends org.a
*@return the links
*/
public DeleteDependency[] getDeleteDependencies(Long ownerID)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(ownerID);
@@ -213,7 +213,7 @@ public class HopDeleteDeps extends org.a
/** Delete a dependency */
public void deleteDependency(Long ownerID, DeleteDependency dd)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
StringBuffer sb = new StringBuffer("WHERE ");
@@ -242,7 +242,7 @@ public class HopDeleteDeps extends org.a
/** Write a delete dependency.
*/
public void writeDependency(Long ownerID, Long jobID, DeleteDependency dd)
- throws LCFException
+ throws ACFException
{
HashMap map = new HashMap();
map.put(jobIDField,jobID);
@@ -262,7 +262,7 @@ public class HopDeleteDeps extends org.a
/** Conditionally do analyze operation.
*/
public void conditionallyAnalyzeTables()
- throws LCFException
+ throws ACFException
{
if (tracker.checkAnalyze())
{
Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopFilterManager.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopFilterManager.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopFilterManager.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/HopFilterManager.java Mon Aug 23 18:08:32 2010
@@ -40,7 +40,7 @@ public class HopFilterManager extends or
*@param database is the database instance.
*/
public HopFilterManager(IThreadContext threadContext, IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"jobhopfilters");
}
@@ -50,7 +50,7 @@ public class HopFilterManager extends or
*@param owningTablePrimaryKey is the primary key of the owning table.
*/
public void install(String ownerTable, String owningTablePrimaryKey)
- throws LCFException
+ throws ACFException
{
// Standard practice: outer loop
while (true)
@@ -99,7 +99,7 @@ public class HopFilterManager extends or
/** Uninstall.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
performDrop(null);
}
@@ -109,7 +109,7 @@ public class HopFilterManager extends or
*@return a map of link type to max hop count (as a Long).
*/
public Map readRows(Long id)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(id);
@@ -136,7 +136,7 @@ public class HopFilterManager extends or
*@param ownerIDParams is the corresponding set of owner id parameters.
*/
public void getRows(Map returnValues, String ownerIDList, ArrayList ownerIDParams)
- throws LCFException
+ throws ACFException
{
IResultSet set = performQuery("SELECT * FROM "+getTableName()+" WHERE "+ownerIDField+" IN ("+ownerIDList+")",ownerIDParams,
null,null);
@@ -157,7 +157,7 @@ public class HopFilterManager extends or
*@param list is the job description to write hopcount filters for.
*/
public void writeRows(Long ownerID, IJobDescription list)
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -177,7 +177,7 @@ public class HopFilterManager extends or
performInsert(map,null);
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -197,7 +197,7 @@ public class HopFilterManager extends or
*@param ownerID is the owner whose rows to delete.
*/
public void deleteRows(Long ownerID)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(ownerID);
Modified: incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/IntrinsicLink.java
URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/IntrinsicLink.java?rev=988237&r1=988236&r2=988237&view=diff
==============================================================================
--- incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/IntrinsicLink.java (original)
+++ incubator/lcf/trunk/modules/framework/pull-agent/org/apache/acf/crawler/jobs/IntrinsicLink.java Mon Aug 23 18:08:32 2010
@@ -23,7 +23,7 @@ import java.util.*;
import org.apache.acf.core.interfaces.*;
import org.apache.acf.crawler.interfaces.*;
import org.apache.acf.crawler.system.Logging;
-import org.apache.acf.crawler.system.LCF;
+import org.apache.acf.crawler.system.ACF;
/** This class manages the table that keeps track of intrinsic relationships between documents.
*/
@@ -70,7 +70,7 @@ public class IntrinsicLink extends org.a
*@param database is the database handle.
*/
public IntrinsicLink(IDBInterface database)
- throws LCFException
+ throws ACFException
{
super(database,"intrinsiclink");
}
@@ -78,7 +78,7 @@ public class IntrinsicLink extends org.a
/** Install or upgrade.
*/
public void install(String jobsTable, String jobsColumn)
- throws LCFException
+ throws ACFException
{
// 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)
@@ -141,7 +141,7 @@ public class IntrinsicLink extends org.a
/** Uninstall.
*/
public void deinstall()
- throws LCFException
+ throws ACFException
{
performDrop(null);
}
@@ -149,7 +149,7 @@ public class IntrinsicLink extends org.a
/** Analyze job tables that need analysis.
*/
public void analyzeTables()
- throws LCFException
+ throws ACFException
{
long startTime = System.currentTimeMillis();
Logging.perf.debug("Beginning to analyze intrinsiclink table");
@@ -160,7 +160,7 @@ public class IntrinsicLink extends org.a
/** Delete an owner (and clean up the corresponding hopcount rows).
*/
public void deleteOwner(Long jobID)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -174,7 +174,7 @@ public class IntrinsicLink extends org.a
* is processed, the links will be updated properly.
*/
public void reset()
- throws LCFException
+ throws ACFException
{
HashMap map = new HashMap();
ArrayList list = new ArrayList();
@@ -188,7 +188,7 @@ public class IntrinsicLink extends org.a
*@return the target document ID's that are considered "new".
*/
public String[] recordReferences(Long jobID, String sourceDocumentIDHash, String[] targetDocumentIDHashes, String linkType)
- throws LCFException
+ throws ACFException
{
// Need to go into a transaction because we need to distinguish between update and insert.
beginTransaction();
@@ -280,7 +280,7 @@ public class IntrinsicLink extends org.a
}
return newReferences;
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -299,7 +299,7 @@ public class IntrinsicLink extends org.a
/** Do the exists check, in batch. */
protected void performExistsCheck(Map presentMap, String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
IResultSet result = performQuery("SELECT "+parentIDHashField+" FROM "+getTableName()+" WHERE "+query+" FOR UPDATE",list,null,null);
int i = 0;
@@ -317,7 +317,7 @@ public class IntrinsicLink extends org.a
public void removeLinks(Long jobID, String commonNewExpression, String[] sourceDocumentIDHashes,
String sourceTableName,
String sourceTableIDColumn, String sourceTableJobColumn, String sourceTableCriteria)
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -364,7 +364,7 @@ public class IntrinsicLink extends org.a
reindexTracker.noteInsert();
}
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -382,7 +382,7 @@ public class IntrinsicLink extends org.a
}
protected void performRemoveLinks(String query, ArrayList list, String commonNewExpression)
- throws LCFException
+ throws ACFException
{
StringBuffer sb = new StringBuffer("WHERE (");
sb.append(query).append(")");
@@ -394,7 +394,7 @@ public class IntrinsicLink extends org.a
/** Return all target links of the specified source documents to their base state.
*/
public void restoreLinks(Long jobID, String[] sourceDocumentIDHashes)
- throws LCFException
+ throws ACFException
{
beginTransaction();
try
@@ -426,7 +426,7 @@ public class IntrinsicLink extends org.a
if (k > 0)
performRestoreLinks(sb.toString(),list);
}
- catch (LCFException e)
+ catch (ACFException e)
{
signalRollback();
throw e;
@@ -444,7 +444,7 @@ public class IntrinsicLink extends org.a
}
protected void performRestoreLinks(String query, ArrayList list)
- throws LCFException
+ throws ACFException
{
StringBuffer sb = new StringBuffer("WHERE (");
sb.append(query).append(") AND (").append(newField).append("=? OR ").append(newField).append("=?)");
@@ -459,7 +459,7 @@ public class IntrinsicLink extends org.a
*@return rows that contain the children. Column names are 'linktype','childidentifier'.
*/
public IResultSet getDocumentChildren(Long jobID, String parentIDHash)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -472,7 +472,7 @@ public class IntrinsicLink extends org.a
*@return a set of document identifier hashes that constitute parents of the specified identifier.
*/
public String[] getDocumentUniqueParents(Long jobID, String childIDHash)
- throws LCFException
+ throws ACFException
{
ArrayList list = new ArrayList();
list.add(jobID);
@@ -515,7 +515,7 @@ public class IntrinsicLink extends org.a
/** Conditionally do analyze operation.
*/
public void conditionallyAnalyzeTables()
- throws LCFException
+ throws ACFException
{
if (tracker.checkAnalyze())
{
@@ -663,7 +663,7 @@ public class IntrinsicLink extends org.a
*@return true if it should be included, false otherwise.
*/
public boolean checkInclude(IResultRow row)
- throws LCFException
+ throws ACFException
{
Long jobID = (Long)row.getValue(jobIDField);
String linkType = (String)row.getValue(linkTypeField);
@@ -688,7 +688,7 @@ public class IntrinsicLink extends org.a
*@return true if we need to keep going, or false if we are done.
*/
public boolean checkContinue()
- throws LCFException
+ throws ACFException
{
return true;
}