public class JdbcBulkLoadProcessor extends Object
BulkLoadProcessor that provides extra logic.
Unlike other "single shot" request-reply commands, the
COPY command the client-server interaction looks like this:
Thin JDBC client Server
| |
|------- JdbcQueryExecuteRequest ------>|
| with SQL copy command |
| |
|<---- JdbcBulkLoadAckResult -----------|
| with BulkLoadAckClientParameters |
| containing file name and batch size. |
| |
(open the file, |
read portions and send them) |
| |
|------- JdbcBulkLoadBatchRequest #1 -->|
| with a portion of input file. |
| |
|<--- JdbcQueryExecuteResult -----------|
| with current update counter. |
| |
|------- JdbcBulkLoadBatchRequest #2--->|
| with a portion of input file. |
| |
|<--- JdbcQueryExecuteResult -----------|
| with current update counter. |
| |
|------- JdbcBulkLoadBatchRequest #3--->|
| with the LAST portion of input file. |
| |
|<--- JdbcQueryExecuteResult -----------|
| with the final update counter. |
| |
(close the file) |
| |
In case of input file reading error, a flag is carried to the server:
JdbcBulkLoadBatchRequest.CMD_FINISHED_ERROR and the processing
is aborted on the both sides.| Modifier and Type | Field and Description |
|---|---|
protected long |
nextBatchIdx
Next batch index (for a very simple check that all batches were delivered to us).
|
| Constructor and Description |
|---|
JdbcBulkLoadProcessor(BulkLoadProcessor processor)
Creates a JDBC-specific adapter for bulk load processor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the underlying objects.
|
void |
processBatch(JdbcBulkLoadBatchRequest req)
Completely processes a bulk load batch request.
|
long |
updateCnt()
Provides update counter for sending in the
JdbcBatchExecuteResult. |
protected long nextBatchIdx
public JdbcBulkLoadProcessor(BulkLoadProcessor processor)
processor - Bulk load processor from the core to delegate calls to.public void processBatch(JdbcBulkLoadBatchRequest req) throws IgniteCheckedException
BulkLoadProcessor wrapping around some JDBC-specific logic
(commands, bulk load batch index checking).req - The current request.IgniteCheckedExceptionpublic void close()
throws Exception
Exceptionpublic long updateCnt()
JdbcBatchExecuteResult.JdbcBatchExecuteResult.
Follow @ApacheIgnite
Ignite Database and Caching Platform : ver. 2.7.5 Release Date : June 4 2019