public class SolrEntityProcessor extends EntityProcessorBase
An implementation of EntityProcessor
which fetches values from a
separate Solr implementation using the SolrJ client library. Yield a row per
Solr document.
Limitations: All configuration is evaluated at the beginning; Only one query is walked;
Modifier and Type | Field and Description |
---|---|
static String |
QUERY |
static int |
ROWS_DEFAULT |
static String |
SOLR_SERVER |
static String |
TIMEOUT |
static int |
TIMEOUT_SECS |
ABORT, cacheSupport, context, CONTINUE, entityName, isFirstInit, ON_ERROR, onError, query, rowIterator, SKIP, TRANSFORM_ROW, TRANSFORMER
Constructor and Description |
---|
SolrEntityProcessor() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Invoked for each entity at the very end of the import to do any needed cleanup tasks.
|
protected SolrDocumentList |
doQuery(int start) |
protected void |
firstInit(Context context)
first time init call.
|
protected org.apache.http.client.HttpClient |
getHttpClient()
Factory method that returns a
HttpClient instance used for interfacing with a source Solr service. |
Map<String,Object> |
nextRow()
For a simple implementation, this is the only method that the sub-class should implement.
|
getNext, init, initCache, nextDeletedRowKey, nextModifiedParentRowKey, nextModifiedRowKey
close, postTransform
public static final String SOLR_SERVER
public static final String QUERY
public static final String TIMEOUT
public static final int TIMEOUT_SECS
public static final int ROWS_DEFAULT
public void destroy()
EntityProcessor
destroy
in class EntityProcessorBase
protected org.apache.http.client.HttpClient getHttpClient()
HttpClient
instance used for interfacing with a source Solr service.
One can override this method to return a differently configured HttpClient
instance.
For example configure https and http authentication.HttpClient
instance used for interfacing with a source Solr serviceprotected void firstInit(Context context)
EntityProcessorBase
firstInit
in class EntityProcessorBase
public Map<String,Object> nextRow()
EntityProcessorBase
nextRow
in class EntityProcessorBase
protected SolrDocumentList doQuery(int start)
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.