You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by ss...@apache.org on 2013/11/26 10:10:32 UTC
git commit: some more logging and automatic initialisation on
startRDF if not initialised
Updated Branches:
refs/heads/develop 2b6337d5e -> 6e31f33b0
some more logging and automatic initialisation on startRDF if not initialised
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/6e31f33b
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/6e31f33b
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/6e31f33b
Branch: refs/heads/develop
Commit: 6e31f33b01dc0e6e251d6f114a66e723c1a283b7
Parents: 2b6337d
Author: Sebastian Schaffert <ss...@apache.org>
Authored: Tue Nov 26 10:10:30 2013 +0100
Committer: Sebastian Schaffert <ss...@apache.org>
Committed: Tue Nov 26 10:10:30 2013 +0100
----------------------------------------------------------------------
.../apache/marmotta/kiwi/loader/generic/KiWiHandler.java | 10 ++++++++++
1 file changed, 10 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/marmotta/blob/6e31f33b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
----------------------------------------------------------------------
diff --git a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
index 8eaa151..959a55e 100644
--- a/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
+++ b/libraries/kiwi/kiwi-loader/src/main/java/org/apache/marmotta/kiwi/loader/generic/KiWiHandler.java
@@ -68,6 +68,7 @@ public class KiWiHandler implements RDFHandler {
protected Date importDate;
+ protected boolean initialised = false;
public KiWiHandler(KiWiStore store, KiWiLoaderConfiguration config) {
this.config = config;
@@ -118,11 +119,14 @@ public class KiWiHandler implements RDFHandler {
* Perform initialisation, e.g. dropping indexes or other preparations.
*/
public void initialise() throws RDFHandlerException {
+ log.info("KiWiLoader: initialising RDF handler");
try {
this.connection = store.getPersistence().getConnection();
} catch (SQLException e) {
throw new RDFHandlerException(e);
}
+
+ initialised = true;
}
@@ -130,12 +134,15 @@ public class KiWiHandler implements RDFHandler {
* Peform cleanup on shutdown, e.g. re-creating indexes after import completed
*/
public void shutdown() throws RDFHandlerException {
+ log.info("KiWiLoader: shutting down RDF handler");
try {
connection.close();
} catch (SQLException e) {
throw new RDFHandlerException(e);
}
+ initialised = false;
+
}
/**
@@ -170,6 +177,9 @@ public class KiWiHandler implements RDFHandler {
*/
@Override
public void startRDF() throws RDFHandlerException {
+ if(!initialised) {
+ initialise();
+ }
log.info("KiWiLoader: starting RDF bulk import");
this.start = System.currentTimeMillis();