[jira] [Commented] (IGNITE-6280) Cassandra ignores AffinityKeyMapped annotation in parent classes.

2018-02-16 Thread Andrew Mashenkov (JIRA)

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

Andrew Mashenkov commented on IGNITE-6280:
--

[~irudyak],

The issue here is that Ignite have different behavior for keyA and keyB with 
using AffinityKeyMapped annotation
even if the annotation make no sense in such case.

>From user perspective, incorrect use case should end up with exception.

> Cassandra ignores AffinityKeyMapped annotation in parent classes.
> -
>
> Key: IGNITE-6280
> URL: https://issues.apache.org/jira/browse/IGNITE-6280
> Project: Ignite
>  Issue Type: Bug
>  Components: cassandra
>Affects Versions: 2.1
>Reporter: Andrew Mashenkov
>Assignee: Igor Rudyak
>Priority: Major
> Attachments: CassandraConfigTest.java
>
>
> By default, using @AffinityKeyMapped annotation force Ignire to override user 
> _keyPersistence_ configuration that may cause confusing results.
> PFA repro attached.
> h3. Description
> 1. Let there is 2 keys A and B that has same fields with one difference. Key 
> A has affinity key in parent class. So, it looks like this.
> {code}
> class BaseKey {
> @AffinityKeyMapped
>  Object affinityKey
> }
> {code}
> {code}
> class A extends BaseKey {
>  int id;
> }
> {code}
> {code}
> class B {
> @AffinityKeyMapped
>  Object affinityKey;
>  int uid;
> }
> {code}
> 2. Let we make different affinity mapping for Cassandra store, that looks 
> like a valid case
> {code:xml}
> 
> 
>  
>  
>
> 
> {code}
> 3. We have different behavior for these similar cases that makes user 
> confused.
> For key A this will work fine and expected DDL will be generated.
> For key B we'll get different DDL as Ignite will remove "_uid_" field from 
> "_partitionKey_".
> So, we should either to not allow Ignite to override key mapping or force 
> Ignite to check if parent classes has @AffinityKeyMapped annotation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6280) Cassandra ignores AffinityKeyMapped annotation in parent classes.

2018-02-12 Thread Igor Rudyak (JIRA)

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

Igor Rudyak commented on IGNITE-6280:
-

[~amashenkov] could you please clarify what do you mean? It looks like ticket 
name doesn't reflect the case you are trying to do. I checked the test class 
attached - it works fine.

Moreover in your case all the annotations you are using don't make any sense, 
cause you already explicitly specified cluster key and partition key. 
Persistent settings which are explicitly specified (using persistence 
descriptor) always take precedence over settings specified using annotations.

 

> Cassandra ignores AffinityKeyMapped annotation in parent classes.
> -
>
> Key: IGNITE-6280
> URL: https://issues.apache.org/jira/browse/IGNITE-6280
> Project: Ignite
>  Issue Type: Bug
>  Components: cassandra
>Affects Versions: 2.1
>Reporter: Andrew Mashenkov
>Assignee: Igor Rudyak
>Priority: Major
> Attachments: CassandraConfigTest.java
>
>
> By default, using @AffinityKeyMapped annotation force Ignire to override user 
> _keyPersistence_ configuration that may cause confusing results.
> PFA repro attached.
> h3. Description
> 1. Let there is 2 keys A and B that has same fields with one difference. Key 
> A has affinity key in parent class. So, it looks like this.
> {code}
> class BaseKey {
> @AffinityKeyMapped
>  Object affinityKey
> }
> {code}
> {code}
> class A extends BaseKey {
>  int id;
> }
> {code}
> {code}
> class B {
> @AffinityKeyMapped
>  Object affinityKey;
>  int uid;
> }
> {code}
> 2. Let we make different affinity mapping for Cassandra store, that looks 
> like a valid case
> {code:xml}
> 
> 
>  
>  
>
> 
> {code}
> 3. We have different behavior for these similar cases that makes user 
> confused.
> For key A this will work fine and expected DDL will be generated.
> For key B we'll get different DDL as Ignite will remove "_uid_" field from 
> "_partitionKey_".
> So, we should either to not allow Ignite to override key mapping or force 
> Ignite to check if parent classes has @AffinityKeyMapped annotation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6280) Cassandra ignores AffinityKeyMapped annotation in parent classes.

2018-01-30 Thread Igor Rudyak (JIRA)

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

Igor Rudyak commented on IGNITE-6280:
-

[~amashenkov] thanks for letting me know. I'll look at it.

> Cassandra ignores AffinityKeyMapped annotation in parent classes.
> -
>
> Key: IGNITE-6280
> URL: https://issues.apache.org/jira/browse/IGNITE-6280
> Project: Ignite
>  Issue Type: Bug
>  Components: cassandra
>Affects Versions: 2.1
>Reporter: Andrew Mashenkov
>Assignee: Mikhail Cherkasov
>Priority: Major
> Attachments: CassandraConfigTest.java
>
>
> By default, using @AffinityKeyMapped annotation force Ignire to override user 
> _keyPersistence_ configuration that may cause confusing results.
> PFA repro attached.
> h3. Description
> 1. Let there is 2 keys A and B that has same fields with one difference. Key 
> A has affinity key in parent class. So, it looks like this.
> {code}
> class BaseKey {
> @AffinityKeyMapped
>  Object affinityKey
> }
> {code}
> {code}
> class A extends BaseKey {
>  int id;
> }
> {code}
> {code}
> class B {
> @AffinityKeyMapped
>  Object affinityKey;
>  int uid;
> }
> {code}
> 2. Let we make different affinity mapping for Cassandra store, that looks 
> like a valid case
> {code:xml}
> 
> 
>  
>  
>
> 
> {code}
> 3. We have different behavior for these similar cases that makes user 
> confused.
> For key A this will work fine and expected DDL will be generated.
> For key B we'll get different DDL as Ignite will remove "_uid_" field from 
> "_partitionKey_".
> So, we should either to not allow Ignite to override key mapping or force 
> Ignite to check if parent classes has @AffinityKeyMapped annotation.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (IGNITE-6280) Cassandra ignores AffinityKeyMapped annotation in parent classes.

2017-09-06 Thread Andrew Mashenkov (JIRA)

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

Andrew Mashenkov commented on IGNITE-6280:
--

[~irudyak],

Would you please take a look at this and suggest correct way it can be fixed? 

Why we override key mapping when AffinityKeyMapped annotation is used, if
it as valid case to have alternative key affinity mapping for cassandra store
and keyPersistence configuration is mandatory.

May be I've missed smth...?




> Cassandra ignores AffinityKeyMapped annotation in parent classes.
> -
>
> Key: IGNITE-6280
> URL: https://issues.apache.org/jira/browse/IGNITE-6280
> Project: Ignite
>  Issue Type: Bug
>  Components: cassandra
>Affects Versions: 2.1
>Reporter: Andrew Mashenkov
>
> By default, using @AffinityKeyMapped annotation force Ignire to override user 
> _keyPersistence_ configuration that may cause confusing results.
> PFA repro attached.
> h3. Description
> 1. Let there is 2 keys A and B that has same fields with one difference. Key 
> A has affinity key in parent class. So, it looks like this.
> {code}
> class BaseKey {
> @AffinityKeyMapped
>  Object affinityKey
> }
> {code}
> {code}
> class A extends BaseKey {
>  int id;
> }
> {code}
> {code}
> class B {
> @AffinityKeyMapped
>  Object affinityKey;
>  int uid;
> }
> {code}
> 2. Let we make different affinity mapping for Cassandra store, that looks 
> like a valid case
> {code:xml}
> 
> 
>  
>  
>
> 
> {code}
> 3. We have different behavior for these similar cases that makes user 
> confused.
> For key A this will work fine and expected DDL will be generated.
> For key B we'll get different DDL as Ignite will remove "_uid_" field from 
> "_partitionKey_".
> So, we should either to not allow Ignite to override key mapping or force 
> Ignite to check if parent classes has @AffinityKeyMapped annotation.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)