You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Ruslan Kamashev <ry...@gmail.com> on 2019/07/30 17:37:44 UTC

CacheConfiguration#setTypes: deserialization on client

Related issue https://issues.apache.org/jira/browse/IGNITE-1903 <https://issues.apache.org/jira/browse/IGNITE-1903>
I don't use CacheStore, but I have the same problem with CacheConfiguration#setTypes.
Could you offer a workaround for solving this problem? Can I just remove this line in my configuration without some sideeffects?

Apache Ignite 2.7.0

Re: CacheConfiguration#setTypes: deserialization on client

Posted by Denis Magda <dm...@apache.org>.
Ruslan,

Yes, I believe it's safe to remove that line from your configuration as
long as it just enforces that you don't put an object of a different class
into the cache.

-
Denis


On Wed, Jul 31, 2019 at 12:18 AM Ruslan Kamashev <ry...@gmail.com> wrote:

> Example of CacheConfiguration:
>
> new CacheConfiguration<TestKey, TestValue>("exampleCache")
>         .setDataRegionName("exampleDataRegion")
>         .setSqlSchema("PUBLIC")
>         .setCacheMode(CacheMode.PARTITIONED)
>         .setBackups(3)
>
> .setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
>         .setAffinity(getRendezvousAffinityFunction())
>         // https://issues.apache.org/jira/browse/IGNITE-11352
>         .setStatisticsEnabled(false)
>         .setManagementEnabled(true)
>         .setTypes(TestKey.class, TestValue.class) // Can I just remove
> this line in my configuration without some sideeffects?
>         .setKeyConfiguration(
>                 new CacheKeyConfiguration()
>                         .setTypeName(TestKey.class.getTypeName())
>                         .setAffinityKeyFieldName("name")
>         )
>         .setQueryEntities(Arrays.asList(
>                 new QueryEntity(TestKey.class.getName(),
> TestValue.class.getName())
>                         .setTableName("exampleTable")
>         ))
>         .setAtomicityMode(CacheAtomicityMode.ATOMIC)
>
>
> On Wed, Jul 31, 2019 at 1:46 AM Denis Magda <dm...@apache.org> wrote:
>
>> Could you please share your configuration?
>>
>> -
>> Denis
>>
>>
>> On Tue, Jul 30, 2019 at 10:37 AM Ruslan Kamashev <ry...@gmail.com>
>> wrote:
>>
>>> Related issue https://issues.apache.org/jira/browse/IGNITE-1903
>>> I don't use CacheStore, but I have the same problem with
>>> CacheConfiguration#setTypes.
>>> Could you offer a workaround for solving this problem? Can I just remove
>>> this line in my configuration without some sideeffects?
>>>
>>> Apache Ignite 2.7.0
>>>
>>

Re: CacheConfiguration#setTypes: deserialization on client

Posted by Ruslan Kamashev <ry...@gmail.com>.
Example of CacheConfiguration:

new CacheConfiguration<TestKey, TestValue>("exampleCache")
        .setDataRegionName("exampleDataRegion")
        .setSqlSchema("PUBLIC")
        .setCacheMode(CacheMode.PARTITIONED)
        .setBackups(3)

.setWriteSynchronizationMode(CacheWriteSynchronizationMode.FULL_SYNC)
        .setAffinity(getRendezvousAffinityFunction())
        // https://issues.apache.org/jira/browse/IGNITE-11352
        .setStatisticsEnabled(false)
        .setManagementEnabled(true)
        .setTypes(TestKey.class, TestValue.class) // Can I just remove this
line in my configuration without some sideeffects?
        .setKeyConfiguration(
                new CacheKeyConfiguration()
                        .setTypeName(TestKey.class.getTypeName())
                        .setAffinityKeyFieldName("name")
        )
        .setQueryEntities(Arrays.asList(
                new QueryEntity(TestKey.class.getName(),
TestValue.class.getName())
                        .setTableName("exampleTable")
        ))
        .setAtomicityMode(CacheAtomicityMode.ATOMIC)


On Wed, Jul 31, 2019 at 1:46 AM Denis Magda <dm...@apache.org> wrote:

> Could you please share your configuration?
>
> -
> Denis
>
>
> On Tue, Jul 30, 2019 at 10:37 AM Ruslan Kamashev <ry...@gmail.com>
> wrote:
>
>> Related issue https://issues.apache.org/jira/browse/IGNITE-1903
>> I don't use CacheStore, but I have the same problem with
>> CacheConfiguration#setTypes.
>> Could you offer a workaround for solving this problem? Can I just remove
>> this line in my configuration without some sideeffects?
>>
>> Apache Ignite 2.7.0
>>
>

Re: CacheConfiguration#setTypes: deserialization on client

Posted by Denis Magda <dm...@apache.org>.
Could you please share your configuration?

-
Denis


On Tue, Jul 30, 2019 at 10:37 AM Ruslan Kamashev <ry...@gmail.com> wrote:

> Related issue https://issues.apache.org/jira/browse/IGNITE-1903
> I don't use CacheStore, but I have the same problem with
> CacheConfiguration#setTypes.
> Could you offer a workaround for solving this problem? Can I just remove
> this line in my configuration without some sideeffects?
>
> Apache Ignite 2.7.0
>