Caleb Meier created RYA-430:
-------------------------------

             Summary: Lazily Instantiate RyaSubGraphExporter 
                 Key: RYA-430
                 URL: https://issues.apache.org/jira/browse/RYA-430
             Project: Rya
          Issue Type: Bug
          Components: clients
    Affects Versions: 3.2.12
            Reporter: Caleb Meier
            Assignee: Caleb Meier


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).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to