Return-Path: X-Original-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-connectors-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C883E90D5 for ; Sun, 6 Nov 2011 19:26:57 +0000 (UTC) Received: (qmail 51771 invoked by uid 500); 6 Nov 2011 19:26:57 -0000 Delivered-To: apmail-incubator-connectors-commits-archive@incubator.apache.org Received: (qmail 51730 invoked by uid 500); 6 Nov 2011 19:26:57 -0000 Mailing-List: contact connectors-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: connectors-dev@incubator.apache.org Delivered-To: mailing list connectors-commits@incubator.apache.org Received: (qmail 51723 invoked by uid 99); 6 Nov 2011 19:26:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2011 19:26:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 06 Nov 2011 19:26:53 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 4692F2388900; Sun, 6 Nov 2011 19:26:32 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1198541 - in /incubator/lcf/trunk: ./ framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ site/src/documentation/content/xdocs/ tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/ Date: Sun, 06 Nov 2011 19:26:31 -0000 To: connectors-commits@incubator.apache.org From: kwright@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20111106192632.4692F2388900@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: kwright Date: Sun Nov 6 19:26:31 2011 New Revision: 1198541 URL: http://svn.apache.org/viewvc?rev=1198541&view=rev Log: Finish CONNECTORS-285. Modified: incubator/lcf/trunk/CHANGES.txt incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java incubator/lcf/trunk/site/src/documentation/content/xdocs/programmatic-operation.xml incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityHSQLDBIT.java incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityIT.java incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityPostgresqlIT.java Modified: incubator/lcf/trunk/CHANGES.txt URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/CHANGES.txt?rev=1198541&r1=1198540&r2=1198541&view=diff ============================================================================== --- incubator/lcf/trunk/CHANGES.txt (original) +++ incubator/lcf/trunk/CHANGES.txt Sun Nov 6 19:26:31 2011 @@ -3,6 +3,11 @@ $Id$ ======================= 0.4-dev ===================== +CONNECTORS-285: Provide a way through the IJobManager interface +and through the API to check on the status of a job without asking +for the counts of documents, which yields a full table scan. +(Karl Wright) + CONNECTORS-279: Prevent reindex or analyze from taking place within a transaction. This was causing hangs on our load tests. (Karl Wright) Modified: incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java?rev=1198541&r1=1198540&r2=1198541&view=diff ============================================================================== --- incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java (original) +++ incubator/lcf/trunk/framework/pull-agent/src/main/java/org/apache/manifoldcf/crawler/system/ManifoldCF.java Sun Nov 6 19:26:31 2011 @@ -1441,6 +1441,26 @@ public class ManifoldCF extends org.apac createErrorNode(output,e); } } + else if (path.startsWith("jobstatusesnocounts/")) + { + String jobID = path.substring("jobstatusesnocounts/".length()); + + try + { + IJobManager jobManager = JobManagerFactory.make(tc); + JobStatus status = jobManager.getStatus(new Long(jobID),false); + if (status != null) + { + ConfigurationNode jobStatusNode = new ConfigurationNode(API_JOBSTATUSNODE); + formatJobStatus(jobStatusNode,status); + output.addChild(output.getChildCount(),jobStatusNode); + } + } + catch (ManifoldCFException e) + { + createErrorNode(output,e); + } + } else if (path.equals("outputconnections")) { try Modified: incubator/lcf/trunk/site/src/documentation/content/xdocs/programmatic-operation.xml URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/site/src/documentation/content/xdocs/programmatic-operation.xml?rev=1198541&r1=1198540&r2=1198541&view=diff ============================================================================== --- incubator/lcf/trunk/site/src/documentation/content/xdocs/programmatic-operation.xml (original) +++ incubator/lcf/trunk/site/src/documentation/content/xdocs/programmatic-operation.xml Sun Nov 6 19:26:31 2011 @@ -75,6 +75,7 @@ jobs/<job_id>DELETEDelete a job definitionN/A{ } OR {"error":<error_text>} jobstatusesGETList all jobs and their statusN/A{"job":[<list_of_job_status_objects>]} OR {"error":<error_text>} jobstatuses/<job_id>GETGet a specific job's statusN/A{"jobstatus":<job_status_object>} OR { } OR {"error":<error_text>} + jobstatusesnocounts/<job_id>GETGet a specific job's status, returning '0' for all countsN/A{"jobstatus":<job_status_object>} OR { } OR {"error":<error_text>} start/<job_id>PUTStart a specified job manuallyN/A{ } OR {"error":<error_text>} abort/<job_id>PUTAbort a specified jobN/A{ } OR {"error":<error_text>} restart/<job_id>PUTStop and start a specified jobN/A{ } OR {"error":<error_text>} Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityHSQLDBIT.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityHSQLDBIT.java?rev=1198541&r1=1198540&r2=1198541&view=diff ============================================================================== --- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityHSQLDBIT.java (original) +++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityHSQLDBIT.java Sun Nov 6 19:26:31 2011 @@ -316,7 +316,7 @@ public class APISanityHSQLDBIT extends B protected String getJobStatus(String jobIDString) throws Exception { - Configuration result = performAPIGetOperationViaNodes("jobstatuses/"+jobIDString,200); + Configuration result = performAPIGetOperationViaNodes("jobstatusesnocounts/"+jobIDString,200); String status = null; int i = 0; while (i < result.getChildCount()) Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityIT.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityIT.java?rev=1198541&r1=1198540&r2=1198541&view=diff ============================================================================== --- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityIT.java (original) +++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityIT.java Sun Nov 6 19:26:31 2011 @@ -316,7 +316,7 @@ public class APISanityIT extends Base protected String getJobStatus(String jobIDString) throws Exception { - Configuration result = performAPIGetOperationViaNodes("jobstatuses/"+jobIDString,200); + Configuration result = performAPIGetOperationViaNodes("jobstatusesnocounts/"+jobIDString,200); String status = null; int i = 0; while (i < result.getChildCount()) Modified: incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityPostgresqlIT.java URL: http://svn.apache.org/viewvc/incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityPostgresqlIT.java?rev=1198541&r1=1198540&r2=1198541&view=diff ============================================================================== --- incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityPostgresqlIT.java (original) +++ incubator/lcf/trunk/tests/filesystem/src/test/java/org/apache/manifoldcf/filesystem_tests/APISanityPostgresqlIT.java Sun Nov 6 19:26:31 2011 @@ -316,7 +316,7 @@ public class APISanityPostgresqlIT exten protected String getJobStatus(String jobIDString) throws Exception { - Configuration result = performAPIGetOperationViaNodes("jobstatuses/"+jobIDString,200); + Configuration result = performAPIGetOperationViaNodes("jobstatusesnocounts/"+jobIDString,200); String status = null; int i = 0; while (i < result.getChildCount())