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

Igor Rudyak edited comment on IGNITE-3314 at 8/19/16 6:45 PM:
--------------------------------------------------------------

DataSource now implements Externalizable (and Serializable as well), but there 
is one limitation. DataSource is only partially serialises its Cassandra 
connection options. Here is the list of DataSource connection options which 
will not be serialized/deserialized:

  - LoadBalancingPolicy
  - ReconnectionPolicy
  - RetryPolicy
  - AddressTranslator
  - SpeculativeExecutionPolicy
  - AuthProvider
  - SslOptions
  - PoolingOptions
  - SocketOptions
  - NettyOptions
  
*The main reason - corresponding Cassandra interfaces doesn't extend 
Serializable.*

Workaround:

1) Implement your own wrapper, above corresponding Cassandra connection option 
specific implementation which you are going to use (TokenAwarePolicy, 
RoundRobinPolicy and etc.)

2) Wrapper should also implement Externalizable - there you should put all your 
custom serialization/deserialization logic

3) In the such case, DataSource will detect that corresponding connection 
option object implements Serializable and it will be used during DataSource 
serialization/deserialization


was (Author: irudyak):
DataSource now implements Externalizable (and Serializable as well), but there 
is one limitation. DataSource is only partially serialises its Cassandra 
connection options. Here is the list of DataSource connection options which 
will not be serialized/deserialized:

  - LoadBalancingPolicy
  - ReconnectionPolicy
  - RetryPolicy
  - AddressTranslator
  - SpeculativeExecutionPolicy
  - AuthProvider
  - SslOptions
  - PoolingOptions
  - SocketOptions
  - NettyOptions
  
*The main reason - corresponding Cassandra interfaces doesn't extend 
Serializable.*

Workaround:

1) Implement your own wrapper, above corresponding Cassandra connection option 
specific implementation which you are going to use (TokenAwarePolicy, 
RoundRobinPolicy and etc.)

2) Wrapper should also implement Externalizable - there you should put all your 
custom serialization/deserialization logic

> Implement Serializable in 
> org.apache.ignite.cache.store.cassandra.datasource.DataSource
> ---------------------------------------------------------------------------------------
>
>                 Key: IGNITE-3314
>                 URL: https://issues.apache.org/jira/browse/IGNITE-3314
>             Project: Ignite
>          Issue Type: Sub-task
>          Components: cache
>            Reporter: Igor Rudyak
>            Assignee: Igor Rudyak
>            Priority: Minor
>             Fix For: 1.8
>
>
> Current implementation of 
> org.apache.ignite.cache.store.cassandra.utils.datasource.DataSource doesn't 
> implement Serializable, thus for distributed Ignite clusters, 
> CassandraCacheStoreFactory could only be setup through Spring XML file, but 
> not from code. 
> New version of 
> org.apache.ignite.cache.store.cassandra.utils.datasource.DataSource should  
> implement Serializable



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

Reply via email to