[
https://issues.apache.org/jira/browse/ANY23-396?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618343#comment-16618343
]
ASF GitHub Bot commented on ANY23-396:
--------------------------------------
Github user HansBrende commented on the issue:
https://github.com/apache/any23/pull/122
For the time being, I've opted for the third option for (4) (making the
public methods I added to `WriterFactoryRegistry` become `private static`
methods in `Rover`) so that I don't have to deal with that naming issue in this
PR. If we want to add extra utility methods in `WriterFactoryRegistry`, that
can be the subject of a different JIRA issue.
However, I did have to fix a couple of synchronization issues in
`WriterFactoryRegistry` to accomplish this: I noticed that iterating through
the list of writer factories returned by `WriterFactoryRegistry.getWriters()`
could potentially throw a `ConcurrentModificationException` even though that
method was marked `synchronized` (because, unless I am mistaken, the underlying
list implementation *can* be modified after access to the list is given to a
caller and the method returns). To fix this problem, I changed the
implementation of the backing list of writers from `ArrayList` to
`CopyOnWriteArrayList`, which guarantees thread safety for iterators. Since
writes to `CopyOnWriteArrayList` are relatively expensive, I also changed the
logic around a bit to use *batch writing*, i.e., registering all
`WriterFactory` instances at once in a `registerAll()` method, rather than
through consecutive invocations of the `register()` method. Similar issues
existed for the methods to retrieve identifiers and mime types, which I fixed
in the same manner.
With this last commit, I am now satisfied, personally, with my
implementation of ANY23-396.
Anything else, @lewismc @jgrzebyta ?
> Add ability to run extractors in flow
> -------------------------------------
>
> Key: ANY23-396
> URL: https://issues.apache.org/jira/browse/ANY23-396
> Project: Apache Any23
> Issue Type: Improvement
> Components: core
> Affects Versions: 2.2
> Reporter: Jacek Grzebyta
> Assignee: Jacek Grzebyta
> Priority: Minor
>
> Currently extractors do not work in flows. I.E. Next extractor has no any
> access to triples made by previous one.
> It would be useful if an extractor has possibility to modify triples created
> by another extractor.
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)