|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kitesdk.morphline.solr.SolrServerDocumentLoader
public class SolrServerDocumentLoader
A vehicle to load a list of Solr documents into a local or remote SolrServer.
| Constructor Summary | |
|---|---|
SolrServerDocumentLoader(org.apache.solr.client.solrj.SolrServer server,
int batchSize)
|
|
| Method Summary | |
|---|---|
void |
beginTransaction()
Begins a transaction |
void |
commitTransaction()
Sends any outstanding documents to the destination and waits for a positive or negative ack (i.e. |
org.apache.solr.client.solrj.SolrServer |
getSolrServer()
|
void |
load(org.apache.solr.common.SolrInputDocument doc)
Loads the given document into the destination |
org.apache.solr.client.solrj.response.SolrPingResponse |
ping()
Issues a ping request to check if the server is alive |
org.apache.solr.client.solrj.response.UpdateResponse |
rollbackTransaction()
Performs a rollback of all non-committed documents pending. |
void |
shutdown()
Releases allocated resources |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SolrServerDocumentLoader(org.apache.solr.client.solrj.SolrServer server,
int batchSize)
| Method Detail |
|---|
public void beginTransaction()
DocumentLoader
beginTransaction in interface DocumentLoader
public void load(org.apache.solr.common.SolrInputDocument doc)
throws IOException,
org.apache.solr.client.solrj.SolrServerException
DocumentLoader
load in interface DocumentLoaderIOException
org.apache.solr.client.solrj.SolrServerException
public void commitTransaction()
throws org.apache.solr.client.solrj.SolrServerException,
IOException
DocumentLoader
commitTransaction in interface DocumentLoaderIOException - If there is a low-level I/O error.
org.apache.solr.client.solrj.SolrServerException
public org.apache.solr.client.solrj.response.UpdateResponse rollbackTransaction()
throws org.apache.solr.client.solrj.SolrServerException,
IOException
DocumentLoaderNote that this is not a true rollback as in databases. Content you have previously added may have already been committed due to autoCommit, buffer full, other client performing a commit etc. So this is only a best-effort rollback.
rollbackTransaction in interface DocumentLoaderIOException - If there is a low-level I/O error.
org.apache.solr.client.solrj.SolrServerExceptionpublic void shutdown()
DocumentLoader
shutdown in interface DocumentLoader
public org.apache.solr.client.solrj.response.SolrPingResponse ping()
throws org.apache.solr.client.solrj.SolrServerException,
IOException
DocumentLoader
ping in interface DocumentLoaderIOException - If there is a low-level I/O error.
org.apache.solr.client.solrj.SolrServerExceptionpublic org.apache.solr.client.solrj.SolrServer getSolrServer()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||