You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@clerezza.apache.org by re...@apache.org on 2011/06/15 11:02:52 UTC

svn commit: r1135966 - /incubator/clerezza/trunk/parent/rdf.jena.tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java

Author: reto
Date: Wed Jun 15 09:02:51 2011
New Revision: 1135966

URL: http://svn.apache.org/viewvc?rev=1135966&view=rev
Log:
CLEREZZA-566: caching and logging exceptions loading triple collections

Modified:
    incubator/clerezza/trunk/parent/rdf.jena.tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java

Modified: incubator/clerezza/trunk/parent/rdf.jena.tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java
URL: http://svn.apache.org/viewvc/incubator/clerezza/trunk/parent/rdf.jena.tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java?rev=1135966&r1=1135965&r2=1135966&view=diff
==============================================================================
--- incubator/clerezza/trunk/parent/rdf.jena.tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java (original)
+++ incubator/clerezza/trunk/parent/rdf.jena.tdb.storage/src/main/java/org/apache/clerezza/rdf/jena/tdb/storage/TdbTcProvider.java Wed Jun 15 09:02:51 2011
@@ -341,15 +341,19 @@ public class TdbTcProvider implements We
 		}
 	}
 
+
 	private void loadGraphs() {
 		File graphsDir = new File(new File(dataPathString), "graph");
 		if (graphsDir.exists()) {
 			for (String graphDirName : graphsDir.list()) {
 				try {
 					UriRef uri = new UriRef(URLDecoder.decode(graphDirName, "utf-8"));
+					log.info("loading: "+graphDirName);
 					graphMap.put(uri, getGraph(new File(graphsDir, graphDirName)));
 				} catch (UnsupportedEncodingException ex) {
 					throw new RuntimeException("utf-8 not supported", ex);
+				} catch (Exception e) {
+					log.error("Could not load tdb graph in "+graphDirName, e);
 				}
 			}
 		}
@@ -361,9 +365,12 @@ public class TdbTcProvider implements We
 			for (String mGraphDirName : mGraphsDir.list()) {
 				try {
 					UriRef uri = new UriRef(URLDecoder.decode(mGraphDirName, "utf-8"));
+					log.info("loading: "+mGraphDirName);
 					mGraphMap.put(uri, new LockableMGraphWrapper(getMGraph(new File(mGraphsDir, mGraphDirName))));
 				} catch (UnsupportedEncodingException ex) {
 					throw new RuntimeException("utf-8 not supported", ex);
+				} catch (Exception e) {
+					log.error("Could not load tdb graph in "+mGraphDirName, e);
 				}
 			}
 		}