From: <tho...@us...> - 2011-02-25 21:18:07
|
Revision: 4250 http://bigdata.svn.sourceforge.net/bigdata/?rev=4250&view=rev Author: thompsonbry Date: 2011-02-25 21:18:01 +0000 (Fri, 25 Feb 2011) Log Message: ----------- Modified Haltable#halted() to use the message "Halted" in the thrown RuntimeException as this is a normal halt. Modified PipelineJoin to log normal termination @ DEBUG. Modified Paths: -------------- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/util/concurrent/Haltable.java Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2011-02-24 23:15:17 UTC (rev 4249) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/bop/join/PipelineJoin.java 2011-02-25 21:18:01 UTC (rev 4250) @@ -592,6 +592,9 @@ /** * An optional limit on the #of solutions to be produced. The limit is * ignored if it is {@link Long#MAX_VALUE}. + * <p> + * Note: Invoking {@link #halt(Object)} is necessary to enforce the + * limit. * * @see Annotations#LIMIT */ @@ -1094,8 +1097,10 @@ throw new RuntimeException("Halting join: " + t, t); } // normal termination - ignore exception. - log.warn("Caught and ignored exception: "+t); return null; - + if (log.isDebugEnabled()) + log.debug("Caught and ignored exception: " + t); + return null; + } } @@ -1632,7 +1637,7 @@ log.info("Breaking query @ limit: limit=" + limit + ", exactOutputCount=" + exactOutputCount.get()); -// halt((Void) null); + halt((Void) null); return null; } @@ -1677,10 +1682,14 @@ while (itr.hasNext()) { + halted(); + final Object[] chunk = itr.nextChunk(); - stats.accessPathChunksIn.increment(); + stats.accessPathChunksIn.increment(); +// System.err.println("#chunks="+stats.accessPathChunksIn+", chunkSize="+chunk.length); + // process the chunk in the caller's thread. new ChunkTask(bindingSets, naccepted, unsyncBuffer, chunk).call(); @@ -1727,7 +1736,7 @@ log.info("Breaking query @ limit: limit=" + limit + ", exactOutputCount=" + exactOutputCount.get()); -// halt((Void) null); + halt((Void) null); break; } @@ -1947,7 +1956,7 @@ log.info("Breaking query @ limit: limit=" + limit + ", exactOutputCount=" + exactOutputCount.get()); -// halt((Void) null); + halt((Void) null); break; } @@ -2145,7 +2154,7 @@ log.info("Breaking query @ limit: limit=" + limit + ", exactOutputCount=" + exactOutputCount.get()); -// halt((Void) null); + halt((Void) null); break; } Modified: branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/util/concurrent/Haltable.java =================================================================== --- branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/util/concurrent/Haltable.java 2011-02-24 23:15:17 UTC (rev 4249) +++ branches/QUADS_QUERY_BRANCH/bigdata/src/java/com/bigdata/util/concurrent/Haltable.java 2011-02-25 21:18:01 UTC (rev 4250) @@ -205,7 +205,7 @@ * running (since it invoked halted() it must be running). Since * it is running, */ - throw new RuntimeException(); + throw new RuntimeException("Halted"); } throw new RuntimeException(firstCause); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |