This list is closed, nobody may subscribe to it.
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(139) |
Aug
(94) |
Sep
(232) |
Oct
(143) |
Nov
(138) |
Dec
(55) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2011 |
Jan
(127) |
Feb
(90) |
Mar
(101) |
Apr
(74) |
May
(148) |
Jun
(241) |
Jul
(169) |
Aug
(121) |
Sep
(157) |
Oct
(199) |
Nov
(281) |
Dec
(75) |
2012 |
Jan
(107) |
Feb
(122) |
Mar
(184) |
Apr
(73) |
May
(14) |
Jun
(49) |
Jul
(26) |
Aug
(103) |
Sep
(133) |
Oct
(61) |
Nov
(51) |
Dec
(55) |
2013 |
Jan
(59) |
Feb
(72) |
Mar
(99) |
Apr
(62) |
May
(92) |
Jun
(19) |
Jul
(31) |
Aug
(138) |
Sep
(47) |
Oct
(83) |
Nov
(95) |
Dec
(111) |
2014 |
Jan
(125) |
Feb
(60) |
Mar
(119) |
Apr
(136) |
May
(270) |
Jun
(83) |
Jul
(88) |
Aug
(30) |
Sep
(47) |
Oct
(27) |
Nov
(23) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(3) |
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
(4) |
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <tob...@us...> - 2014-04-07 23:57:44
|
Revision: 8082 http://sourceforge.net/p/bigdata/code/8082 Author: tobycraig Date: 2014-04-07 23:57:41 +0000 (Mon, 07 Apr 2014) Log Message: ----------- #882 - Abbreviate URIs belonging to a common namespace Modified Paths: -------------- branches/RDR/bigdata-war/src/html/index.html branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/index.html =================================================================== --- branches/RDR/bigdata-war/src/html/index.html 2014-04-07 22:52:33 UTC (rev 8081) +++ branches/RDR/bigdata-war/src/html/index.html 2014-04-07 23:57:41 UTC (rev 8082) @@ -34,17 +34,6 @@ <div class="box"> <div class="namespace-shortcuts"> - <ul> - <li data-ns="prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>">RDF</li> - <li data-ns="prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>">RDFS</li> - <li data-ns="prefix owl: <http://www.w3.org/2002/07/owl#>">OWL</li> - <li data-ns="prefix bd: <http://www.bigdata.com/rdf#> ">BD</li> - <li data-ns="prefix bds: <http://www.bigdata.com/rdf/search#> ">BDS</li> - <li data-ns="prefix foaf: <http://xmlns.com/foaf/0.1/>">FOAF</li> - <li data-ns="prefix hint: <http://www.bigdata.com/queryHints#>">HINT</li> - <li data-ns="prefix dc: <http://purl.org/dc/elements/1.1/>">DC</li> - <li data-ns="prefix xsd: <http://www.w3.org/2001/XMLSchema#>">XSD</li> - </ul> </div> <textarea id="load-box" placeholder="(Type in or drag a file containing RDF data, a SPARQL update or a file path or URL)"></textarea> @@ -89,17 +78,6 @@ <div class="box"> <div class="namespace-shortcuts"> - <ul> - <li data-ns="prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>">RDF</li> - <li data-ns="prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>">RDFS</li> - <li data-ns="prefix owl: <http://www.w3.org/2002/07/owl#>">OWL</li> - <li data-ns="prefix bd: <http://www.bigdata.com/rdf#> ">BD</li> - <li data-ns="prefix bds: <http://www.bigdata.com/rdf/search#> ">BDS</li> - <li data-ns="prefix foaf: <http://xmlns.com/foaf/0.1/>">FOAF</li> - <li data-ns="prefix hint: <http://www.bigdata.com/queryHints#>">HINT</li> - <li data-ns="prefix dc: <http://purl.org/dc/elements/1.1/>">DC</li> - <li data-ns="prefix xsd: <http://www.w3.org/2001/XMLSchema#>">XSD</li> - </ul> </div> <form id="query-form"> Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 22:52:33 UTC (rev 8081) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 23:57:41 UTC (rev 8082) @@ -20,12 +20,12 @@ showTab($(this).data('target')); }); -function showTab(tab) { +function showTab(tab, nohash) { $('.tab').hide(); $('#' + tab + '-tab').show(); $('#tab-selector a').removeClass(); $('a[data-target=' + tab + ']').addClass('active'); - if(window.location.hash.substring(1).indexOf(tab) != 0) { + if(!nohash && window.location.hash.substring(1).indexOf(tab) != 0) { window.location.hash = tab; } } @@ -169,13 +169,30 @@ useNamespace(DEFAULT_NAMESPACE, url); }); } -var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, NAMESPACES_READY, fileContents; +var DEFAULT_NAMESPACE, NAMESPACE, NAMESPACE_URL, NAMESPACES_READY, fileContents, NAMESPACE_SHORTCUTS; getDefaultNamespace(); /* Namespace shortcuts */ +NAMESPACE_SHORTCUTS = { + 'rdf': 'http://www.w3.org/1999/02/22-rdf-syntax-ns#', + 'rdfs': 'http://www.w3.org/2000/01/rdf-schema#', + 'owl': 'http://www.w3.org/2002/07/owl#', + 'bd': 'http://www.bigdata.com/rdf#', + 'bds': 'http://www.bigdata.com/rdf/search#', + 'foaf': 'http://xmlns.com/foaf/0.1/', + 'hint': 'http://www.bigdata.com/queryHints#', + 'dc': 'http://purl.org/dc/elements/1.1/', + 'xsd': 'http://www.w3.org/2001/XMLSchema#' +}; + +$('.namespace-shortcuts').html('<ul>'); +for(var ns in NAMESPACE_SHORTCUTS) { + $('.namespace-shortcuts ul').append('<li data-ns="prefix ' + ns + ': <' + NAMESPACE_SHORTCUTS[ns] + '>">' + ns.toUpperCase() + '</li>'); +} + $('.namespace-shortcuts li').click(function() { var textarea = $(this).parents('.tab').find('textarea'); var current = textarea.val(); @@ -600,7 +617,7 @@ } else { var text = binding.value; if(binding.type == 'uri') { - text = '<' + text + '>'; + text = abbreviate(text); } } linkText = escapeHTML(text).replace(/\n/g, '<br>'); @@ -649,7 +666,8 @@ loadURI(uri); // if this is a SID, make the components clickable - var re = /<< *(<[^<>]*>) *(<[^<>]*>) *(<[^<>]*>) *>>/; + // var re = /<< *(<[^<>]*>) *(<[^<>]*>) *(<[^<>]*>) *>>/; + var re = /<< *([^ ]+) +([^ ]+) +([^ ]+) *>>/; var match = uri.match(re); if(match) { var header = $('<h1>'); @@ -672,7 +690,8 @@ function loadURI(target) { // identify if this is a vertex or a SID target = target.trim().replace(/\n/g, ' '); - var re = /<< *(?:<[^<>]*> *){3} *>>/; + // var re = /<< *(?:<[^<>]*> *){3} *>>/; + var re = /<< *([^ ]+) +([^ ]+) +([^ ]+) *>>/; var vertex = !target.match(re); var vertexQuery = '\ @@ -815,7 +834,7 @@ function explore(uri, nopush) { $('#explore-form input[type=text]').val(uri); $('#explore-form').submit(); - showTab('explore'); + showTab('explore', true); if(!nopush) { history.pushState(null, null, '#explore:' + NAMESPACE + ':' + uri); } @@ -970,11 +989,21 @@ /* Utility functions */ function getSID(binding) { - return '<<\n <' + binding.value['s'].value + '>\n<' + binding.value['p'].value + '>\n <' + binding.value['o'].value + '>\n>>'; + return '<<\n ' + abbreviate(binding.value['s'].value) + '\n ' + abbreviate(binding.value['p'].value) + '\n ' + abbreviate(binding.value['o'].value) + '\n>>'; } +function abbreviate(uri) { + for(var ns in NAMESPACE_SHORTCUTS) { + if(uri.indexOf(NAMESPACE_SHORTCUTS[ns]) == 0) { + return uri.replace(NAMESPACE_SHORTCUTS[ns], ns + ':'); + } + } + return '<' + uri + '>'; +} + function parseSID(sid) { - var re = /<< <([^<>]*)> <([^<>]*)> <([^<>]*)> >>/; + // var re = /<< <([^<>]*)> <([^<>]*)> <([^<>]*)> >>/; + var re = /<< *([^ ]+) +([^ ]+) +([^ ]+) *>>/; var matches = sid.match(re); return {'s': matches[1], 'p': matches[2], 'o': matches[3]}; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 22:52:37
|
Revision: 8081 http://sourceforge.net/p/bigdata/code/8081 Author: thompsonbry Date: 2014-04-07 22:52:33 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Added regression test suite for #831 and #874. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java 2014-04-07 22:34:42 UTC (rev 8080) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/TestUnions.java 2014-04-07 22:52:33 UTC (rev 8081) @@ -209,4 +209,54 @@ ).runTest(); } + + /** + * + * @see <a href="http://trac.bigdata.com/ticket/831">Union with FILTER + * issue</a> + */ + public void test_union_ticket_831() throws Exception { + + new TestHelper( + "ticket_831", // testURI, + "ticket_831.rq",// queryFileURL + "ticket_831.ttl",// dataFileURL + "ticket_831.srx"// resultFileURL + ).runTest(); + + } + + /** + * The original query. + * @see <a href="http://trac.bigdata.com/ticket/874">FILTER not applied when + * there is UNION in the same join group</a> + */ + public void test_union_ticket_874() throws Exception { + + new TestHelper( + "ticket_874", // testURI, + "ticket_874.rq",// queryFileURL + "ticket_874.ttl",// dataFileURL + "ticket_874.srx"// resultFileURL + ).runTest(); + + } + + /** + * A rewrite of the original query that works. + * + * @see <a href="http://trac.bigdata.com/ticket/874">FILTER not applied when + * there is UNION in the same join group</a> + */ + public void test_union_ticket_874b() throws Exception { + + new TestHelper( + "ticket_874b", // testURI, + "ticket_874b.rq",// queryFileURL + "ticket_874.ttl",// dataFileURL + "ticket_874.srx"// resultFileURL + ).runTest(); + + } + } Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.rq 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,20 @@ +PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> +PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> + +select ?s ?p ?o + +where { + + { + ?s ?p ?o. + filter(?s = <http://example.org/data/person1>) + } + UNION + { + ?s ?p ?o. + filter(?s = <http://example.org/data/person2>) + + } + +} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.srx 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,88 @@ +<?xml version='1.0' encoding='UTF-8'?> +<sparql xmlns='http://www.w3.org/2005/sparql-results#'> + <head> + <variable name='s'/> + <variable name='p'/> + <variable name='o'/> + </head> + <results> +<!-- +:person1 + a :Person ; + :age 21; + :name "Person 1". +--> + <result> + <binding name='s'> + <uri>http://example.org/data/person1</uri> + </binding> + <binding name='p'> + <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri> + </binding> + <binding name='o'> + <uri>http://example.org/data/Person</uri> + </binding> + </result> + <result> + <binding name='s'> + <uri>http://example.org/data/person1</uri> + </binding> + <binding name='p'> + <uri>http://example.org/data/age</uri> + </binding> + <binding name='o'> + <literal datatype="http://www.w3.org/2001/XMLSchema#integer">21</literal> + </binding> + </result> + <result> + <binding name='s'> + <uri>http://example.org/data/person1</uri> + </binding> + <binding name='p'> + <uri>http://example.org/data/name</uri> + </binding> + <binding name='o'> + <literal>Person 1</literal> + </binding> + </result> +<!-- +:person2 + a :Person ; + :age 11; + :name "Person 2". + --> + <result> + <binding name='s'> + <uri>http://example.org/data/person2</uri> + </binding> + <binding name='p'> + <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri> + </binding> + <binding name='o'> + <uri>http://example.org/data/Person</uri> + </binding> + </result> + <result> + <binding name='s'> + <uri>http://example.org/data/person2</uri> + </binding> + <binding name='p'> + <uri>http://example.org/data/age</uri> + </binding> + <binding name='o'> + <literal datatype="http://www.w3.org/2001/XMLSchema#integer">11</literal> + </binding> + </result> + <result> + <binding name='s'> + <uri>http://example.org/data/person2</uri> + </binding> + <binding name='p'> + <uri>http://example.org/data/name</uri> + </binding> + <binding name='o'> + <literal>Person 2</literal> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_831.ttl 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,11 @@ +@prefix : <http://example.org/data/> . + +:person1 + a :Person ; + :age 21; + :name "Person 1". + +:person2 + a :Person ; + :age 11; + :name "Person 2". \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.rq 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,9 @@ +prefix xsd: <http://www.w3.org/2001/XMLSchema#> +SELECT * +where { + ?s ?p ?o . + FILTER strStarts(str(?s), "http://arvados.org/schema/modified") . + { ?user <http://arvados.org/schema/user_is_admin> "true"^^xsd:boolean } + union { ?user <http://arvados.org/schema/permission/can_read> ?s } + ?user <http://arvados.org/schema/api_token> <token:ckedd> +} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.srx 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,25 @@ +<?xml version='1.0' encoding='UTF-8'?> +<sparql xmlns='http://www.w3.org/2005/sparql-results#'> + <head> + <variable name='s'/> + <variable name='p'/> + <variable name='o'/> + <variable name='user'/> + </head> + <results> + <result> + <binding name='s'> + <uri>http://arvados.org/schema/modified_at</uri> + </binding> + <binding name='p'> + <uri>http://www.w3.org/1999/02/22-rdf-syntax-ns#type</uri> + </binding> + <binding name='o'> + <uri>http://www.w3.org/2000/01/rdf-schema#Property</uri> + </binding> + <binding name='user'> + <uri>http://qr1hi/user/12345</uri> + </binding> + </result> + </results> +</sparql> Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874.ttl 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,4 @@ +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +<http://qr1hi/user/12345> <http://arvados.org/schema/api_token> <token:ckedd> . +<http://qr1hi/user/12345> <http://arvados.org/schema/user_is_admin> "true"^^xsd:boolean . +<http://arvados.org/schema/modified_at> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2000/01/rdf-schema#Property> . \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/test/com/bigdata/rdf/sparql/ast/eval/ticket_874b.rq 2014-04-07 22:52:33 UTC (rev 8081) @@ -0,0 +1,17 @@ +prefix xsd: <http://www.w3.org/2001/XMLSchema#> +SELECT * +where { +?user <http://arvados.org/schema/api_token> <token:ckedd> . +{ + ?user <http://arvados.org/schema/user_is_admin> true . + ?s ?p ?o . + FILTER strStarts(str(?s), "http://arvados.org/schema/modified") . +} +union +{ + ?user <http://arvados.org/schema/user_is_admin> false . + ?user <http://arvados.org/schema/permission/can_read> ?s . + ?s ?p ?o . + FILTER strStarts(str(?s), "http://arvados.org/schema/modified") . +} +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-07 22:34:44
|
Revision: 8080 http://sourceforge.net/p/bigdata/code/8080 Author: tobycraig Date: 2014-04-07 22:34:42 +0000 (Mon, 07 Apr 2014) Log Message: ----------- #880 - Absolute URIs now have < > around them Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 21:45:05 UTC (rev 8079) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 22:34:42 UTC (rev 8080) @@ -599,6 +599,9 @@ var text = getSID(binding); } else { var text = binding.value; + if(binding.type == 'uri') { + text = '<' + text + '>'; + } } linkText = escapeHTML(text).replace(/\n/g, '<br>'); if(binding.type == 'typed-literal') { @@ -646,12 +649,18 @@ loadURI(uri); // if this is a SID, make the components clickable - var re = /<< *<([^<>]*)> *<([^<>]*)> *<([^<>]*)> *>>/; + var re = /<< *(<[^<>]*>) *(<[^<>]*>) *(<[^<>]*>) *>>/; var match = uri.match(re); if(match) { - $('#explore-header').html('<h1><< <<a href="' + buildExploreHash(match[1]) + '">' + match[1] + '</a>><br><<a href="' + buildExploreHash(match[2]) + '">' + match[2] + '</a> ><br><<a href="' + buildExploreHash(match[3]) + '">' + match[3] + '</a> > >></h1>'); + var header = $('<h1>'); + header.append('<< <br>'); + for(var i=1; i<4; i++) { + header.append($('<a href="' + buildExploreHash(match[i]) + '">').text(match[i])).append('<br>'); + } + header.append(' >>'); + $('#explore-header').html(header); } else { - $('#explore-header').html('<h1>' + uri + '</h1>'); + $('#explore-header').html($('<h1>').text(uri)); } } }); @@ -668,7 +677,7 @@ var vertexQuery = '\ select ?col1 ?col2 ?incoming (count(?star) as ?star) {\n\ - bind (<URI> as ?explore ) .\n\ + bind (URI as ?explore ) .\n\ {\n\ bind (<<?explore ?col1 ?col2>> as ?sid) . \n\ bind (false as ?incoming) . \n\ @@ -741,6 +750,9 @@ var uri = getSID(col); } else { var uri = col.value; + if(col.type == 'uri') { + uri = '<' + uri + '>'; + } } output = escapeHTML(uri).replace(/\n/g, '<br>'); if(col.type == 'uri' || col.type == 'sid') { @@ -751,9 +763,9 @@ var star = parseInt(binding.star.value); if(star > 0) { if(binding.incoming.value == 'true') { - var sid = '<< <' + binding.col1.value + '> <' + binding.col2.value + '> <' + $('#explore-form input[type=text]').val() + '> >>'; + var sid = '<< <' + binding.col1.value + '> <' + binding.col2.value + '> ' + $('#explore-form input[type=text]').val() + ' >>'; } else { - var sid = '<< <' + $('#explore-form input[type=text]').val() + '> <' + binding.col1.value + '> <' + binding.col2.value + '> >>'; + var sid = '<< ' + $('#explore-form input[type=text]').val() + ' <' + binding.col1.value + '> <' + binding.col2.value + '> >>'; } star = '<a href="' + buildExploreHash(sid) + '"><< * (' + star + ') >></a>'; } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-07 21:45:08
|
Revision: 8079 http://sourceforge.net/p/bigdata/code/8079 Author: mrpersonick Date: 2014-04-07 21:45:05 +0000 (Mon, 07 Apr 2014) Log Message: ----------- fixed SSSP CI errors Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 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-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/IGASState.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -17,6 +17,7 @@ import java.util.Set; +import org.openrdf.model.Literal; import org.openrdf.model.Statement; import org.openrdf.model.URI; import org.openrdf.model.Value; @@ -176,6 +177,18 @@ Value getOtherVertex(Value u, Statement e); /** + * Return the link attribute, if there is one. + * + * @param u + * One end of the link. + * @param e + * The link. + * + * @return The other end of the link. + */ + Literal getLinkAttr(Value u, Statement e); + + /** * Return a useful representation of an edge (non-batch API, debug only). * This method is only required when the edge objects are internal database * objects lacking fully materialized RDF {@link Value}s. In this case, it Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -396,11 +396,16 @@ final VS otherState = state.getState(other); + final Literal l = state.getLinkAttr(u, e); + final double edgeLength; - if (e.getObject() instanceof Literal) { + if (l != null) { - edgeLength = ((Literal) e.getObject()).doubleValue(); + if (log.isDebugEnabled()) + log.debug(l); + edgeLength = l.doubleValue(); + } else { edgeLength = EDGE_LENGTH; 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-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/impl/GASState.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -23,6 +23,7 @@ import java.util.concurrent.atomic.AtomicInteger; import org.apache.log4j.Logger; +import org.openrdf.model.Literal; import org.openrdf.model.Resource; import org.openrdf.model.Statement; import org.openrdf.model.URI; @@ -411,6 +412,16 @@ return e.getSubject(); } + + /** + * This will only work for the BigdataGASState. + */ + @Override + public Literal getLinkAttr(final Value u, final Statement e) { + + return null; + + } @Override public boolean isEdge(final Statement e) { Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -215,5 +215,39 @@ } + /** + * This will only work for the BigdataGASState. + */ + @Override + public Literal getLinkAttr(final Value u, final Statement e) { + + if (e.getObject() instanceof IV) { + + final IV iv = (IV) e.getObject(); + + if (iv.isLiteral()) { + + if (iv.isInline()) { + + return (Literal) iv; + + } else { + + return (Literal) iv.getValue(); + + } + + } + + } else if (e.getObject() instanceof Literal) { + + return (Literal) e.getObject(); + + } + + return null; + + } + } Modified: branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java =================================================================== --- branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 2014-04-07 20:46:38 UTC (rev 8078) +++ branches/RDR/bigdata-rdf/src/test/com/bigdata/rdf/graph/impl/bd/TestSSSP.java 2014-04-07 21:45:05 UTC (rev 8079) @@ -69,13 +69,13 @@ // Converge. gasContext.call(); - assertEquals(0, gasState.getState(p.getMike()).dist()); + assertEquals(0.0, gasState.getState(p.getMike()).dist()); - assertEquals(1, gasState.getState(p.getFoafPerson()).dist()); + assertEquals(1.0, gasState.getState(p.getFoafPerson()).dist()); - assertEquals(1, gasState.getState(p.getBryan()).dist()); + assertEquals(1.0, gasState.getState(p.getBryan()).dist()); - assertEquals(2, gasState.getState(p.getMartyn()).dist()); + assertEquals(2.0, gasState.getState(p.getMartyn()).dist()); } finally { @@ -118,15 +118,15 @@ gasContext.call(); // check #of hops. - assertEquals(0, gasState.getState(p.getV1()).dist()); + assertEquals(0.0, gasState.getState(p.getV1()).dist()); - assertEquals(1, gasState.getState(p.getV2()).dist()); + assertEquals(1.0, gasState.getState(p.getV2()).dist()); - assertEquals(1, gasState.getState(p.getV3()).dist()); + assertEquals(1.0, gasState.getState(p.getV3()).dist()); - assertEquals(2, gasState.getState(p.getV4()).dist()); + assertEquals(2.0, gasState.getState(p.getV4()).dist()); - assertEquals(2, gasState.getState(p.getV5()).dist()); + assertEquals(2.0, gasState.getState(p.getV5()).dist()); } finally { @@ -176,15 +176,15 @@ gasContext.call(); // Check weighted distance. - assertEquals(0, gasState.getState(p.getV1()).dist()); + assertEquals(0.0, gasState.getState(p.getV1()).dist()); - assertEquals(100, gasState.getState(p.getV2()).dist()); + assertEquals(100.0, gasState.getState(p.getV2()).dist()); - assertEquals(100, gasState.getState(p.getV3()).dist()); + assertEquals(100.0, gasState.getState(p.getV3()).dist()); - assertEquals(125, gasState.getState(p.getV4()).dist()); + assertEquals(150.0, gasState.getState(p.getV4()).dist()); - assertEquals(125, gasState.getState(p.getV5()).dist()); + assertEquals(175.0, gasState.getState(p.getV5()).dist()); } finally { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-07 20:46:45
|
Revision: 8078 http://sourceforge.net/p/bigdata/code/8078 Author: tobycraig Date: 2014-04-07 20:46:38 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Show filename of large files that are uploaded without being displayed in the text box Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 20:40:41 UTC (rev 8077) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 20:46:38 UTC (rev 8078) @@ -225,6 +225,7 @@ if(f.size > 10240) { // do not use textarea $('#load-box').prop('disabled', true) + $('#filename').html(f.name); $('#large-file-message, #clear-file').show() $('#load-box').val(''); fileContents = e2.target.result; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-07 20:40:46
|
Revision: 8077 http://sourceforge.net/p/bigdata/code/8077 Author: tobycraig Date: 2014-04-07 20:40:41 +0000 (Mon, 07 Apr 2014) Log Message: ----------- #878 - Hide output box on query/load/explore pages until it has content Modified Paths: -------------- branches/RDR/bigdata-war/src/html/css/style.css branches/RDR/bigdata-war/src/html/index.html branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/css/style.css =================================================================== --- branches/RDR/bigdata-war/src/html/css/style.css 2014-04-07 20:33:31 UTC (rev 8076) +++ branches/RDR/bigdata-war/src/html/css/style.css 2014-04-07 20:40:41 UTC (rev 8077) @@ -179,7 +179,7 @@ border: none; } -#advanced-features, #query-explanation, #namespace-properties { +#advanced-features, #query-response, #query-explanation, #query-tab .bottom *, #load-response, #load-clear, #explore-results, #namespace-properties { display: none; } Modified: branches/RDR/bigdata-war/src/html/index.html =================================================================== --- branches/RDR/bigdata-war/src/html/index.html 2014-04-07 20:33:31 UTC (rev 8076) +++ branches/RDR/bigdata-war/src/html/index.html 2014-04-07 20:40:41 UTC (rev 8077) @@ -75,8 +75,8 @@ <button id="load-load">Load</button> </div> - <div class="box"> - <pre id="load-response"></pre> + <div class="box" id="load-response"> + <pre></pre> </div> <div class="bottom"> @@ -151,6 +151,8 @@ <div class="box" id="explore-attributes"></div> </div> + <div class="bottom"></div> + </div> <div class="tab" id="status-tab"> Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 20:33:31 UTC (rev 8076) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-07 20:40:41 UTC (rev 8077) @@ -382,7 +382,8 @@ } $('#load-clear').click(function() { - $('#load-response').text(''); + $('#load-response, #load-clear').hide(); + $('#load-response pre').text(''); }); $('#advanced-features-toggle').click(function() { @@ -391,17 +392,20 @@ }); function updateResponseHTML(data) { - $('#load-response').html(data); + $('#load-response, #load-clear').show(); + $('#load-response pre').html(data); } function updateResponseXML(data) { var modified = data.childNodes[0].attributes['modified'].value; var milliseconds = data.childNodes[0].attributes['milliseconds'].value; - $('#load-response').text('Modified: ' + modified + '\nMilliseconds: ' + milliseconds); + $('#load-response, #load-clear').show(); + $('#load-response pre').text('Modified: ' + modified + '\nMilliseconds: ' + milliseconds); } function updateResponseError(jqXHR, textStatus, errorThrown) { - $('#load-response').text('Error! ' + textStatus + ' ' + errorThrown); + $('#load-response, #load-clear').show(); + $('#load-response pre').text('Error! ' + textStatus + ' ' + errorThrown); } @@ -440,7 +444,7 @@ $('#query-response-clear').click(function() { $('#query-response, #query-explanation').empty(''); - $('#query-explanation').hide(); + $('#query-response, #query-explanation, #query-tab .bottom *').hide(); }); $('#query-export-csv').click(exportCSV); @@ -543,6 +547,7 @@ function showQueryResults(data) { $('#query-response').empty(); + $('#query-response, #query-tab .bottom *').show(); var table = $('<table>').appendTo($('#query-response')); if(this.dataTypes[1] == 'xml') { // RDF @@ -627,6 +632,7 @@ } function queryResultsError(jqXHR, textStatus, errorThrown) { + $('#query-response, #query-tab .bottom *').show(); $('#query-response').text('Error! ' + textStatus + ' ' + errorThrown); } @@ -724,6 +730,8 @@ // clear tables $('#explore-incoming, #explore-outgoing, #explore-attributes').html('<table>'); + $('#explore-tab .bottom').hide(); + $('#explore-results, #explore-results .box').show(); // go through each binding, adding it to the appropriate table $.each(data.results.bindings, function(i, binding) { @@ -823,8 +831,10 @@ }); function updateExploreError(jqXHR, textStatus, errorThrown) { - $('#explore-results .box').html(''); - $('#explore-header').html('Error! ' + textStatus + ' ' + errorThrown); + $('#explore-tab .bottom').show(); + $('#explore-results .box').html('').hide(); + $('#explore-header').text('Error! ' + textStatus + ' ' + errorThrown); + $('#explore-results, #explore-header').show(); } /* Status */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-07 20:33:34
|
Revision: 8076 http://sourceforge.net/p/bigdata/code/8076 Author: mrpersonick Date: 2014-04-07 20:33:31 +0000 (Mon, 07 Apr 2014) Log Message: ----------- fixed ticket 831, opened ticket 874 Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTBindingAssigner.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.rq branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.ttl branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.rq branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.ttl branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket831.java branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket874.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTBindingAssigner.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTBindingAssigner.java 2014-04-07 20:22:03 UTC (rev 8075) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-rdf/src/java/com/bigdata/rdf/sparql/ast/optimizers/ASTBindingAssigner.java 2014-04-07 20:33:31 UTC (rev 8076) @@ -27,6 +27,7 @@ package com.bigdata.rdf.sparql.ast.optimizers; +import java.util.Collections; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; @@ -55,6 +56,11 @@ import com.bigdata.rdf.sparql.ast.VarNode; import com.bigdata.rdf.sparql.ast.eval.AST2BOpContext; +import cutthecrap.utils.striterators.EmptyIterator; +import cutthecrap.utils.striterators.Expander; +import cutthecrap.utils.striterators.SingleValueIterator; +import cutthecrap.utils.striterators.Striterator; + /** * Examines the source {@link IBindingSet}[]. If there is a single binding set * in the source, then any variable bound in that input is rewritten in the AST @@ -152,15 +158,25 @@ final GroupNodeBase<IGroupMemberNode> whereClause, final IBindingSet bset) { + doBindingAssignment(whereClause, Collections.EMPTY_MAP, bset); + + } + + private void doBindingAssignment( + final GroupNodeBase<IGroupMemberNode> whereClause, + final Map<VarNode, ConstantNode> parentReplacements, + final IBindingSet bset) { + final Map<VarNode, ConstantNode> replacements = new LinkedHashMap<VarNode, ConstantNode>(); + + replacements.putAll(parentReplacements); - final Iterator<BOp> itr = BOpUtility - .preOrderIterator((BOp) whereClause); + final Iterator<BOp> itr = iterateExcludeGroups(whereClause); while (itr.hasNext()) { + + final BOp node = itr.next(); - final BOp node = (BOp) itr.next(); - if (node instanceof FilterNode) { /* @@ -213,9 +229,110 @@ if (log.isInfoEnabled()) log.info("Replaced " + ntotal + " instances of " + replacements.size() + " bound variables with constants"); + + // recurse into the childen + for (IGroupMemberNode node : whereClause) { + if (node instanceof GroupNodeBase) { + + doBindingAssignment((GroupNodeBase<IGroupMemberNode>) node, replacements, bset); + + } + + } + } + + /** + * Visits the children (recursively) using pre-order traversal, but does NOT + * visit this node. + * + * @param stack + */ + @SuppressWarnings("unchecked") + private Iterator<BOp> iterateExcludeGroups(final BOp op) { + + return iterateExcludeGroups(0, op); + + } + + /** + * Visits the children (recursively) using pre-order traversal, but does NOT + * visit this node. + * + * @param stack + */ + @SuppressWarnings("unchecked") + private Iterator<BOp> iterateExcludeGroups(final int depth, final BOp op) { + /* + * Iterator visits the direct children, expanding them in turn with a + * recursive application of the pre-order iterator. + */ + + // mild optimization when no children are present. + if (op == null || op.arity() == 0) + return EmptyIterator.DEFAULT; + + if (depth > 0 && op instanceof GroupNodeBase) + return EmptyIterator.DEFAULT; + + return new Striterator(op.argIterator()).addFilter(new Expander() { + + private static final long serialVersionUID = 1L; + + /* + * Expand each child in turn. + */ + protected Iterator expand(final Object childObj) { + + /* + * A child of this node. + */ + + final BOp child = (BOp) childObj; + + /* + * TODO The null child reference which can occur here is the [c] + * of the StatementPatternNode. We might want to make [c] an + * anonymous variable instead of having a [null]. + */ + if (child != null && child.arity() > 0) { + + /* + * The child is a Node (has children). + * + * Visit the children (recursive pre-order traversal). + */ + + // append this node in pre-order position. + final Striterator itr = new Striterator( + new SingleValueIterator(child)); + + // append children + itr.append(iterateExcludeGroups(depth + 1, child)); + + return itr; + + } else { + + /* + * The child is a leaf. + */ + + // Visit the leaf itself. + return new SingleValueIterator(child); + + } + + } + + }); + + } + + + /** * Gather the VarNodes for variables which have bindings. * Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.rq =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.rq 2014-04-07 20:33:31 UTC (rev 8076) @@ -0,0 +1,20 @@ +PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> +PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> +PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> + +select ?s ?p ?o + +where { + + { + ?s ?p ?o. + filter(?s = <http://example.org/data/person1>) + } + UNION + { + ?s ?p ?o. + filter(?s = <http://example.org/data/person2>) + + } + +} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/831.ttl 2014-04-07 20:33:31 UTC (rev 8076) @@ -0,0 +1,11 @@ +@prefix : <http://example.org/data/> . + +:person1 + a :Person ; + :age 21; + :name "Person 1". + +:person2 + a :Person ; + :age 11; + :name "Person 2". \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.rq =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.rq (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.rq 2014-04-07 20:33:31 UTC (rev 8076) @@ -0,0 +1,17 @@ +prefix xsd: <http://www.w3.org/2001/XMLSchema#> +SELECT * +where { +?user <http://arvados.org/schema/api_token> <token:ckedd> . +{ + ?user <http://arvados.org/schema/user_is_admin> true . + ?s ?p ?o . + FILTER strStarts(str(?s), "http://arvados.org/schema/modified") . +} +union +{ + ?user <http://arvados.org/schema/user_is_admin> false . + ?user <http://arvados.org/schema/permission/can_read> ?s . + ?s ?p ?o . + FILTER strStarts(str(?s), "http://arvados.org/schema/modified") . +} +} \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.ttl =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.ttl (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/874.ttl 2014-04-07 20:33:31 UTC (rev 8076) @@ -0,0 +1,4 @@ +@prefix xsd: <http://www.w3.org/2001/XMLSchema#> . +<http://qr1hi/user/12345> <http://arvados.org/schema/api_token> <token:ckedd> . +<http://qr1hi/user/12345> <http://arvados.org/schema/user_is_admin> "true"^^xsd:boolean . +<http://arvados.org/schema/modified_at> <http://rdf#type> <http://rdfs#Property> . \ No newline at end of file Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket831.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket831.java (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket831.java 2014-04-07 20:33:31 UTC (rev 8076) @@ -0,0 +1,177 @@ +/** +Copyright (C) SYSTAP, LLC 2011. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +package com.bigdata.rdf.sail; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.Properties; + +import org.apache.commons.io.IOUtils; +import org.apache.log4j.Logger; +import org.openrdf.model.impl.URIImpl; +import org.openrdf.query.BindingSet; +import org.openrdf.query.QueryLanguage; +import org.openrdf.query.TupleQueryResult; +import org.openrdf.query.impl.BindingImpl; +import org.openrdf.repository.RepositoryConnection; +import org.openrdf.repository.sail.SailTupleQuery; +import org.openrdf.rio.RDFFormat; + +import com.bigdata.rdf.axioms.NoAxioms; +import com.bigdata.rdf.vocab.NoVocabulary; + +/** + * Unit test template for use in submission of bugs. + * <p> + * This test case will delegate to an underlying backing store. You can + * specify this store via a JVM property as follows: + * <code>-DtestClass=com.bigdata.rdf.sail.TestBigdataSailWithQuads</code> + * <p> + * There are three possible configurations for the testClass: + * <ul> + * <li>com.bigdata.rdf.sail.TestBigdataSailWithQuads (quads mode)</li> + * <li>com.bigdata.rdf.sail.TestBigdataSailWithoutSids (triples mode)</li> + * <li>com.bigdata.rdf.sail.TestBigdataSailWithSids (SIDs mode)</li> + * </ul> + * <p> + * The default for triples and SIDs mode is for inference with truth maintenance + * to be on. If you would like to turn off inference, make sure to do so in + * {@link #getProperties()}. + * + * @author <a href="mailto:mrp...@us...">Mike Personick</a> + * @version $Id$ + */ +public class TestTicket831 extends ProxyBigdataSailTestCase { + + protected static final Logger log = Logger.getLogger(TestTicket831.class); + + /** + * Please set your database properties here, except for your journal file, + * please DO NOT SPECIFY A JOURNAL FILE. + */ + @Override + public Properties getProperties() { + + Properties props = super.getProperties(); + + /* + * For example, here is a set of five properties that turns off + * inference, truth maintenance, and the free text index. + */ + props.setProperty(BigdataSail.Options.AXIOMS_CLASS, NoAxioms.class.getName()); + props.setProperty(BigdataSail.Options.VOCABULARY_CLASS, NoVocabulary.class.getName()); + props.setProperty(BigdataSail.Options.TRUTH_MAINTENANCE, "false"); + props.setProperty(BigdataSail.Options.JUSTIFY, "false"); + props.setProperty(BigdataSail.Options.TEXT_INDEX, "false"); + + return props; + + } + + public TestTicket831() { + } + + public TestTicket831(String arg0) { + super(arg0); + } + + public void testBug1() throws Exception { + + /* + * The bigdata store, backed by a temporary journal file. + */ + final BigdataSail bigdataSail = getSail(); + + /* + * Data file containing the data demonstrating your bug. + */ + final String data = "831.ttl"; + final String baseURI = ""; + final RDFFormat format = RDFFormat.TURTLE; + + try { + + bigdataSail.initialize(); + + final BigdataSailRepository bigdataRepo = new BigdataSailRepository(bigdataSail); + + { // load the data into the bigdata store + + final RepositoryConnection cxn = bigdataRepo.getConnection(); + try { + cxn.setAutoCommit(false); + cxn.add(getClass().getResourceAsStream(data), baseURI, format); +// cxn.add(data); + cxn.commit(); + } finally { + cxn.close(); + } + + } + + { +// final Collection<BindingSet> answer = new LinkedList<BindingSet>(); +// answer.add(createBindingSet( +// new BindingImpl("sub", new URIImpl("http://example.org/B")) +// )); + + final String query = IOUtils.toString(getClass().getResourceAsStream("831.rq")); + + if (log.isInfoEnabled()) { + log.info("running query:\n" + query); + } + + /* + * Run the problem query using the bigdata store and then compare + * the answer. + */ + final RepositoryConnection cxn = bigdataRepo.getReadOnlyConnection(); + try { + + final SailTupleQuery tupleQuery = (SailTupleQuery) + cxn.prepareTupleQuery(QueryLanguage.SPARQL, query); + tupleQuery.setIncludeInferred(false /* includeInferred */); + + final TupleQueryResult result = tupleQuery.evaluate(); +// compare(result, answer); + + while (result.hasNext()) { + log.info(result.next()); + } + + } finally { + cxn.close(); + } + + } + + } finally { + + bigdataSail.__tearDownUnitTest(); + + } + + } + +} Property changes on: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket831.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket874.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket874.java (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket874.java 2014-04-07 20:33:31 UTC (rev 8076) @@ -0,0 +1,177 @@ +/** +Copyright (C) SYSTAP, LLC 2011. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ + +package com.bigdata.rdf.sail; + +import java.util.Collection; +import java.util.LinkedList; +import java.util.Properties; + +import org.apache.commons.io.IOUtils; +import org.apache.log4j.Logger; +import org.openrdf.model.impl.URIImpl; +import org.openrdf.query.BindingSet; +import org.openrdf.query.QueryLanguage; +import org.openrdf.query.TupleQueryResult; +import org.openrdf.query.impl.BindingImpl; +import org.openrdf.repository.RepositoryConnection; +import org.openrdf.repository.sail.SailTupleQuery; +import org.openrdf.rio.RDFFormat; + +import com.bigdata.rdf.axioms.NoAxioms; +import com.bigdata.rdf.vocab.NoVocabulary; + +/** + * Unit test template for use in submission of bugs. + * <p> + * This test case will delegate to an underlying backing store. You can + * specify this store via a JVM property as follows: + * <code>-DtestClass=com.bigdata.rdf.sail.TestBigdataSailWithQuads</code> + * <p> + * There are three possible configurations for the testClass: + * <ul> + * <li>com.bigdata.rdf.sail.TestBigdataSailWithQuads (quads mode)</li> + * <li>com.bigdata.rdf.sail.TestBigdataSailWithoutSids (triples mode)</li> + * <li>com.bigdata.rdf.sail.TestBigdataSailWithSids (SIDs mode)</li> + * </ul> + * <p> + * The default for triples and SIDs mode is for inference with truth maintenance + * to be on. If you would like to turn off inference, make sure to do so in + * {@link #getProperties()}. + * + * @author <a href="mailto:mrp...@us...">Mike Personick</a> + * @version $Id$ + */ +public class TestTicket874 extends ProxyBigdataSailTestCase { + + protected static final Logger log = Logger.getLogger(TestTicket874.class); + + /** + * Please set your database properties here, except for your journal file, + * please DO NOT SPECIFY A JOURNAL FILE. + */ + @Override + public Properties getProperties() { + + Properties props = super.getProperties(); + + /* + * For example, here is a set of five properties that turns off + * inference, truth maintenance, and the free text index. + */ + props.setProperty(BigdataSail.Options.AXIOMS_CLASS, NoAxioms.class.getName()); + props.setProperty(BigdataSail.Options.VOCABULARY_CLASS, NoVocabulary.class.getName()); + props.setProperty(BigdataSail.Options.TRUTH_MAINTENANCE, "false"); + props.setProperty(BigdataSail.Options.JUSTIFY, "false"); + props.setProperty(BigdataSail.Options.TEXT_INDEX, "false"); + + return props; + + } + + public TestTicket874() { + } + + public TestTicket874(String arg0) { + super(arg0); + } + + public void testBug1() throws Exception { + + /* + * The bigdata store, backed by a temporary journal file. + */ + final BigdataSail bigdataSail = getSail(); + + /* + * Data file containing the data demonstrating your bug. + */ + final String data = "874.ttl"; + final String baseURI = ""; + final RDFFormat format = RDFFormat.TURTLE; + + try { + + bigdataSail.initialize(); + + final BigdataSailRepository bigdataRepo = new BigdataSailRepository(bigdataSail); + + { // load the data into the bigdata store + + final RepositoryConnection cxn = bigdataRepo.getConnection(); + try { + cxn.setAutoCommit(false); + cxn.add(getClass().getResourceAsStream(data), baseURI, format); +// cxn.add(data); + cxn.commit(); + } finally { + cxn.close(); + } + + } + + { +// final Collection<BindingSet> answer = new LinkedList<BindingSet>(); +// answer.add(createBindingSet( +// new BindingImpl("sub", new URIImpl("http://example.org/B")) +// )); + + final String query = IOUtils.toString(getClass().getResourceAsStream("874.rq")); + + if (log.isInfoEnabled()) { + log.info("running query:\n" + query); + } + + /* + * Run the problem query using the bigdata store and then compare + * the answer. + */ + final RepositoryConnection cxn = bigdataRepo.getReadOnlyConnection(); + try { + + final SailTupleQuery tupleQuery = (SailTupleQuery) + cxn.prepareTupleQuery(QueryLanguage.SPARQL, query); + tupleQuery.setIncludeInferred(false /* includeInferred */); + + final TupleQueryResult result = tupleQuery.evaluate(); +// compare(result, answer); + + while (result.hasNext()) { + log.info(result.next()); + } + + } finally { + cxn.close(); + } + + } + + } finally { + + bigdataSail.__tearDownUnitTest(); + + } + + } + +} Property changes on: branches/BIGDATA_RELEASE_1_3_0/bigdata-sails/src/test/com/bigdata/rdf/sail/TestTicket874.java ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 20:22:06
|
Revision: 8075 http://sourceforge.net/p/bigdata/code/8075 Author: thompsonbry Date: 2014-04-07 20:22:03 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Worked through ReadIndexTask interrupt handling with Mike. Treatment is the same as for query (normal cancellation). See #871 (code review of interrupt handling) Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/search/ReadIndexTask.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/search/ReadIndexTask.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/search/ReadIndexTask.java 2014-04-07 19:08:00 UTC (rev 8074) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/search/ReadIndexTask.java 2014-04-07 20:22:03 UTC (rev 8075) @@ -10,8 +10,6 @@ import com.bigdata.btree.ISimpleSplitHandler; import com.bigdata.btree.ITuple; import com.bigdata.btree.ITupleIterator; -import com.bigdata.btree.keys.IKeyBuilder; -import com.bigdata.btree.keys.SuccessorUtil; /** * Procedure reads on the terms index, aggregating data on a per-{@link Hit} @@ -131,12 +129,12 @@ log.debug("queryTerm=" + queryTerm + ", termWeight=" + queryTermWeight); - final Thread t = Thread.currentThread(); +// final Thread t = Thread.currentThread(); while (itr.hasNext()) { // don't test for interrupted on each result -- too much work. - if (nhits % 1000 == 0 && t.isInterrupted()) { + if (nhits % 1000 == 0 && Thread.interrupted()) { // if (log.isInfoEnabled()) log.warn("Interrupted: queryTerm=" + queryTerm + ", nhits=" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-07 19:08:04
|
Revision: 8074 http://sourceforge.net/p/bigdata/code/8074 Author: tobycraig Date: 2014-04-07 19:08:00 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Fixed failing test case Modified Paths: -------------- branches/RDR/bigdata-war/src/html/index.html Modified: branches/RDR/bigdata-war/src/html/index.html =================================================================== --- branches/RDR/bigdata-war/src/html/index.html 2014-04-07 13:01:39 UTC (rev 8073) +++ branches/RDR/bigdata-war/src/html/index.html 2014-04-07 19:08:00 UTC (rev 8074) @@ -8,6 +8,7 @@ <meta http-equiv="Content-Type" content="text/html;charset=utf-8" > <title>Bigdata Workbench</title> <link rel="stylesheet" href="/bigdata/html/css/style.css"> + <!-- junit test marker: index.html --> </head> <body> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 13:01:43
|
Revision: 8073 http://sourceforge.net/p/bigdata/code/8073 Author: thompsonbry Date: 2014-04-07 13:01:39 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Added a simple test to verify that all joined services accept a CANCEL request. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java Added Paths: ----------- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3CancelQuery.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java 2014-04-07 12:57:15 UTC (rev 8072) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestAll.java 2014-04-07 13:01:39 UTC (rev 8073) @@ -99,6 +99,9 @@ // // Test suite for the global write lock. // suite.addTestSuite(TestHAJournalServerGlobalWriteLock.class); + // Test suite for issuing a CANCEL request for Query or Update. + suite.addTestSuite(TestHA3CancelQuery.class); + // Test suite for utility to compute and compare HALog digests. suite.addTestSuite(TestHA3DumpLogs.class); Added: branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3CancelQuery.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3CancelQuery.java (rev 0) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3CancelQuery.java 2014-04-07 13:01:39 UTC (rev 8073) @@ -0,0 +1,129 @@ +/** + +Copyright (C) SYSTAP, LLC 2006-2007. All rights reserved. + +Contact: + SYSTAP, LLC + 4501 Tower Road + Greensboro, NC 27410 + lic...@bi... + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; version 2 of the License. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +*/ +/* + * Created on Oct 31, 2012 + */ +package com.bigdata.journal.jini.ha; + +import java.util.UUID; + +import net.jini.config.Configuration; + +import com.bigdata.ha.HAGlue; +import com.bigdata.ha.HAStatusEnum; +import com.bigdata.journal.AbstractJournal; +import com.bigdata.quorum.Quorum; +import com.bigdata.rdf.sail.webapp.client.RemoteRepository; + +/** + * Test suites for an {@link HAJournalServer} quorum with a replication factor + * of THREE (3) and a fully met {@link Quorum}. + * + * TODO Do we have any guards against rolling back a service in RESYNC if the + * other services are more than 2 commit points before it? We probably should + * not automatically roll it back to the other services in this case, but that + * could also reduce the ergonomics of the HA3 configuration. + * + * TODO All of these live load remains met tests could also be done with BOUNCE + * rather than SHUTDOWN/RESTART. BOUNCE exercises different code paths and + * corresponds to a zookeeper timeout, e.g., as might occur during a full GC + * pause. + * + * TODO Update the existing tests to verify that the quorum token is properly + * set on C when C resyncs with A+B and that + * {@link AbstractJournal#getHAReady()} reports the correct token. This tests + * for a problem where we did not call setQuorumToken() again when we resync and + * transition into the met quorum. This meant that the HAReady token is not set + * for a service unless it is part of the initial quorum meet. One of the HA3 + * backup tests covers this, but we should be checking the HAReadyToken in this + * test suite as well. + * + * @author <a href="mailto:tho...@us...">Bryan Thompson</a> + */ +public class TestHA3CancelQuery extends AbstractHA3JournalServerTestCase { + + /** + * {@inheritDoc} + * <p> + * Note: This overrides some {@link Configuration} values for the + * {@link HAJournalServer} in order to establish conditions suitable for + * testing the {@link ISnapshotPolicy} and {@link IRestorePolicy}. + */ + @Override + protected String[] getOverrides() { + + return new String[]{ +// "com.bigdata.journal.HAJournal.properties=" +TestHA3JournalServer.getTestHAJournalProperties(com.bigdata.journal.HAJournal.properties), + "com.bigdata.journal.jini.ha.HAJournalServer.restorePolicy=new com.bigdata.journal.jini.ha.DefaultRestorePolicy(0L,1,0)", + "com.bigdata.journal.jini.ha.HAJournalServer.snapshotPolicy=new com.bigdata.journal.jini.ha.NoSnapshotPolicy()", +// "com.bigdata.journal.jini.ha.HAJournalServer.HAJournalClass=\""+HAJournalTest.class.getName()+"\"", +// "com.bigdata.journal.jini.ha.HAJournalServer.onlineDisasterRecovery=true", + }; + + } + + public TestHA3CancelQuery() { + } + + public TestHA3CancelQuery(String name) { + super(name); + } + + /** + * Starts 3 services in a known order. The leader will be A. The pipeline + * order will be A, B, C. Issues cancel request to each of the services and + * verifies that all services are willing to accept a POST of the CANCEL + * request. + */ + public void test_ABC_CancelQuery() throws Exception { + + final ABC abc = new ABC(true/*sequential*/); + + final HAGlue serverA = abc.serverA, serverB = abc.serverB, serverC = abc.serverC; + + // Verify quorum is FULLY met. + awaitFullyMetQuorum(); + + // await the KB create commit point to become visible on each service. + awaitCommitCounter(1L, new HAGlue[] { serverA, serverB, serverC }); + + // get RemoteRepository for each service. + final RemoteRepository[] repo = new RemoteRepository[3]; + + repo[0] = getRemoteRepository(serverA); + repo[1] = getRemoteRepository(serverB); + repo[2] = getRemoteRepository(serverC); + + // Verify leader vs followers. + assertEquals(HAStatusEnum.Leader, serverA.getHAStatus()); + assertEquals(HAStatusEnum.Follower, serverB.getHAStatus()); + assertEquals(HAStatusEnum.Follower, serverC.getHAStatus()); + + repo[0].cancel(UUID.randomUUID()); + repo[1].cancel(UUID.randomUUID()); + repo[2].cancel(UUID.randomUUID()); + + } + +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:57:17
|
Revision: 8072 http://sourceforge.net/p/bigdata/code/8072 Author: thompsonbry Date: 2014-04-07 12:57:15 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Removed unused method. Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java 2014-04-07 12:40:17 UTC (rev 8071) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata-jini/src/test/com/bigdata/journal/jini/ha/TestHA3JournalServer.java 2014-04-07 12:57:15 UTC (rev 8072) @@ -110,20 +110,20 @@ super(name); } - /** - * Complex hack to override the {@link HAJournal} properties. - * - * @param in - * The {@link NV}[] from the configuration (if you can get it). - * - * @return The {@link NV}[] from which the {@link Properties} will be - * constructed by {@link JiniClientConfig} - */ - public static NV[] getTestHAJournalProperties(final NV[] in) { - - return in; - - } +// /** +// * Complex hack to override the {@link HAJournal} properties. +// * +// * @param in +// * The {@link NV}[] from the configuration (if you can get it). +// * +// * @return The {@link NV}[] from which the {@link Properties} will be +// * constructed by {@link JiniClientConfig} +// */ +// public static NV[] getTestHAJournalProperties(final NV[] in) { +// +// return in; +// +// } // protected BufferMode getDiskMode() { // return BufferMode.DiskRW; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:40:21
|
Revision: 8071 http://sourceforge.net/p/bigdata/code/8071 Author: thompsonbry Date: 2014-04-07 12:40:17 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for the windows typeperf collector to change how interrupt handling is performed. It now looks for the innercause in the run() method and is quite if the inner cause has a root cause of an interrupt. See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/win/TypeperfCollector.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/win/TypeperfCollector.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/win/TypeperfCollector.java 2014-04-07 12:31:32 UTC (rev 8070) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/win/TypeperfCollector.java 2014-04-07 12:40:17 UTC (rev 8071) @@ -31,6 +31,7 @@ import java.io.IOException; import java.io.InputStreamReader; import java.io.LineNumberReader; +import java.nio.channels.ClosedByInterruptException; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Arrays; @@ -39,6 +40,7 @@ import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.concurrent.CancellationException; import org.apache.log4j.Logger; @@ -52,6 +54,7 @@ import com.bigdata.counters.IRequiredHostCounters; import com.bigdata.util.CSVReader; import com.bigdata.util.CSVReader.Header; +import com.bigdata.util.InnerCause; /** * Collects per-host performance counters on a Windows platform using @@ -68,19 +71,19 @@ */ public class TypeperfCollector extends AbstractProcessCollector { - static protected final Logger log = Logger.getLogger(TypeperfCollector.class); + static private final Logger log = Logger.getLogger(TypeperfCollector.class); - /** - * True iff the {@link #log} level is INFO or less. - */ - final protected static boolean INFO = log.isInfoEnabled(); +// /** +// * True iff the {@link #log} level is INFO or less. +// */ +// final protected static boolean INFO = log.isInfoEnabled(); +// +// /** +// * True iff the {@link #log} level is DEBUG or less. +// */ +// final protected static boolean DEBUG = log.isDebugEnabled(); /** - * True iff the {@link #log} level is DEBUG or less. - */ - final protected static boolean DEBUG = log.isDebugEnabled(); - - /** * Updated each time a new row of data is read from the process and reported * as the last modified time for counters based on that process and * defaulted to the time that we begin to collect performance data. @@ -175,6 +178,7 @@ } + @Override public Double getValue() { final Double value = (Double) vals.get(path); @@ -189,6 +193,7 @@ } + @Override public long lastModified() { return lastModified; @@ -199,7 +204,8 @@ * @throws UnsupportedOperationException * always. */ - public void setValue(Double value, long timestamp) { + @Override + public void setValue(final Double value, final long timestamp) { throw new UnsupportedOperationException(); @@ -225,6 +231,7 @@ * * @throws IOException */ + @Override public List<String> getCommand() { // make sure that our counters have been declared. @@ -243,7 +250,7 @@ // counter names need to be double quoted for the command line. command.add("\"" + decl.getCounterNameForWindows() + "\""); - if(INFO) log.info("Will collect: \"" + if(log.isInfoEnabled()) log.info("Will collect: \"" + decl.getCounterNameForWindows() + "\" as " + decl.getPath()); @@ -255,6 +262,7 @@ } + @Override public AbstractProcessReader getProcessReader() { return new ProcessReader(); @@ -290,9 +298,10 @@ } + @Override public void run() { - if(INFO) + if(log.isInfoEnabled()) log.info(""); try { @@ -300,27 +309,34 @@ // run read(); - } catch (InterruptedException e) { + } catch (Exception e) { - // Note: This is a normal exit. - if(INFO) - log.info("Interrupted - will terminate"); + if (InnerCause.isInnerCause(e, InterruptedException.class)|| + InnerCause.isInnerCause(e, ClosedByInterruptException.class)|| + InnerCause.isInnerCause(e, CancellationException.class) + ) { - } catch (Exception e) { + // Note: This is a normal exit. + if (log.isInfoEnabled()) + log.info("Interrupted - will terminate"); - // Unexpected error. - log.fatal(e.getMessage(), e); + } else { + // Unexpected error. + log.fatal(e.getMessage(), e); + + } + } - if(INFO) + if(log.isInfoEnabled()) log.info("Terminated"); } private void read() throws Exception { - if(INFO) + if(log.isInfoEnabled()) log.info(""); long nsamples = 0; @@ -345,33 +361,34 @@ */ csvReader.setTailDelayMillis(100/* ms */); - try { +// try { - // read headers from the file. - csvReader.readHeaders(); + // read headers from the file. + csvReader.readHeaders(); - } catch (IOException ex) { +// } catch (IOException ex) { +// +// /* +// * Note: An IOException thrown out here often indicates an +// * asynchronous close of of the reader. A common and benign +// * cause of that is closing the input stream because the service +// * is shutting down. +// */ +// +// if (!Thread.interrupted()) +// throw ex; +// +// throw new InterruptedException(); +// +// } - /* - * Note: An IOException thrown out here often indicates an - * asynchronous close of of the reader. A common and benign - * cause of that is closing the input stream because the service - * is shutting down. - */ - - if (!Thread.currentThread().isInterrupted()) - throw ex; - - throw new InterruptedException(); - - } - /* * replace the first header definition so that we get clean * timestamps. */ csvReader.setHeader(0, new Header("Timestamp") { - public Object parseValue(String text) { + @Override + public Object parseValue(final String text) { try { return f.parse(text); @@ -390,7 +407,7 @@ */ { - if(INFO) + if(log.isInfoEnabled()) log.info("setting up headers."); int i = 1; @@ -400,7 +417,7 @@ final String path = decl.getPath(); // String path = hostPathPrefix + decl.getPath(); - if (INFO) + if (log.isInfoEnabled()) log.info("setHeader[i=" + i + "]=" + path); csvReader.setHeader(i++, new Header(path)); @@ -409,13 +426,20 @@ } - if(INFO) + if(log.isInfoEnabled()) log.info("starting row reads"); - final Thread t = Thread.currentThread(); +// final Thread t = Thread.currentThread(); - while (!t.isInterrupted() && csvReader.hasNext()) { + while (true) { + if (Thread.interrupted()) + throw new InterruptedException(); + + if (!csvReader.hasNext()) { + break; + } + try { final Map<String, Object> row = csvReader.next(); @@ -455,7 +479,7 @@ } - if(INFO) + if(log.isInfoEnabled()) log.info("done."); } @@ -466,6 +490,7 @@ * Declares the performance counters to be collected from the Windows * platform. */ + @Override public CounterSet getCounters() { // if (root == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:31:35
|
Revision: 8070 http://sourceforge.net/p/bigdata/code/8070 Author: thompsonbry Date: 2014-04-07 12:31:32 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for interrupt handling for the asynchronous overflow task and the individual partition tasks in scale-out. See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java 2014-04-07 12:14:07 UTC (rev 8069) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/resources/AsynchronousOverflowTask.java 2014-04-07 12:31:32 UTC (rev 8070) @@ -2848,7 +2848,7 @@ /** * Note: This task is interrupted by {@link OverflowManager#shutdownNow()}. - * Therefore is tests {@link Thread#isInterrupted()} and returns immediately + * Therefore it tests {@link Thread#isInterrupted()} and returns immediately * if it has been interrupted. * * @return The return value is always null. @@ -3374,7 +3374,10 @@ static protected boolean isNormalShutdown( final ResourceManager resourceManager, final Throwable t) { - if(Thread.currentThread().isInterrupted()) return true; + if (Thread.interrupted()) { + // Note: interrupt status of thread was cleared. + return true; + } if (!resourceManager.isRunning() || !resourceManager.getConcurrencyManager() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:14:10
|
Revision: 8069 http://sourceforge.net/p/bigdata/code/8069 Author: thompsonbry Date: 2014-04-07 12:14:07 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for interrupt handling for the distributed scale-out job execution logic in the redirect and split handling test cases. See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java 2014-04-07 12:09:43 UTC (rev 8068) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithRedirect.java 2014-04-07 12:14:07 UTC (rev 8069) @@ -496,6 +496,7 @@ } + @Override public Void call() throws Exception { final KeyBuilder keyBuilder = new KeyBuilder(4); @@ -529,7 +530,7 @@ } - if (Thread.currentThread().isInterrupted()) { + if (Thread.interrupted()) { if (log.isInfoEnabled()) log.info("Producer interrupted."); @@ -591,7 +592,7 @@ while(!halt.get()) { - if(Thread.currentThread().isInterrupted()) { + if(Thread.interrupted()) { if(log.isInfoEnabled()) log.info("Redirecter interrupted."); Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java 2014-04-07 12:09:43 UTC (rev 8068) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/service/ndx/pipeline/TestMasterTaskWithSplits.java 2014-04-07 12:14:07 UTC (rev 8069) @@ -496,7 +496,7 @@ + minProducerDelay); if (halt.get() - || Thread.currentThread().isInterrupted()) { + || Thread.interrupted()) { if (log.isInfoEnabled()) log.info("Producer halting."); @@ -575,7 +575,7 @@ for (Op op : schedule) { - if (halt.get() || Thread.currentThread().isInterrupted()) { + if (halt.get() || Thread.interrupted()) { if (log.isInfoEnabled()) log.info("Redirecter halting."); @@ -593,7 +593,7 @@ Thread.sleep(delayMillis); - if (halt.get() || Thread.currentThread().isInterrupted()) { + if (halt.get() || Thread.interrupted()) { if (log.isInfoEnabled()) log.info("Redirecter halting."); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:09:46
|
Revision: 8068 http://sourceforge.net/p/bigdata/code/8068 Author: thompsonbry Date: 2014-04-07 12:09:43 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Removing child folder for bigdataHA configuration defaults. Configuration defaults were already moved to /etc/default/bigdataHA. Child folder is empty. Removed Paths: ------------- branches/BIGDATA_RELEASE_1_3_0/src/resources/etc/default/bigdata/bigdataHA Deleted: branches/BIGDATA_RELEASE_1_3_0/src/resources/etc/default/bigdata/bigdataHA =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/src/resources/etc/default/bigdata/bigdataHA 2014-04-07 12:08:45 UTC (rev 8067) +++ branches/BIGDATA_RELEASE_1_3_0/src/resources/etc/default/bigdata/bigdataHA 2014-04-07 12:09:43 UTC (rev 8068) @@ -1,46 +0,0 @@ -# Environment for bigdata HA services. -# -# binDir - The directory containing the installed scripts. -# pidFile - The pid is written on this file. -# -# Note: You MUST provide the location of the executable scripts and the -# pid file that is written by $binDir/startHAServices. These SHOULD be -# absolute path names. - -#binDir= -#pidFile= - -## -# The following variables configure the startHAServices script, which -# passes them through to HAJournal.config. -## - -# Name of the bigdata gederation of services. Override for real install. -export FEDNAME=bigdataInstallTest - -# This is different for each HA replication cluster in the same federation -# of services. If you have multiple such replication cluster, then just -# given each such cluster its own name. -export LOGICAL_SERVICE_ID=HAJournalServer-1 - -# Local directory where the service will store its state. -export FED_DIR=/var/bigdata/${FEDNAME} - -# Apache River - NO default for "LOCATORS". -export GROUPS="$FEDNAME" -#export LOCATORS="jini://bigdata15/,jini://bigdata16/,jini://bigdata17/" - -# Apache ZooKeeper - NO default. -#export ZK_SERVERS="bigdata15:2081,bigdata16:2081,bigdata17:2081"; - -# All of these have defaults. Override as necessary. -#export REPLICATION_FACTOR=3 -#export HA_PORT=9090 -#export JETTY_PORT=8080 -#export JETTY_XML=var/jetty/WEB-INF/jetty.xml -#export JETTY_RESOURCE_BASE=var/jetty -#export COLLECT_QUEUE_STATISTICS= -#export COLLECT_PLATFORM_STATISTICS= -#export GANGLIA_REPORT= -#export GANGLIA_LISTENER= -#export SYSSTAT_DIR= This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:08:49
|
Revision: 8067 http://sourceforge.net/p/bigdata/code/8067 Author: thompsonbry Date: 2014-04-07 12:08:45 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for test case. See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/cache/StressTestGlobalLRU.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/cache/StressTestGlobalLRU.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/cache/StressTestGlobalLRU.java 2014-04-07 12:08:13 UTC (rev 8066) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/test/com/bigdata/cache/StressTestGlobalLRU.java 2014-04-07 12:08:45 UTC (rev 8067) @@ -448,7 +448,7 @@ if (c.n % 1000000 == 0) { - if (Thread.currentThread().isInterrupted()) { + if (Thread.interrupted()) { /* * Notice interrupts in case we are using a This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:08:17
|
Revision: 8066 http://sourceforge.net/p/bigdata/code/8066 Author: thompsonbry Date: 2014-04-07 12:08:13 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for scale-out client-side async iterator. Bug fix for subtask used in scale-out bulk loader (async index writer). See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/ndx/pipeline/AbstractSubtask.java branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/proxy/ClientAsynchronousIterator.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/ndx/pipeline/AbstractSubtask.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/ndx/pipeline/AbstractSubtask.java 2014-04-07 12:01:15 UTC (rev 8065) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/ndx/pipeline/AbstractSubtask.java 2014-04-07 12:08:13 UTC (rev 8066) @@ -337,8 +337,8 @@ public boolean hasNext() throws InterruptedException { - // The thread in which this method runs. - final Thread t = Thread.currentThread(); +// // The thread in which this method runs. +// final Thread t = Thread.currentThread(); // when we start looking for a chunk. final long begin = System.nanoTime(); @@ -349,7 +349,7 @@ master.halted(); // interrupted? - if (t.isInterrupted()) { + if (Thread.interrupted()) { throw master.halt(new InterruptedException(toString())); Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/proxy/ClientAsynchronousIterator.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/proxy/ClientAsynchronousIterator.java 2014-04-07 12:01:15 UTC (rev 8065) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/service/proxy/ClientAsynchronousIterator.java 2014-04-07 12:08:13 UTC (rev 8066) @@ -268,10 +268,13 @@ */ private class ReaderTask implements Callable<Void> { + @Override public Void call() throws Exception { - final Thread t = Thread.currentThread(); +// final Thread t = Thread.currentThread(); + boolean interrupted = false; + try { /* @@ -299,10 +302,11 @@ if (trace) System.err.print('~'); - if (t.isInterrupted()) { + if (Thread.interrupted()) { // thread interrupted, so we are done. - break; + interrupted = true; + break; // break out of while(true) } @@ -344,10 +348,11 @@ */ // don't call blocking method next() if we were interrupted. - if (t.isInterrupted()) { + if (Thread.interrupted()) { // thread interrupted, so we are done. - break; + interrupted = true; + break; // break out of while(true) } @@ -392,7 +397,7 @@ } if (INFO) - log.info("Reader is done."); + log.info("Reader is done: interrupted" + interrupted); return null; @@ -448,7 +453,8 @@ } } - + + @Override public void close() { if (future == null) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 12:01:19
|
Revision: 8065 http://sourceforge.net/p/bigdata/code/8065 Author: thompsonbry Date: 2014-04-07 12:01:15 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for CSVReader interrupt handling plus code cleanup on that class. See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/util/CSVReader.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/util/CSVReader.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/util/CSVReader.java 2014-04-07 11:45:51 UTC (rev 8064) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/util/CSVReader.java 2014-04-07 12:01:15 UTC (rev 8065) @@ -71,9 +71,9 @@ */ public class CSVReader implements Iterator<Map<String, Object>> { - protected static final Logger log = Logger.getLogger(CSVReader.class); + private static final Logger log = Logger.getLogger(CSVReader.class); - protected static final boolean INFO = log.isInfoEnabled(); +// protected static final boolean INFO = log.isInfoEnabled(); /** * The #of characters to buffer in the reader. @@ -168,7 +168,7 @@ } - public Header(String name) { + public Header(final String name) { if (name == null) throw new IllegalArgumentException(); @@ -191,13 +191,13 @@ * * @return The parsed value. */ - public Object parseValue(String text) { + public Object parseValue(final String text) { for (int i = 0; i < formats.length; i++) { try { - Format f = formats[i]; + final Format f = formats[i]; if (f instanceof DateFormat) { @@ -229,23 +229,41 @@ /** * Equal if the headers have the same data. */ - public boolean equals(Header o) { - - if(this==o) return true; - - return name.equals(o.name); - + @Override + public boolean equals(final Object o) { + + if (this == o) + return true; + + if (!(o instanceof Header)) { + + return false; + + } + + return name.equals(((Header) o).name); + } +// public boolean equals(final Header o) { +// +// if(this==o) return true; +// +// return name.equals(o.name); +// +// } + /** * Based on the header name. */ + @Override public int hashCode() { return name.hashCode(); } + @Override public String toString() { return name; @@ -293,7 +311,8 @@ */ protected Header[] headers; - public CSVReader(InputStream is, String charSet) throws IOException { + public CSVReader(final InputStream is, final String charSet) + throws IOException { if (is == null) throw new IllegalArgumentException(); @@ -306,7 +325,7 @@ } - public CSVReader(Reader r) throws IOException { + public CSVReader(final Reader r) throws IOException { if (r == null) throw new IllegalArgumentException(); @@ -340,9 +359,9 @@ } - public boolean setSkipBlankLines(boolean skipBlankLines) { + public boolean setSkipBlankLines(final boolean skipBlankLines) { - boolean tmp = this.skipBlankLines; + final boolean tmp = this.skipBlankLines; this.skipBlankLines = skipBlankLines; @@ -356,9 +375,9 @@ } - public boolean setTrimWhitespace(boolean trimWhitespace) { + public boolean setTrimWhitespace(final boolean trimWhitespace) { - boolean tmp = this.trimWhitespace; + final boolean tmp = this.trimWhitespace; this.trimWhitespace = trimWhitespace; @@ -384,10 +403,11 @@ } - public long setTailDelayMillis(long tailDelayMillis) { - - if(tailDelayMillis<0) throw new IllegalArgumentException(); - + public long setTailDelayMillis(final long tailDelayMillis) { + + if (tailDelayMillis < 0) + throw new IllegalArgumentException(); + long tmp = this.tailDelayMillis; this.tailDelayMillis = tailDelayMillis; @@ -396,9 +416,11 @@ } + @Override public boolean hasNext() { - if(exhausted) return false; + if (exhausted) + return false; if (line != null) { @@ -406,17 +428,19 @@ } - final Thread currentThread = Thread.currentThread(); +// final Thread currentThread = Thread.currentThread(); try { while (true) { - if(currentThread.isInterrupted()) { + if (Thread.interrupted()) { - if(INFO) + if (log.isInfoEnabled()) log.info("Interrupted"); + exhausted = true; + return false; } @@ -469,6 +493,7 @@ } + @Override public Map<String, Object> next() { if (!hasNext()) @@ -496,9 +521,9 @@ * * @todo allow quoted values that contain commas. */ - protected String[] split(String line) { + protected String[] split(final String line) { - String[] cols = line.split("[,\t]"); + final String[] cols = line.split("[,\t]"); return cols; @@ -513,7 +538,7 @@ * * @return The column values. */ - protected String[] trim(String[] cols) { + protected String[] trim(final String[] cols) { if (!trimWhitespace) return cols; @@ -553,7 +578,7 @@ */ protected Map<String, Object> parse(final String[] values) { - Map<String, Object> map = new TreeMap<String, Object>(); + final Map<String, Object> map = new TreeMap<String, Object>(); if (headers == null) { @@ -571,9 +596,9 @@ for (int i = 0; i < values.length; i++) { - Header h = headers[i]; + final Header h = headers[i]; - String text = values[i]; + final String text = values[i]; map.put(h.name, h.parseValue(text)); @@ -590,14 +615,14 @@ * @param ncols * The #of columns. */ - protected void setDefaultHeaders(int ncols) { + protected void setDefaultHeaders(final int ncols) { - Header[] headers = new Header[ncols]; - - for( int i=0; i<ncols; i++) { - - headers[i] = new Header(""+(i+1)); - + final Header[] headers = new Header[ncols]; + + for (int i = 0; i < ncols; i++) { + + headers[i] = new Header("" + (i + 1)); + } this.headers = headers; @@ -612,11 +637,11 @@ * * @return The header definitions. */ - protected Header[] parseHeaders(String line) { + protected Header[] parseHeaders(final String line) { - String[] cols = trim(split(line)); + final String[] cols = trim(split(line)); - Header[] headers = new Header[cols.length]; + final Header[] headers = new Header[cols.length]; for (int i = 0; i < cols.length; i++) { @@ -661,9 +686,10 @@ * @param headers * The headers. */ - public void setHeaders(Header[] headers) { + public void setHeaders(final Header[] headers) { - if(headers==null) throw new IllegalArgumentException(); + if (headers == null) + throw new IllegalArgumentException(); this.headers = headers; @@ -677,7 +703,7 @@ * @param header * The new {@link Header} definition. */ - public void setHeader(int index,Header header) { + public void setHeader(final int index, final Header header) { if (index < 0 || index > headers.length) throw new IndexOutOfBoundsException(); @@ -692,6 +718,7 @@ /** * Unsupported operation. */ + @Override public void remove() { throw new UnsupportedOperationException(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-07 11:45:54
|
Revision: 8064 http://sourceforge.net/p/bigdata/code/8064 Author: thompsonbry Date: 2014-04-07 11:45:51 +0000 (Mon, 07 Apr 2014) Log Message: ----------- Bug fix for child process helper. See #871 (interrupt handling code review). Modified Paths: -------------- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/ProcessReaderHelper.java Modified: branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/ProcessReaderHelper.java =================================================================== --- branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/ProcessReaderHelper.java 2014-04-06 16:38:08 UTC (rev 8063) +++ branches/BIGDATA_RELEASE_1_3_0/bigdata/src/java/com/bigdata/counters/ProcessReaderHelper.java 2014-04-07 11:45:51 UTC (rev 8064) @@ -84,11 +84,11 @@ */ public String readLine() throws IOException, InterruptedException { - final Thread t = Thread.currentThread(); +// final Thread t = Thread.currentThread(); while(getActiveProcess().isAlive()) { - if(t.isInterrupted()) { + if(Thread.interrupted()) { throw new InterruptedException(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-06 16:38:11
|
Revision: 8063 http://sourceforge.net/p/bigdata/code/8063 Author: mrpersonick Date: 2014-04-06 16:38:08 +0000 (Sun, 06 Apr 2014) Log Message: ----------- fixed SSSP/BigdataGASState to use RDR to take into account the edge value if the linkAttrType property is specified Modified Paths: -------------- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java Added Paths: ----------- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl Removed Paths: ------------- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq Modified: branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-gas/src/java/com/bigdata/rdf/graph/analytics/SSSP.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -21,14 +21,11 @@ import java.util.concurrent.atomic.AtomicReference; import org.apache.log4j.Logger; +import org.openrdf.model.Literal; import org.openrdf.model.Statement; import org.openrdf.model.Value; import org.openrdf.model.ValueFactory; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - -import com.bigdata.bop.IBindingSet; -import com.bigdata.bop.IVariable; import com.bigdata.rdf.graph.BinderBase; import com.bigdata.rdf.graph.EdgesEnum; import com.bigdata.rdf.graph.Factory; @@ -77,7 +74,7 @@ * is a single link attribute type that is of interest, so the caller should * also be able to specify that. */ - private final static int EDGE_LENGTH = 1; + private final static double EDGE_LENGTH = 1.0f; public static class VS { @@ -90,7 +87,7 @@ * double. We also need tests with non-integer weights and non- positive * weights. */ - private Integer dist = Integer.MAX_VALUE; + private Double dist = Double.MAX_VALUE; // /** // * Note: This flag is cleared by apply() and then conditionally set @@ -145,7 +142,7 @@ * to this vertex and {@link Integer#MAX_VALUE} until this vertex is * visited. */ - public int dist() { + public double dist() { synchronized (this) { return dist; } @@ -166,7 +163,7 @@ synchronized private void setStartingVertex() { // Set distance to zero for starting vertex. - dist = 0; + dist = 0.0; this.predecessor.set(null); // // Must be true to trigger scatter in the 1st round! @@ -220,7 +217,7 @@ * @return <code>true</code> iff this vertex state was changed. */ synchronized private boolean scatter(final Value predecessor, - final int newDist) { + final double newDist) { /* * Validate that the distance has decreased while holding the lock. */ @@ -399,11 +396,22 @@ final VS otherState = state.getState(other); + final double edgeLength; + if (e.getObject() instanceof Literal) { + + edgeLength = ((Literal) e.getObject()).doubleValue(); + + } else { + + edgeLength = EDGE_LENGTH; + + } + // new distance for the remote vertex. - final int newDist = selfState.dist() + EDGE_LENGTH; + final double newDist = selfState.dist() + edgeLength; //EDGE_LENGTH; // last observed distance for the remote vertex. - final int otherDist = otherState.dist(); + final double otherDist = otherState.dist(); // Note: test first without lock. if (newDist < otherDist) { Modified: branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java =================================================================== --- branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-gas/src/test/com/bigdata/rdf/graph/analytics/TestSSSP.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -70,13 +70,13 @@ // Converge. gasContext.call(); - assertEquals(0, gasState.getState(p.getMike()).dist()); + assertEquals(0.0, gasState.getState(p.getMike()).dist()); - assertEquals(1, gasState.getState(p.getFoafPerson()).dist()); + assertEquals(1.0, gasState.getState(p.getFoafPerson()).dist()); - assertEquals(1, gasState.getState(p.getBryan()).dist()); + assertEquals(1.0, gasState.getState(p.getBryan()).dist()); - assertEquals(2, gasState.getState(p.getMartyn()).dist()); + assertEquals(2.0, gasState.getState(p.getMartyn()).dist()); } finally { Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/graph/impl/bd/BigdataGASState.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -191,4 +191,29 @@ } + @Override + @SuppressWarnings("rawtypes") + public Value getOtherVertex(final Value u, final Statement e) { + + if (e.getSubject() instanceof SidIV) { + + final ISPO spo = ((SidIV) e.getSubject()).getInlineValue(); + + if (spo.s().equals(u)) + return spo.o(); + + return spo.s(); + + } else { + + if (e.getSubject().equals(u)) + return e.getObject(); + + return e.getSubject(); + + } + + } + + } Modified: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/TestPaths.java 2014-04-06 16:38:08 UTC (rev 8063) @@ -139,7 +139,47 @@ // // } // -// public void testSimpleSSSP() throws Exception { + public void testSimpleSSSP() throws Exception { + + final BigdataSail sail = getSail(); + sail.initialize(); + final BigdataSailRepository repo = new BigdataSailRepository(sail); + + final BigdataSailRepositoryConnection cxn = repo.getConnection(); + cxn.setAutoCommit(false); + + try { + + cxn.add(open("sssp.ttl"), "", RDFFormat.TURTLE); + cxn.commit(); + + log.trace("\n" + sail.getDatabase().dumpStore()); + + final String query = IOUtils.toString(open("sssp.rq")); + + log.trace("\n" + query); + + final TupleQuery tqr = cxn.prepareTupleQuery(QueryLanguage.SPARQL, + query); + + final TupleQueryResult result = tqr.evaluate(); + + while (result.hasNext()) { + + log.trace(result.next()); + + } + + result.close(); + + } finally { + cxn.close(); + sail.__tearDownUnitTest(); + } + + } + +// public void testPaths() throws Exception { // // final BigdataSail sail = getSail(); // sail.initialize(); @@ -150,12 +190,12 @@ // // try { // -// cxn.add(open("paths2.ttl"), "", RDFFormat.TURTLE); +// cxn.add(open("paths4.ttl"), "", RDFFormat.TURTLE); // cxn.commit(); // // log.trace("\n"+sail.getDatabase().dumpStore()); // -// final String query = IOUtils.toString(open("paths2.rq")); +// final String query = IOUtils.toString(open("paths4.rq")); // // log.trace("\n"+query); // @@ -178,43 +218,4 @@ // // } - public void testPaths() throws Exception { - - final BigdataSail sail = getSail(); - sail.initialize(); - final BigdataSailRepository repo = new BigdataSailRepository(sail); - - final BigdataSailRepositoryConnection cxn = repo.getConnection(); - cxn.setAutoCommit(false); - - try { - - cxn.add(open("paths4.ttl"), "", RDFFormat.TURTLE); - cxn.commit(); - - log.trace("\n"+sail.getDatabase().dumpStore()); - - final String query = IOUtils.toString(open("paths4.rq")); - - log.trace("\n"+query); - - final TupleQuery tqr = cxn.prepareTupleQuery(QueryLanguage.SPARQL, query); - - final TupleQueryResult result = tqr.evaluate(); - - while (result.hasNext()) { - - log.trace(result.next()); - - } - - result.close(); - - } finally { - cxn.close(); - sail.__tearDownUnitTest(); - } - - } - } Deleted: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq 2014-04-06 16:36:28 UTC (rev 8062) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq 2014-04-06 16:38:08 UTC (rev 8063) @@ -1,11 +0,0 @@ -PREFIX gas: <http://www.bigdata.com/rdf/gas#> -SELECT * { - SERVICE gas:service { - gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" . - gas:program gas:in </:source> . # starting point - gas:program gas:target </:target> . # target vertices - gas:program gas:out ?s . # bound to the visited vertices. - gas:program gas:out1 ?distance . # bound to the distance of the visited vertices. - gas:program gas:out2 ?pred . # bound to the predecessor - } -} order by ?distance \ No newline at end of file Copied: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq (from rev 8059, branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths2.rq) =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.rq 2014-04-06 16:38:08 UTC (rev 8063) @@ -0,0 +1,13 @@ +PREFIX gas: <http://www.bigdata.com/rdf/gas#> +SELECT * { + SERVICE gas:service { + gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.SSSP" . + gas:program gas:in </:source> . # starting point + gas:program gas:target </:target1> . # target vertices + gas:program gas:target </:target2> . # target vertices + gas:program gas:linkAttrType </:cost> . # link attribute type + gas:program gas:out ?v . # bound to the visited vertices. + gas:program gas:out1 ?distance . # bound to the distance of the visited vertices. + gas:program gas:out2 ?pred . # bound to the predecessor + } +} order by ?distance \ No newline at end of file Added: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/sssp.ttl 2014-04-06 16:38:08 UTC (rev 8063) @@ -0,0 +1,14 @@ +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix bd: <http://www.bigdata.com/rdf#> . +@prefix : <:> . + +# target1: 3 hops, cost = 1.5 +<<:source :edge :a>> :cost "0.5"^^xsd:float . +<<:a :edge :b>> :cost "0.5"^^xsd:float . +<<:b :edge :target1>> :cost "0.5"^^xsd:float . + +# target2: 4 hops, cost = 1.0 +<<:source :edge :c>> :cost "0.25"^^xsd:float . +<<:c :edge :d>> :cost "0.25"^^xsd:float . +<<:d :edge :e>> :cost "0.25"^^xsd:float . +<<:e :edge :target2>> :cost "0.25"^^xsd:float . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-06 16:36:31
|
Revision: 8062 http://sourceforge.net/p/bigdata/code/8062 Author: mrpersonick Date: 2014-04-06 16:36:28 +0000 (Sun, 06 Apr 2014) Log Message: ----------- fixed the toString method to handle Sids more gracefully Modified Paths: -------------- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java Modified: branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java =================================================================== --- branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java 2014-04-06 15:09:14 UTC (rev 8061) +++ branches/RDR/bigdata-rdf/src/java/com/bigdata/rdf/store/AbstractTripleStore.java 2014-04-06 16:36:28 UTC (rev 8062) @@ -95,6 +95,7 @@ import com.bigdata.rdf.internal.IExtension; import com.bigdata.rdf.internal.IExtensionFactory; import com.bigdata.rdf.internal.IV; +import com.bigdata.rdf.internal.NotMaterializedException; import com.bigdata.rdf.internal.VTE; import com.bigdata.rdf.internal.constraints.RangeBOp; import com.bigdata.rdf.internal.impl.BlobIV; @@ -3275,13 +3276,19 @@ // // } - final BigdataValue v = getTerm(iv); + String s = ""; + + try { + + final BigdataValue v = getTerm(iv); + + if (v == null) + return "<NOT_FOUND#" + iv + ">"; + + s = (v instanceof URI ? abbrev((URI) v) : v.toString()); + + } catch (NotMaterializedException ex) { } - if (v == null) - return "<NOT_FOUND#" + iv + ">"; - - final String s = (v instanceof URI ? abbrev((URI) v) : v.toString()); - return s + ("(" + iv + ")"); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tho...@us...> - 2014-04-06 15:09:20
|
Revision: 8061 http://sourceforge.net/p/bigdata/code/8061 Author: thompsonbry Date: 2014-04-06 15:09:14 +0000 (Sun, 06 Apr 2014) Log Message: ----------- Reconciled my version and Martyns with respect to the HA1/HA5 edits. See #721 (HA1) See #722 (HA5) Modified Paths: -------------- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/rwstore/RWStore.java branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HARestore.java branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java =================================================================== --- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2014-04-05 15:59:33 UTC (rev 8060) +++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/journal/AbstractJournal.java 2014-04-06 15:09:14 UTC (rev 8061) @@ -3555,13 +3555,17 @@ * file. */ final QuorumService<HAGlue> localService = quorum.getClient(); - try { - localService.logRootBlock(newRootBlock); - } catch (IOException e) { - throw new RuntimeException(e); + if (localService != null) { + // Quorum service not asynchronously closed. + try { + // Write the closing root block on the HALog file. + localService.logRootBlock(newRootBlock); + } catch (IOException e) { + throw new RuntimeException(e); + } } } - + if (txLog.isInfoEnabled()) txLog.info("COMMIT: commitTime=" + commitTime); @@ -3812,7 +3816,7 @@ if (log.isInfoEnabled()) log.info("commitTime=" + commitTime); - final CommitState cs = new CommitState(this, commitTime); + final CommitState cs = new CommitState(this, commitTime); /* * Flush application data, decide whether or not the store is dirty, @@ -3828,7 +3832,6 @@ } // Do GATHER (iff HA). - cs.gatherPhase(); /* @@ -3872,7 +3875,7 @@ // Non-HA mode. cs.commitSimple(); - } else { + } else { // HA mode commit (2-phase commit). cs.commitHA(); Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/rwstore/RWStore.java =================================================================== --- branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2014-04-05 15:59:33 UTC (rev 8060) +++ branches/BIGDATA_MGC_HA1_HA5/bigdata/src/java/com/bigdata/rwstore/RWStore.java 2014-04-06 15:09:14 UTC (rev 8061) @@ -1080,8 +1080,8 @@ private RWWriteCacheService newWriteCacheService() { try { - final boolean highlyAvailable = m_quorum != null - && m_quorum.isHighlyAvailable(); +// final boolean highlyAvailable = m_quorum != null +// && m_quorum.isHighlyAvailable(); final boolean prefixWrites = m_quorum != null; // highlyAvailable @@ -1089,7 +1089,8 @@ m_minCleanListSize, m_readCacheBufferCount, prefixWrites, m_compactionThreshold, m_hotCacheSize, m_hotCacheThreshold, convertAddr(m_fileSize), m_reopener, m_quorum, this) { - + + @Override @SuppressWarnings("unchecked") public WriteCache newWriteCache(final IBufferAccess buf, final boolean useChecksum, Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HARestore.java =================================================================== --- branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HARestore.java 2014-04-05 15:59:33 UTC (rev 8060) +++ branches/BIGDATA_MGC_HA1_HA5/bigdata-jini/src/java/com/bigdata/journal/jini/ha/HARestore.java 2014-04-06 15:09:14 UTC (rev 8061) @@ -517,10 +517,11 @@ final long commitCounter = SnapshotManager .parseCommitCounterFile(journalFile.getName()); + // TODO Note: Accept version from main development branch when merging versions. // temporary file in the same directory as the snapshot. - final File out = File.createTempFile("" + commitCounter + "-", - Journal.Options.JNL, journalFile.getAbsoluteFile() - .getParentFile()); + final File out = File.createTempFile("HARestore-TMP" + + commitCounter + "-", Journal.Options.JNL, journalFile + .getAbsoluteFile().getParentFile()); System.out.println("Decompressing " + in + " to " + out); Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java =================================================================== --- branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java 2014-04-05 15:59:33 UTC (rev 8060) +++ branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/SD.java 2014-04-06 15:09:14 UTC (rev 8061) @@ -164,12 +164,29 @@ + "KB/IsolatableIndices"); /** - * A highly available deployment. + * A highly available deployment - this feature refers to the presence of + * the {@link HAGlue} interface, the capability for online backups, and the + * existence of a targer {@link #ReplicationFactor}. You must consult the + * target {@link #ReplicationFactor} in order to determine whether the + * database is in principle capable of tolerating one or more failures and + * the actual #of running joined instances to determine whether the database + * can withstand a failure. */ static public final URI HighlyAvailable = new URIImpl(BDFNS + "HighlyAvailable"); /** + * The value of this feature is the target replication factor for the + * database expressed as an <code>xsd:int</code>. If this is ONE (1), then + * the database is setup with a quorum and has the capability for online + * backup, but it is not replicated. TWO (2) indicates mirroring, but is not + * highly available. THREE (3) is the minimum configuration that can + * withstand a failure. + */ + static public final URI ReplicationFactor = new URIImpl(BDFNS + + "replicationCount"); + + /** * An {@link IBigdataFederation}. */ static public final URI ScaleOut = new URIImpl(BDFNS @@ -647,8 +664,13 @@ final Quorum<HAGlue, QuorumService<HAGlue>> quorum = jnl .getQuorum(); - if (quorum != null && quorum.isHighlyAvailable()) { + if (quorum != null) { + final int k = quorum.replicationFactor(); + + g.add(aService, SD.ReplicationFactor, tripleStore + .getValueFactory().createLiteral(k)); + g.add(aService, SD.feature, HighlyAvailable); } Modified: branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java =================================================================== --- branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java 2014-04-05 15:59:33 UTC (rev 8060) +++ branches/BIGDATA_MGC_HA1_HA5/bigdata-sails/src/java/com/bigdata/rdf/sail/webapp/StatusServlet.java 2014-04-06 15:09:14 UTC (rev 8061) @@ -505,7 +505,7 @@ final Quorum<HAGlue, QuorumService<HAGlue>> quorum = ((AbstractJournal) getIndexManager()) .getQuorum(); - if (quorum != null && quorum.isHighlyAvailable()) { + if (quorum != null) {//&& quorum.isHighlyAvailable()) { new HAStatusServletUtil(getIndexManager()).doGet(req, resp, current); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mrp...@us...> - 2014-04-05 15:59:36
|
Revision: 8060 http://sourceforge.net/p/bigdata/code/8060 Author: mrpersonick Date: 2014-04-05 15:59:33 +0000 (Sat, 05 Apr 2014) Log Message: ----------- more testing of the PATHS program Modified Paths: -------------- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq Added Paths: ----------- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/forward.rq branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths5.ttl branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/reverse.rq Added: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/forward.rq =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/forward.rq (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/forward.rq 2014-04-05 15:59:33 UTC (rev 8060) @@ -0,0 +1,17 @@ +PREFIX gas: <http://www.bigdata.com/rdf/gas#> +SELECT * { + SERVICE gas:service { + gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.PATHS" . + gas:program gas:in </:target> . # starting point + gas:program gas:traversalDirection "Forward" . + gas:program gas:maxIterations 2 . + # set this to something that reasonably constrains the runtime + gas:program gas:maxVisited 100000 . + gas:program gas:out ?o . # bound to the visited vertices. + gas:program gas:out1 ?depth . # bound to the depth + gas:program gas:out2 ?s . # bound to the pred + gas:program gas:out3 ?p . # bound to the edge + } + #?s </:edge> ?o . + filter(?o != </:target>) . +} order by ?depth \ No newline at end of file Modified: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq 2014-04-05 01:32:08 UTC (rev 8059) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths4.rq 2014-04-05 15:59:33 UTC (rev 8060) @@ -16,5 +16,5 @@ gas:program gas:out3 ?p . # bound to the edge } #?s </:edge> ?o . - #filter(?s != </:target>) . + filter(?s != </:target>) . } order by ?depth \ No newline at end of file Added: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths5.ttl =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths5.ttl (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/paths5.ttl 2014-04-05 15:59:33 UTC (rev 8060) @@ -0,0 +1,24 @@ +@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . +@prefix bd: <http://www.bigdata.com/rdf#> . +@prefix : <:> . + +:target :edge :a . +:a :edge :b . +:b :edge :c . + +:target :edge :c . +:c :edge :d . +:d :edge :e . + +:target :edge :f . +:f :edge :g . +:g :edge :h . +:h :edge :i . + +:target :edge :j . +:j :edge :k . +:k :edge :l . +:l :edge :m . +:m :edge :n . + + Added: branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/reverse.rq =================================================================== --- branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/reverse.rq (rev 0) +++ branches/RDR/bigdata-sails/src/test/com/bigdata/rdf/sail/graph/reverse.rq 2014-04-05 15:59:33 UTC (rev 8060) @@ -0,0 +1,16 @@ +PREFIX gas: <http://www.bigdata.com/rdf/gas#> +SELECT * { + SERVICE gas:service { + gas:program gas:gasClass "com.bigdata.rdf.graph.analytics.PATHS" . + gas:program gas:in </:target> . # starting point + gas:program gas:traversalDirection "Reverse" . + gas:program gas:maxIterations 2 . + # set this to something that reasonably constrains the runtime + gas:program gas:maxVisited 100000 . + gas:program gas:out ?s . # bound to the visited vertices. + gas:program gas:out1 ?depth . # bound to the depth + gas:program gas:out2 ?o . # bound to the pred + gas:program gas:out3 ?p . # bound to the edge + } + filter(?s != </:target>) . +} order by ?depth \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-05 01:32:12
|
Revision: 8059 http://sourceforge.net/p/bigdata/code/8059 Author: tobycraig Date: 2014-04-05 01:32:08 +0000 (Sat, 05 Apr 2014) Log Message: ----------- #876 - Show filename of uploaded file that is too large to fit in textbox Modified Paths: -------------- branches/RDR/bigdata-war/src/html/index.html Modified: branches/RDR/bigdata-war/src/html/index.html =================================================================== --- branches/RDR/bigdata-war/src/html/index.html 2014-04-05 01:27:09 UTC (rev 8058) +++ branches/RDR/bigdata-war/src/html/index.html 2014-04-05 01:32:08 UTC (rev 8059) @@ -47,7 +47,7 @@ </div> <textarea id="load-box" placeholder="(Type in or drag a file containing RDF data, a SPARQL update or a file path or URL)"></textarea> - <p id="large-file-message">Your file is too large to display here, but will be uploaded as normal. <a href="#" id="clear-file">Remove file</a></p> + <p id="large-file-message">Your file <span id="filename"></span> is too large to display here, but will be uploaded as normal. <a href="#" id="clear-file">Remove file</a></p> <p> <input type="file" id="load-file"><br> <label for="load-type">Type:</label> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <tob...@us...> - 2014-04-05 01:27:12
|
Revision: 8058 http://sourceforge.net/p/bigdata/code/8058 Author: tobycraig Date: 2014-04-05 01:27:09 +0000 (Sat, 05 Apr 2014) Log Message: ----------- #877 - Fixed error with RDF format selector not appearing Modified Paths: -------------- branches/RDR/bigdata-war/src/html/js/workbench.js Modified: branches/RDR/bigdata-war/src/html/js/workbench.js =================================================================== --- branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-05 01:16:51 UTC (rev 8057) +++ branches/RDR/bigdata-war/src/html/js/workbench.js 2014-04-05 01:27:09 UTC (rev 8058) @@ -339,8 +339,8 @@ $('#load-box').on('dragover', handleDragOver) .on('drop', handleFile) .on('paste', handlePaste) - .bind('keydown', 'ctrl+return', submitLoad) - .change(handleTypeChange); + .bind('keydown', 'ctrl+return', submitLoad); +$('#load-type').change(handleTypeChange); $('#clear-file').click(clearFile); $('#load-load').click(submitLoad); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |