Uploaded image for project: 'Rya'
  1. Rya
  2. RYA-430

Lazily Instantiate RyaSubGraphExporter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 3.2.12
    • None
    • clients
    • None

    Description

      The RyaSubgraphExporter requires a FluoClient when it is constructed. Unfortunately, the RyaSubGraphExporter factory creates the exporter when the QueryResultObserver is being initialized. This is problematic in that if the observer is not initialized, then Fluo has not been initialized and a FluoClient cannot be created. Instead, the RyaSubgraphExporter should be constructed using a FluoClient supplier that takes in the necessary configuration and lazily supplies and memoizes a FluoClient the first time the export method is invoked. Additionally, as it is currently implemented, the RyaSubGraphExporter generates a Transaction within a Transaction which can lead to Exceptions being thrown if for some reason the outer transaction completes before the inner transaction. Given how the Exporter interface is currently laid out, the exporter does not currently accept a transaction (nor should it). Therefore, perhaps the RyaSubgraphExporter should be done away with altogether given that it merely inserts triples back into Fluo and is a placeholder for an Exporter that inserts triples back into Rya itself (once we resolve packaging issues to support full indexing).

      Attachments

        Activity

          People

            meiercaleb@gmail.com Caleb Meier
            meiercaleb@gmail.com Caleb Meier
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: