Package org.apache.nutch.tools.warc
Class WARCExporter.WARCMapReduce.WARCReducer
- java.lang.Object
-
- org.apache.hadoop.mapreduce.Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>
-
- org.apache.nutch.tools.warc.WARCExporter.WARCMapReduce.WARCReducer
-
- Enclosing class:
- WARCExporter.WARCMapReduce
public static class WARCExporter.WARCMapReduce.WARCReducer extends Reducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.hadoop.mapreduce.Reducer
Reducer.Context
-
-
Constructor Summary
Constructors Constructor Description WARCReducer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected com.google.gson.JsonObject
metadataToJson(Metadata meta)
Adds keys/values of a Nuta metadata container to a JsonObject.void
reduce(Text key, Iterable<NutchWritable> values, Reducer.Context context)
-
-
-
Method Detail
-
reduce
public void reduce(Text key, Iterable<NutchWritable> values, Reducer.Context context) throws IOException, InterruptedException
- Overrides:
reduce
in classReducer<Text,NutchWritable,NullWritable,com.martinkl.warc.WARCWritable>
- Throws:
IOException
InterruptedException
-
metadataToJson
protected com.google.gson.JsonObject metadataToJson(Metadata meta)
Adds keys/values of a Nuta metadata container to a JsonObject.- Parameters:
meta
- Nutch metadata container- Returns:
- json object
-
-