public class UpdateHostDbReducer extends java.lang.Object implements Reducer<Text,NutchWritable,Text,HostDatum>
| Modifier and Type | Field and Description |
|---|---|
protected static boolean |
checkFailed |
protected static boolean |
checkKnown |
protected static boolean |
checkNew |
protected java.util.concurrent.ThreadPoolExecutor |
executor |
protected static boolean |
force |
protected static long |
now |
protected static java.lang.String[] |
numericFields |
protected static Text[] |
numericFieldWritables |
protected java.lang.Integer |
numResolverThreads |
protected static int[] |
percentiles |
protected static java.lang.Integer |
purgeFailedHostsThreshold |
protected java.util.concurrent.BlockingQueue<java.lang.Runnable> |
queue |
protected static java.lang.Integer |
recheckInterval |
protected ResolverThread |
resolverThread |
protected static java.lang.String[] |
stringFields |
protected static Text[] |
stringFieldWritables |
| Constructor and Description |
|---|
UpdateHostDbReducer() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Shut down all running threads and wait for completion.
|
void |
configure(JobConf job)
Configures the thread pool and prestarts all resolver threads.
|
protected boolean |
isEligibleForCheck(HostDatum datum)
Determines whether a record is eligible for recheck.
|
void |
reduce(Text key,
java.util.Iterator<NutchWritable> values,
OutputCollector<Text,HostDatum> output,
Reporter reporter) |
protected boolean |
shouldCheck(HostDatum datum)
Determines whether a record should be checked.
|
protected ResolverThread resolverThread
protected java.lang.Integer numResolverThreads
protected static java.lang.Integer purgeFailedHostsThreshold
protected static java.lang.Integer recheckInterval
protected static boolean checkFailed
protected static boolean checkNew
protected static boolean checkKnown
protected static boolean force
protected static long now
protected static java.lang.String[] numericFields
protected static java.lang.String[] stringFields
protected static int[] percentiles
protected static Text[] numericFieldWritables
protected static Text[] stringFieldWritables
protected java.util.concurrent.BlockingQueue<java.lang.Runnable> queue
protected java.util.concurrent.ThreadPoolExecutor executor
public void configure(JobConf job)
configure in interface JobConfigurablejob - public void reduce(Text key, java.util.Iterator<NutchWritable> values, OutputCollector<Text,HostDatum> output, Reporter reporter) throws java.io.IOException
protected boolean shouldCheck(HostDatum datum)
datum - protected boolean isEligibleForCheck(HostDatum datum)
datum - public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableCopyright © 2017 The Apache Software Foundation