Conversation
@Override | ||
protected long sparqlInsert(String pid, TransactionState tx) | ||
throws IOException { | ||
String uri = this.fedoraUri + "/rest/objects/" + pid; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inserting sparql should optionally work with transactions, so just need to swap out the this.fedoraUri bit with getFedoraRestUri(tx)
The ticket mentions "SPARQL_UPDATE and SPARQL READ", it looks like this PR just includes SPARQL_INSERT though. Do you want to include SPARQL_READ in this PR or in a different one? Also, minor note, but I think your IDE is configured to 80 character line lengths, which caused a lot of unrelated whitespace changes in BenchTool.java You will probably also need to pull from master since this PR is behind the no-purge-switch commit now |
@Override | ||
protected long sparqlSelect(String pid, TransactionState tx) | ||
throws IOException { | ||
String sparqlUri =this.fedoraUri + "/rest/fcr:sparql"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sparql select does not work with transactions it seems since the fcr:sparql endpoint does not recognize the tx path part of the URI
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm kind of surprised since it works with sparql insert. It could just be because of this other ticket https://www.pivotaltracker.com/story/show/66262856 ?
@bbpennel I think we agreed on 80 characters width for the eclipse project. At least that's what I have in my fedora-specific eclipse settings... |
This just needs to be rebased to master than its good to go |
I rebased on master an changed the formatting in a separate commit. |
It all looks good now, I will probably update my transaction bench marking statistics in the wiki to include sparql_insert soon. |
This adds an action to bechtool allowing the benchmarking of a simple sparql insert query