[ 
https://issues.apache.org/jira/browse/RYA-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15947785#comment-15947785
 ] 

David W. Lotts commented on RYA-72:
-----------------------------------

Just had to troubleshoot this.  This is also an issue for 
AccumuloFreeTextIndexer.java.
I wrote a patch that implements setMultiTableBatchWriter() and uses the DAO's 
writer.

> AccumuloRyaDAO doesn't flush/close secondary indexers' writers
> --------------------------------------------------------------
>
>                 Key: RYA-72
>                 URL: https://issues.apache.org/jira/browse/RYA-72
>             Project: Rya
>          Issue Type: Bug
>          Components: dao
>            Reporter: Jesse Hatfield
>            Assignee: Puja Valiyil 
>
> (Seen with respect to AccumuloTemporalIndexer, unconfirmed which others 
> exhibit the same problem.)
> Secondary indexers use MultiTableBatchWriter to write to Accumulo. This needs 
> to be flushed in order to actually write data, and should probably be closed 
> when finished. If this isn't done explicitly, the writer only closes itself 
> if/when its finalize() method is called.
> When interacting with the indexers directly, this is fine: the flush and 
> close methods on the indexers can be used to call the corresponding methods 
> on their writers.
> But the AccumuloRyaDAO doesn't call these methods (or expose its indexers), 
> so if an application is interacting with the indexers through the DAO, 
> there's no way to make sure changes are flushed. The DAO does have its own 
> MultiTableBatchWriter, however (for writing to the spo/osp/pos tables), and 
> this writer is flushed and closed properly by the DAO's corresponding methods.
> Possible fixes include:
> A. Have the DAO flush/close its indexers whenever it does the same with its 
> own writer.
> B. Configure the indexers to use the same writer as the DAO. (The DAO invokes 
> setMultiTableBatchWriter, but this is an empty method in 
> AbstractAccumuloIndexer and only the Entity index appears to implement it.)



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to