Issue
I am trying to send a large file(1GB) to virtuoso local server using jena and its taking a lot of time according to my current implementation
VirtGraph graph = new VirtGraph("graphName", "jdbc:virtuoso://localhost:1111", "dba", "dba");
final String filename = Paths.get("ttlFilePath").toString();
CollectorStreamTriples inputStream = new CollectorStreamTriples();
RDFParser.source(filename).parse(inputStream);
long start1 = System.nanoTime();
for (Triple triple : inputStream.getCollected()) {
graph.add(triple);
System.out.println(triple);
}
Is thier any way i can drastically reduce the time taken by maybe doing some batch processing or dividing my file into smaller pieces?
Solution
Our RDFLoader Jena example is a Virtuoso Jena sample of uploading RDF data to Virtuoso DBMS. It includes support of transactions and deadlock handler.
Answered By - Sergey Malinin
Answer Checked By - Cary Denson (JavaFixing Admin)