[
https://issues.apache.org/jira/browse/NUTCH-2412?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16519417#comment-16519417
]
ASF GitHub Bot commented on NUTCH-2412:
---------------------------------------
sebastian-nagel commented on issue #340: Fixes for NUTCH-2412 contributed by
r0ann3l
URL: https://github.com/apache/nutch/pull/340#issuecomment-399120504
Hi @r0ann3l,
could you add package-info.java files to the packages
org.apache.nutch.exchange (main) and org.apache.nutch.exchange.jexl (plugin)?
Just one or two sentences, so that on the [API overview
page](https://builds.apache.org/job/Nutch-trunk/javadoc/) the packages and the
plugin are explained. Thanks!
If no exchange plugin is configured in plugin.includes, the indexer exits
with a NPE:
```
Indexer: java.lang.NullPointerException
at org.apache.nutch.exchange.Exchanges.<init>(Exchanges.java:68)
at
org.apache.nutch.indexer.IndexWriters.<init>(IndexWriters.java:103)
at
org.apache.nutch.indexer.IndexWriters.lambda$get$0(IndexWriters.java:60)
at java.util.Map.computeIfAbsent(Map.java:957)
at org.apache.nutch.indexer.IndexWriters.get(IndexWriters.java:60)
at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:123)
at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:235)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:244)
```
I would opt to keep the use of exchange plugins optional:
- it's a plugin, hence optional. If none is configured, just route all
documents to all index writers. It's ok, to log a warning about this.
- always keep the simplest use case (a single index writer) as simple as
possible. It should be possible to do this without configuring any exchange
plugin.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Exchange component for indexing job
> -----------------------------------
>
> Key: NUTCH-2412
> URL: https://issues.apache.org/jira/browse/NUTCH-2412
> Project: Nutch
> Issue Type: New Feature
> Components: indexer, plugin
> Affects Versions: 1.14
> Reporter: Roannel Fernández Hernández
> Priority: Minor
> Fix For: 1.15
>
>
> The exchange component acts in indexing job and decides which index writer a
> document should go to. It includes an extension point to allow developers to
> develop plugins with their own logic.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)