manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1695876 - in /manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system: ManifoldCF.java PriorityCalculator.java SeedingActivity.java WorkerThread.java
Date Fri, 14 Aug 2015 12:23:55 GMT
Author: kwright
Date: Fri Aug 14 12:23:54 2015
New Revision: 1695876

URL: http://svn.apache.org/r1695876
Log:
More logging improvements.  Part of CONNECTORS-1227.

Modified:
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/PriorityCalculator.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java
    manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1695876&r1=1695875&r2=1695876&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java
Fri Aug 14 12:23:54 2015
@@ -1053,7 +1053,7 @@ public class ManifoldCF extends org.apac
       DocumentDescription dd = requeueCandidates[q];
       String[] bins = calculateBins(connector,dd.getDocumentIdentifier());
       binNames[q] = bins;
-      docPriorities[q] = new PriorityCalculator(rt,connection,bins);
+      docPriorities[q] = new PriorityCalculator(rt,connection,bins,dd.getDocumentIdentifier());
       q++;
     }
 
@@ -1242,7 +1242,7 @@ public class ManifoldCF extends org.apac
         else
           // Get the bins for the document identifier
           binNames = connector.getBinNames(descs[i].getDocumentIdentifier());
-        PriorityCalculator p = new PriorityCalculator(rt,minimumDepth,connection,binNames);
+        PriorityCalculator p = new PriorityCalculator(rt,minimumDepth,connection,binNames,descs[i].getDocumentIdentifier());
         priorities[i] = p;
         p.makePreloadRequest();
       }

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/PriorityCalculator.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/PriorityCalculator.java?rev=1695876&r1=1695875&r2=1695876&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/PriorityCalculator.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/PriorityCalculator.java
Fri Aug 14 12:23:54 2015
@@ -37,6 +37,7 @@ public class PriorityCalculator implemen
 
   protected final IRepositoryConnection connection;
   protected final String[] binNames;
+  protected final String documentIdentifier;
   protected final IReprioritizationTracker rt;
   
   protected final double[] binCountScaleFactors;
@@ -45,15 +46,16 @@ public class PriorityCalculator implemen
   protected Double cachedValue = null;
   
   /** Constructor. */
-  public PriorityCalculator(IReprioritizationTracker rt, IRepositoryConnection connection,
String[] documentBins)
+  public PriorityCalculator(IReprioritizationTracker rt, IRepositoryConnection connection,
String[] documentBins, String documentIdentifier)
     throws ManifoldCFException
   {
-    this(rt,rt.getMinimumDepth(),connection,documentBins);
+    this(rt,rt.getMinimumDepth(),connection,documentBins,documentIdentifier);
   }
   
-  public PriorityCalculator(IReprioritizationTracker rt, double currentMinimumDepth, IRepositoryConnection
connection, String[] documentBins)
+  public PriorityCalculator(IReprioritizationTracker rt, double currentMinimumDepth, IRepositoryConnection
connection, String[] documentBins, String documentIdentifier)
     throws ManifoldCFException
   {
+    this.documentIdentifier = documentIdentifier;
     this.connection = connection;
     this.binNames = documentBins;
     this.rt = rt;
@@ -173,7 +175,7 @@ public class PriorityCalculator implemen
       {
         sb.append(binNames[k++]).append(" ");
       }
-      Logging.scheduling.debug("Document with bins ["+sb.toString()+"] given priority value
"+new Double(returnValue).toString());
+      Logging.scheduling.debug("Document '"+documentIdentifier+"' with bins ["+sb.toString()+"]
given priority value "+new Double(returnValue).toString());
     }
 
     cachedValue = new Double(returnValue);

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java?rev=1695876&r1=1695875&r2=1695876&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/SeedingActivity.java
Fri Aug 14 12:23:54 2015
@@ -223,7 +223,7 @@ public class SeedingActivity implements
     {
       // Calculate desired document priority based on current queuetracker status.
       String[] bins = connector.getBinNames(docIDs[i]);
-      PriorityCalculator p = new PriorityCalculator(rt,connection,bins);
+      PriorityCalculator p = new PriorityCalculator(rt,connection,bins,docIDs[i]);
       docPriorities[i] = p;
       p.makePreloadRequest();
     }

Modified: manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java?rev=1695876&r1=1695875&r2=1695876&view=diff
==============================================================================
--- manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
(original)
+++ manifoldcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/WorkerThread.java
Fri Aug 14 12:23:54 2015
@@ -1934,7 +1934,7 @@ public class WorkerThread extends Thread
 
           // Calculate desired document priority based on current queuetracker status.
           String[] bins = ManifoldCF.calculateBins(connector,dr.getLocalIdentifier());
-          PriorityCalculator p = new PriorityCalculator(rt,currentMinimumDepth,connection,bins);
+          PriorityCalculator p = new PriorityCalculator(rt,currentMinimumDepth,connection,bins,dr.getLocalIdentifier());
           priorities[j] = p;
           p.makePreloadRequest();
         }



Mime
View raw message