You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jena.apache.org by "Andy Seaborne (Updated) (JIRA)" <ji...@apache.org> on 2011/10/09 16:45:29 UTC
[jira] [Updated] (JENA-125) OutOfMemoryError when adding data to
the TDB model
[ https://issues.apache.org/jira/browse/JENA-125?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andy Seaborne updated JENA-125:
-------------------------------
Priority: Minor (was: Major)
Issue Type: Improvement (was: Bug)
> OutOfMemoryError when adding data to the TDB model
> --------------------------------------------------
>
> Key: JENA-125
> URL: https://issues.apache.org/jira/browse/JENA-125
> Project: Jena
> Issue Type: Improvement
> Components: TDB
> Environment: Fedora 64-bit.
> Using 32-bit JVM or manually setting FileMode.direct with 64-bit JVM.
> Jena 2.6.4, TDB 0.8.10.
> Reporter: Mikhail Sogrin
> Priority: Minor
>
> There's an OutOfMemory exception when adding data to the TDB model with the following code:
> public class JenaAddPerfTest {
> private Model model;
> private Resource cls;
>
> @Before
> public void init() {
> File file = new File(System.getProperty("java.io.tmpdir")+"/test-"+UUID.randomUUID().toString());
> file.mkdirs();
>
> model = TDBFactory.createModel(file.getAbsolutePath());
> cls = model.createResource("http://example.com/class");
> cls.addProperty(RDF.type, OWL.Class);
> cls.addProperty(RDFS.subClassOf, OWL.Thing);
> }
>
> @After
> public void close() {
> model.close();
> }
>
> @Test
> public void test() {
> for (int i=0; i<10000000; i++) {
> model.createResource("http://example.com/res"+i, cls);
> if (i%10000 == 0) {
> System.out.println(i);
> }
> }
> }
> }
> The exception happens after ~670000 iterations with -Xmx128m.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira