本文整理汇总了Java中org.apache.solr.hadoop.dedup.UpdateConflictResolver类的典型用法代码示例。如果您正苦于以下问题:Java UpdateConflictResolver类的具体用法?Java UpdateConflictResolver怎么用?Java UpdateConflictResolver使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
UpdateConflictResolver类属于org.apache.solr.hadoop.dedup包,在下文中一共展示了UpdateConflictResolver类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setup
import org.apache.solr.hadoop.dedup.UpdateConflictResolver; //导入依赖的package包/类
@Override
protected void setup(Context context) throws IOException, InterruptedException {
verifyPartitionAssignment(context);
SolrRecordWriter.addReducerContext(context);
Class<? extends UpdateConflictResolver> resolverClass = context.getConfiguration().getClass(
UPDATE_CONFLICT_RESOLVER, RetainMostRecentUpdateConflictResolver.class, UpdateConflictResolver.class);
this.resolver = ReflectionUtils.newInstance(resolverClass, context.getConfiguration());
/*
* Note that ReflectionUtils.newInstance() above also implicitly calls
* resolver.configure(context.getConfiguration()) if the resolver
* implements org.apache.hadoop.conf.Configurable
*/
this.exceptionHandler = new FaultTolerance(
context.getConfiguration().getBoolean(FaultTolerance.IS_PRODUCTION_MODE, false),
context.getConfiguration().getBoolean(FaultTolerance.IS_IGNORING_RECOVERABLE_EXCEPTIONS, false),
context.getConfiguration().get(FaultTolerance.RECOVERABLE_EXCEPTION_CLASSES, SolrServerException.class.getName()));
this.heartBeater = new HeartBeater(context);
}