You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by afs <gi...@git.apache.org> on 2018/05/18 19:41:16 UTC
[GitHub] jena pull request #423: Tweaks
GitHub user afs opened a pull request:
https://github.com/apache/jena/pull/423
Tweaks
This PR contains some small items that happened while developing a new bulk loader for TDB2 (not necessarily related to that work but the branch was picking up minor changes)
* Fixes to the DBOE transaction system so that external code can create dummy transaction coordinators.
* SSE accept ANY for a node (see users@)
* Expose the langMatches algorithm for Nodes, not just NodeValues.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/afs/jena tweaks
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/jena/pull/423.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #423
----
commit 9e69effb1b2dcc943973364edf15c661d82933f6
Author: Andy Seaborne <an...@...>
Date: 2018-05-15T14:31:00Z
SSE: symbol ANY (case insensitive) for Node.ANY, synonym "_".
commit 194a3beb63ffcb36b35b82d6fb332778126b1307
Author: Andy Seaborne <an...@...>
Date: 2018-05-15T14:38:36Z
Transactions for the dataset means prefixes can be simpler.
commit 54db3569590a4a059ac12b4b99dc06a345d26053
Author: Andy Seaborne <an...@...>
Date: 2018-05-15T14:39:22Z
End transaction on commit.
commit 0ab2a9068deff342efd05345126ea923898325c8
Author: Andy Seaborne <an...@...>
Date: 2018-05-15T14:39:34Z
Tidy up.
commit a3271014d7441a9174bd7e73e622a33710e84818
Author: Andy Seaborne <an...@...>
Date: 2018-05-15T14:52:35Z
More tests for SSE BuilderNode.
commit 5633669b75b3d27e63a5724c7adec6b553c3c5d0
Author: Andy Seaborne <an...@...>
Date: 2018-05-17T07:15:26Z
Provide programmatic node-access to the lang matching algorithm.
----
---
[GitHub] jena pull request #423: Tweaks
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/jena/pull/423
---
[GitHub] jena pull request #423: Tweaks
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/423#discussion_r189391950
--- Diff: jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java ---
@@ -254,28 +254,33 @@ public static String lang(Node node) {
}
// -------- langMatches
+ /** LANGMATCHES - first argument is a language string */
--- End diff --
Ah, I didn't know that, but at least I just learnt about `LANGMATCHES`!
---
[GitHub] jena pull request #423: Tweaks
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/423#discussion_r189388383
--- Diff: jena-db/jena-dboe-transaction/src/main/java/org/apache/jena/dboe/transaction/txn/TransactionCoordinator.java ---
@@ -88,6 +89,22 @@
// See also {@code lock} which protects the datastructures during transaction management.
private ReadWriteLock exclusivitylock = new ReentrantReadWriteLock() ;
+ // The version is the serialization point for a transaction.
+ // All transactions on the same view of the data get the same serialization point.
+
+ // A read transaction can be promoted if writer does not start
+ // This TransactionCoordinator provides Serializable, Read-lock-free
+ // execution. With no item locking, a read can only be promoted
+ // if no writer started since the reader started or if it is "read committed",
+ // seeing changes made since it started and comitted at the poiont of promotion.
+
+ /* The version of the data - incremented when transaction commits.
+ * This is the version with repest to the last commited transaction.
+ * Aborts do not cause the data version to advance.
+ * This counterr never goes backwards.
--- End diff --
typo `counterr` => `counter`
---
[GitHub] jena pull request #423: Tweaks
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/423#discussion_r189391486
--- Diff: jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java ---
@@ -254,28 +254,33 @@ public static String lang(Node node) {
}
// -------- langMatches
+ /** LANGMATCHES - first argument is a language string */
--- End diff --
It is a reminder that LANGMATCHEs, in SPARQL takes a language string, not the literal with the language string, which catches people out sometime. I can turn it into \@params.
---
[GitHub] jena pull request #423: Tweaks
Posted by afs <gi...@git.apache.org>.
Github user afs commented on a diff in the pull request:
https://github.com/apache/jena/pull/423#discussion_r189391030
--- Diff: jena-db/jena-dboe-transaction/src/main/java/org/apache/jena/dboe/transaction/txn/TransactionCoordinator.java ---
@@ -88,6 +89,22 @@
// See also {@code lock} which protects the datastructures during transaction management.
private ReadWriteLock exclusivitylock = new ReentrantReadWriteLock() ;
+ // The version is the serialization point for a transaction.
+ // All transactions on the same view of the data get the same serialization point.
+
+ // A read transaction can be promoted if writer does not start
+ // This TransactionCoordinator provides Serializable, Read-lock-free
+ // execution. With no item locking, a read can only be promoted
+ // if no writer started since the reader started or if it is "read committed",
+ // seeing changes made since it started and comitted at the poiont of promotion.
+
+ /* The version of the data - incremented when transaction commits.
+ * This is the version with repest to the last commited transaction.
+ * Aborts do not cause the data version to advance.
+ * This counterr never goes backwards.
--- End diff --
lang="pirate"
---
[GitHub] jena pull request #423: Tweaks
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/423#discussion_r189388102
--- Diff: jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java ---
@@ -254,28 +254,33 @@ public static String lang(Node node) {
}
// -------- langMatches
+ /** LANGMATCHES - first argument is a language string */
--- End diff --
This seems like a `@param`?
```
/** LANGMATCHES
@param nv a language string
*/
```
---
[GitHub] jena pull request #423: Tweaks
Posted by ajs6f <gi...@git.apache.org>.
Github user ajs6f commented on a diff in the pull request:
https://github.com/apache/jena/pull/423#discussion_r189388128
--- Diff: jena-arq/src/main/java/org/apache/jena/sparql/expr/nodevalue/NodeFunctions.java ---
@@ -254,28 +254,33 @@ public static String lang(Node node) {
}
// -------- langMatches
+ /** LANGMATCHES - first argument is a language string */
public static NodeValue langMatches(NodeValue nv, NodeValue nvPattern) {
return langMatches(nv, nvPattern.getString()) ;
}
+ /** LANGMATCHES - first argument is a language string */
--- End diff --
Ditto.
---