Hello!
Recent versions of Ignite will indeed fill QueryEntity and never use
indexedTypes field. QueryEntity and Indexed Types are mutually exclusive
anyway.
Return type is CacheConfiguration for invocations chaining, so that you can
use:
CacheConfiguration cacheConfiguration = *new *CacheConfiguration()
.setName(cacheName)
.setTypes(keyClazz, valueClazz)
.setIndexedTypes(*long*.*class*, valueClazz)
.setSqlSchema(*"PUBLIC"*);
Why do you have keyClazz != indexed types key class?
Regards,
--
Ilya Kasnacheev
пн, 4 мар. 2019 г. в 19:27, Scott Cote <[email protected]>:
> Hello Igniters:
>
>
>
> I am programmatically setting the index type data in ignite.
>
>
>
> I was establishing the index types by doing something like:
>
>
>
> CacheConfiguration cacheConfiguration = *new *CacheConfiguration();
> cacheConfiguration.setName(cacheName);
> cacheConfiguration.setTypes(keyClazz, valueClazz);
> cacheConfiguration.setIndexedTypes(*long*.*class*, valueClazz);
> cacheConfiguration.setSqlSchema(*"PUBLIC"*);
>
>
>
>
>
> But I discovered that my index type data was not setting ….
>
> Under the hood, I saw that the QueryEntitiy for the
> “long.class,valueClazz” was getting created, but the field inside
> CacheConfig called “indexedTypes” was NOT getting set for my instance
> called cacheConfiguration.
>
>
>
> Then I noticed that the “setIndexTypes” method is not a bean method … not
> a void return, but returns “this” . (this is what I get for not reading
> the Javadoc closely, but instead relying in the method name to imply the
> usage …. ). Nonetheless, the returned “this” doesn’t have the value set
> either (the query entity does have it set). When does the field
> “indexedTypes” get set? Only assignment that I saw was from the copy
> constructor …..
>
>
>
> Is getIndexTypes useful still?
>
>
>
> SCott
>
>
>
>
>