[ 
https://issues.apache.org/jira/browse/IGNITE-4169?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15761485#comment-15761485
 ] 

Alexander Paschenko commented on IGNITE-4169:
---------------------------------------------

Issue fixed, patch available. Implementation conforms to what has been 
discussed on dev list regarding this matter.

How it works:

* streaming mode is turned on via connection string property/explicitly by 
setting property in {{Properties}} object given to driver when requesting a 
connection from it. Property name is {{ignite.jdbc.stream}}

* streaming works for {{PreparedStatements}}, and it makes sense as typical 
workflow is to create the statement/streamer once, and then just feed data to 
it.

* streaming works only for "local" connections - i.e. ones without {{nodeId}} 
prop set in connection settings. It makes sense as the whole point of data 
streamer is achieving maximum performance, and we would lose the benefits of 
using it if we sent streaming arguments over network. In this local mode, 
streamer receives its key-value pairs in direct and simple manner.

* operations supported in streamed prepared statements are:
** rows based MERGE and INSERT (no subqeries)
** key bounded UPDATE and DELETE (ones with condition of kind {{WHERE _key = 
?}}, where key is a constant or parameter)
Required operations semantic is maintained via {{StreamReceiver}} s associated 
with streamers.

* Data streamer objects are associated with prepared statements. A streamer is 
created with the statement and is closed (flushing pending data on the way) 
when the statement is closed.

* Semantic of queries (non DML operations) is retained - if, for some reason, 
the user creates a {{PreparedStatement}} from SQL SELECT, it will work as if 
streaming hasn't been turned on.

* If the user attempts to execute a streamed {{PreparedStatement}} in batched 
manner (IGNITE-4269), it will work. The only difference with non batched mode 
will be just that the streamer gets all batch at once - in other words, JDBC 
batching affects only data chunk size that streamer gets at once.

> Data streamer mode for DML
> --------------------------
>
>                 Key: IGNITE-4169
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4169
>             Project: Ignite
>          Issue Type: New Feature
>          Components: SQL
>            Reporter: Alexander Paschenko
>            Assignee: Vladimir Ozerov
>             Fix For: 1.8
>
>
> SQL INSERT and MERGE are supposed to support data streamer mode which should 
> be turned on by JDBC connection string param.
> Note: particular details of usage means and implementation of this mode, as 
> well as urgency of this feature are yet to be discussed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to