Package de.jungblut.crawl
Interface ResultWriter<T extends FetchResult>
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
ConsoleResultWriter,ResultWriterAdapter,SequenceFileResultWriter
public interface ResultWriter<T extends FetchResult> extends java.lang.AutoCloseableResult writing interface. Lifecycle isopen(Configuration),write(FetchResult)n-items and thenAutoCloseable.close(). Note that this implementsAutoCloseableand can be used for a try catch with resources.- Author:
- thomas.jungblut
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidopen(org.apache.hadoop.conf.Configuration conf)Opens the given result writer with a configuration.voidwrite(T result)Writes a single item to the output.
-
-
-
Method Detail
-
open
void open(org.apache.hadoop.conf.Configuration conf) throws java.io.IOException
Opens the given result writer with a configuration.- Throws:
java.io.IOException
-
write
void write(T result) throws java.io.IOException
Writes a single item to the output.- Throws:
java.io.IOException
-
-