lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Josh Harness <>
Subject Request for Feedback for Patch to Allow DIH to Archive Files
Date Mon, 24 Oct 2011 19:31:39 GMT
Hi -

     We are using SOLR to process XML input files using the Data Import
Handler. I didn't see a way to move the xml files out of the way after
processing, so I wrote a small extension to allow this. The "How to
Contribute <>" page says to pitch
the request to the developer list in order to decide whether or not to
submit a patch. As such, here goes:

     The new code basically extends FileDataSource and wraps the underlying
reader such that when the "close" method on the input stream is called, the
file is moved to a configurable archive directory. It is unclear to me
whether this is the correct place to put it (I pondered changing the
FileListEntityProcessor but this somehow felt safer). I realize that a more
robust implementation would consider the success status of the file being
processed and would also allow for configurable policies rather than a
concrete implementation. Nonetheless, I didn't want the perfect to be the
enemy of the good.

     Please peruse the attached source code file and provide feedback as to
the merit of the idea, whether I ought to submit a JIRA ticket/patch and if
my approach is correct.


Josh Harness

View raw message