Details

      Description

      BigdataGraphFactory.create method is not working for new file-backed graphs. It appears to work, but really creates an in-memory graph.

      The workaround is to create a SAIL directly for embedded graph usage.

      public BigdataSailRepository getOrCreateRepository(String journalFile) {
      
      		final java.util.Properties props = new java.util.Properties();
      		BigdataSailRepository repo = null;
      
      		/*
      		 * Lax edges allows us to use non-unique edge identifiers
      		 */
      		props.setProperty(BigdataGraph.Options.LAX_EDGES, "true");
      
      		/*
      		 * SPARQL bottom up evaluation semantics can have performance impact.
      		 */
      		props.setProperty(AbstractTripleStore.Options.BOTTOM_UP_EVALUATION,
      				"false");
      
      		if (journalFile == null || !new File(journalFile).exists()) {
      
      			/*
      			 * No journal specified or journal does not exist yet at specified
      			 * location. Create a new store. (If journal== null an in-memory
      			 * store will be created.
      			 */
      			repo = BigdataSailFactory.createRepository(props, journalFile,
      					Option.TextIndex);
      
      		} else {
      
      			/*
      			 * Journal already exists at specified location. Open existing
      			 * store.
      			 */
      			repo = BigdataSailFactory.openRepository(journalFile);
      
      		}
      		
      		try {
      			repo.initialize();
      		} catch (RepositoryException e) {
      			// TODO Auto-generated catch block
      			e.printStackTrace();
      		}
      		
      		return repo;
      	}
      
              public void testGraph()
              {
                      BigdataGraph testGraph = new BigdataGraphEmbedded(getOrCreateRepository("/tmp/some/file"));
              }
      
      
      

        Activity

        beebs Brad Bebee created issue -
        bryanthompson bryanthompson made changes -
        Field Original Value New Value
        Fix Version/s BLAZEGRAPH_RELEASE_1_5_2 [ 10164 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v2 [ 13053 ] Trac Import v3 [ 14482 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v3 [ 14482 ] Trac Import v4 [ 15811 ]
        beebs Brad Bebee made changes -
        Status Closed - Won't Fix [ 6 ] Open [ 1 ]
        beebs Brad Bebee made changes -
        Status Open [ 1 ] Accepted [ 10101 ]
        beebs Brad Bebee made changes -
        Status Accepted [ 10101 ] In Progress [ 3 ]
        Priority Highest [ 1 ]
        beebs Brad Bebee made changes -
        Status In Progress [ 3 ] Resolved [ 5 ]
        beebs Brad Bebee made changes -
        Status Resolved [ 5 ] In Review [ 10100 ]
        beebs Brad Bebee made changes -
        Status In Review [ 10100 ] Done [ 10000 ]
        beebs Brad Bebee made changes -
        Assignee bradbebee [ bradbebee ] Brad Bebee [ beebs ]
        beebs Brad Bebee made changes -
        Reporter bradbebee [ bradbebee ] Brad Bebee [ beebs ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v4 [ 15811 ] Trac Import v5 [ 16050 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v5 [ 16050 ] Trac Import v6 [ 18356 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v6 [ 18356 ] Trac Import v7 [ 19755 ]
        beebs Brad Bebee made changes -
        Workflow Trac Import v7 [ 19755 ] Trac Import v8 [ 21378 ]

          People

          • Assignee:
            beebs Brad Bebee
            Reporter:
            beebs Brad Bebee
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: