[
https://issues.apache.org/jira/browse/NUTCH-2631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16788916#comment-16788916
]
ASF GitHub Bot commented on NUTCH-2631:
---------------------------------------
r0ann3l commented on pull request #373: fix for NUTCH-2631 contributed by
AyalCiobotaru
URL: https://github.com/apache/nutch/pull/373#discussion_r264044383
##########
File path:
src/plugin/indexer-kafka/src/java/org/apache/nutch/indexwriter/kafka/KafkaIndexWriter.java
##########
@@ -0,0 +1,216 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//TODO refactor the dependencies out of root ivy file
Review comment:
Hi @AyalCiobotaru, I've made some changes to solve your problem. Please,
merge them from [here](https://github.com/r0ann3l/nutch/tree/NUTCH-2631). Check
this: on `KafkaIndexWriter.open(KafkaIndexWriter.java:75)` I set the context
`ClassLoader` for current thread as the `ClassLoader` of the current class. The
thing here is the kafka-clients-1.1.0 library tries to load the classes for
keySerializer and valueSerializer from context `ClassLoader` of the current
thread and this classes are not available from there. I'm not sure if this
workaround is correct, but it works for me in local mode and Kafka 1.12. What
do you think about it?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> KafkaIndexWriter
> ----------------
>
> Key: NUTCH-2631
> URL: https://issues.apache.org/jira/browse/NUTCH-2631
> Project: Nutch
> Issue Type: Improvement
> Components: indexer
> Reporter: Ayal Ciobotaru
> Priority: Minor
> Labels: patch
> Original Estimate: 168h
> Remaining Estimate: 168h
>
> There is no current way to index directly into Kafka in order to have a full
> message based system controlled by Kafka. Created a KafkaIndexWriter in order
> to produce the crawled documents into Kafka and have Kafka distribute the
> messages as necessary.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)