CacheConfiguration#setTypes: deserialization on client

classic Classic list List threaded Threaded
4 messages Options
Ruslan Kamashev Ruslan Kamashev
Reply | Threaded
Open this post in threaded view
|

CacheConfiguration#setTypes: deserialization on client

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
dmagda dmagda
Reply | Threaded
Open this post in threaded view
|

Re: CacheConfiguration#setTypes: deserialization on client

Could you please share your configuration?

-
Denis


On Tue, Jul 30, 2019 at 10:37 AM Ruslan Kamashev <[hidden email]> wrote:
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
Ruslan Kamashev Ruslan Kamashev
Reply | Threaded
Open this post in threaded view
|

Re: CacheConfiguration#setTypes: deserialization on client

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 <[hidden email]> wrote:
Could you please share your configuration?

-
Denis


On Tue, Jul 30, 2019 at 10:37 AM Ruslan Kamashev <[hidden email]> wrote:
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
dmagda dmagda
Reply | Threaded
Open this post in threaded view
|

Re: CacheConfiguration#setTypes: deserialization on client

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 <[hidden email]> 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 <[hidden email]> wrote:
Could you please share your configuration?

-
Denis


On Tue, Jul 30, 2019 at 10:37 AM Ruslan Kamashev <[hidden email]> wrote:
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