public class SortingUpdateConflictResolver extends Object implements UpdateConflictResolver, org.apache.hadoop.conf.Configurable
| Modifier and Type | Field and Description |
|---|---|
static String |
ORDER_BY_FIELD_NAME_DEFAULT |
static String |
ORDER_BY_FIELD_NAME_KEY |
| Constructor and Description |
|---|
SortingUpdateConflictResolver() |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.conf.Configuration |
getConf() |
protected String |
getOrderByFieldName() |
Iterator<SolrInputDocument> |
orderUpdates(org.apache.hadoop.io.Text key,
Iterator<SolrInputDocument> updates,
org.apache.hadoop.mapreduce.Reducer.Context ctx)
Given a list of all colliding document updates for the same unique document
key, this method returns zero or more documents in an application specific
order.
|
void |
setConf(org.apache.hadoop.conf.Configuration conf) |
protected Iterator<SolrInputDocument> |
sort(Iterator<SolrInputDocument> updates,
String fieldName,
Comparator child) |
public static final String ORDER_BY_FIELD_NAME_KEY
public static final String ORDER_BY_FIELD_NAME_DEFAULT
public void setConf(org.apache.hadoop.conf.Configuration conf)
setConf in interface org.apache.hadoop.conf.Configurablepublic org.apache.hadoop.conf.Configuration getConf()
getConf in interface org.apache.hadoop.conf.Configurableprotected String getOrderByFieldName()
public Iterator<SolrInputDocument> orderUpdates(org.apache.hadoop.io.Text key, Iterator<SolrInputDocument> updates, org.apache.hadoop.mapreduce.Reducer.Context ctx)
UpdateConflictResolverorderUpdates in interface UpdateConflictResolverkey - the document key common to all collidingUpdates mentioned belowupdates - all updates in the MapReduce job that have a key equal to
uniqueKey mentioned above. The input order is unspecified.ctx - The Context passed from the Reducer
implementations.protected Iterator<SolrInputDocument> sort(Iterator<SolrInputDocument> updates, String fieldName, Comparator child)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.