[Bigdata-commit] SF.net SVN: bigdata:[7875]
branches/RDR/bigdata-gas/src/java/com/bigdata/ rdf/graph
From: <tho...@us...> - 2014-02-23 00:21:35
|
Revision: 7875 http://sourceforge.net/p/bigdata/code/7875 Author: thompsonbry Date: 2014-02-23 00:21:30 +0000 (Sun, 23 Feb 2014) Log Message: ----------- Adjusted the fence post for maxIterations such that a value of ONE causes the algorithm to halt after the first round. Updated the documentation to match. Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java 2014-02-23 00:18:40 UTC (rev 7874) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASContext.java 2014-02-23 00:21:30 UTC (rev 7875) @@ -55,7 +55,8 @@ IGraphAccessor getGraphAccessor(); /** - * Specify the maximum number of iterations for the algorithm. + * Specify the maximum number of iterations for the algorithm. A value of + * ONE means that the algorithm will halt after the first round. * * @param newValue * The maximum number of iterations. Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java 2014-02-23 00:18:40 UTC (rev 7874) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASContext.java 2014-02-23 00:21:30 UTC (rev 7875) @@ -137,7 +137,7 @@ * GASStats. */ - if (total.getNRounds() >= getMaxIterations()) { + if (total.getNRounds() + 1 >= getMaxIterations()) { log.warn("Halting: maxIterations=" + getMaxIterations() + ", #rounds=" + total.getNRounds()); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
[Bigdata-commit] SF.net SVN: bigdata:[7880]
branches/RDR/bigdata-gas/src/java/com/bigdata/ rdf/graph
From: <tho...@us...> - 2014-02-24 12:51:26
|
Revision: 7880 http://sourceforge.net/p/bigdata/code/7880 Author: thompsonbry Date: 2014-02-24 12:51:24 +0000 (Mon, 24 Feb 2014) Log Message: ----------- Modified IGASEngine to report the #of threads in the thread pool. Javadoc related to an approach for implementing a parallel reduction operator. Javadoc linking to the wiki page for the GAS API and GASService. Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASEngine.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASEngine.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASEngine.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASEngine.java 2014-02-24 12:49:05 UTC (rev 7879) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASEngine.java 2014-02-24 12:51:24 UTC (rev 7880) @@ -64,8 +64,13 @@ */ void shutdownNow(); + /** + * The parallelism for the SCATTER and GATHER phases. + */ + int getNThreads(); + /* - * TODO This is a problem since we then need to scope the SailConnection + * Note: This is a problem since we then need to scope the SailConnection * internally. */ // /** Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-02-24 12:49:05 UTC (rev 7879) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-02-24 12:51:24 UTC (rev 7880) @@ -238,7 +238,11 @@ * @return The edge decoded from that vertex and <code>null</code> iff the * vertex is not an edge. * - * TODO RDR : Link to an RDR wiki page as well. + * @see <a href="http://www.bigdata.com/whitepapers/reifSPARQL.pdf" > + * Reification Done Right </a> + * + * @see <a href="http://wiki.bigdata.com/wiki/index.php/RDF_GAS_API" > RDF + * GAS API</a> */ Statement decodeStatement(Value v); Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASEngine.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASEngine.java 2014-02-24 12:49:05 UTC (rev 7879) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASEngine.java 2014-02-24 12:51:24 UTC (rev 7880) @@ -90,9 +90,7 @@ */ private final AtomicReference<Class<IGASSchedulerImpl>> schedulerClassRef; - /** - * The parallelism for the SCATTER and GATHER phases. - */ + @Override public int getNThreads() { return nthreads; Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-02-24 12:49:05 UTC (rev 7879) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-02-24 12:51:24 UTC (rev 7880) @@ -324,6 +324,12 @@ * Note: We can not do a parallel reduction right now because the backing * class does not expose a parallel iterator, e.g., a segment-wise iterator. * The reduction over the {@link #vertexState} is quite slow as a result. + * <p> + * It looks like bulk parallel operators will be eventually introduced into + * the Java concurrency collections. For now, it seems like the short term + * solution would be to drop them onto stripped lists at the same time that + * they are first inserted into the CHM. I could then read over those + * striped lists in parallel during the reduction. */ @Override public <T> T reduce(final IReducer<VS, ES, ST, T> op) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |