Class KafkaIndexWriter
java.lang.Object
org.apache.nutch.indexwriter.kafka.KafkaIndexWriter
- All Implemented Interfaces:
Configurable,IndexWriter,Pluggable
Sends Nutch documents to a configured Kafka Cluster
-
Field Summary
FieldsFields inherited from interface org.apache.nutch.indexer.IndexWriter
X_POINT_ID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidcommit()voiddescribe()ReturnsMapwith the specific parameters the IndexWriter instance can take.getConf()voidopen(Configuration job, String name) voidopen(IndexWriterParams params) Initializes the internal variables from a given index writer configuration.voidsetConf(Configuration conf) voidupdate(NutchDocument doc) voidwrite(NutchDocument doc)
-
Field Details
-
LOG
public static org.slf4j.Logger LOG
-
-
Constructor Details
-
KafkaIndexWriter
public KafkaIndexWriter()
-
-
Method Details
-
open
- Specified by:
openin interfaceIndexWriter- Parameters:
job- Nutch configurationname- target name of theIndexWriterto be opened- Throws:
IOException- Some exception thrown by some writer.
-
open
Description copied from interface:IndexWriterInitializes the internal variables from a given index writer configuration.- Specified by:
openin interfaceIndexWriter- Parameters:
params- Params from the index writer configuration.- Throws:
IOException- Some exception thrown by writer.
-
write
- Specified by:
writein interfaceIndexWriter- Throws:
IOException
-
delete
- Specified by:
deletein interfaceIndexWriter- Throws:
IOException
-
update
- Specified by:
updatein interfaceIndexWriter- Throws:
IOException
-
commit
- Specified by:
commitin interfaceIndexWriter- Throws:
IOException
-
close
- Specified by:
closein interfaceIndexWriter- Throws:
IOException
-
describe
Description copied from interface:IndexWriterReturnsMapwith the specific parameters the IndexWriter instance can take.- Specified by:
describein interfaceIndexWriter- Returns:
- The values of each row. It must have the form <KEY,<DESCRIPTION,VALUE>>.
-
setConf
- Specified by:
setConfin interfaceConfigurable
-
getConf
- Specified by:
getConfin interfaceConfigurable
-