Re: Query Entity and Affinity Key
Hi, CacheKeyConfiguration can be defined on CacheConfiguration level: https://ignite.apache.org/releases/latest/javadoc/org/apache/ignite/configuration/CacheConfiguration.html#setKeyConfiguration-org.apache.ignite.cache.CacheKeyConfiguration...- пн, 16 мар. 2020 г. в 20:07, narges saleh : > Attached. thanks. > > On Mon, Mar 16, 2020 at 8:28 PM Evgenii Zhuravlev < > e.zhuravlev...@gmail.com> wrote: > >> Hi, please share the whole config file >> >> пн, 16 мар. 2020 г. в 15:38, narges saleh : >> >>> Thanks Evgenii for the reply. >>> How do I do that in XML configuration file if my query entities are >>> defined solely in the xml file? What does ClassNameOfKey and >>> fieldNameinThatClass represent? I assume I will have one bean for each >>> cache. >>> >>> >>> >>> >>> >>> >> >>> value="fieldNameInThatClass"/> >>> >>> >>> >>> >>> And the bean for the query entity is:have >>> >>> >> value="java.lang.Integer"/> >>> >> value="PERSON"/> >>> >> value="PERSON"/> >>> >>> >>> >>> >> value="java.lang.Integer"/> >>>>> value="java.lang.Integer"/> >>> >> value="java.lang.String"/> >>> >> value="java.lang.String"/> >>> >>> >>> >>> >>> >>> CompanyId >>> EmployeeId >>> >>> >>> >>> >>> >>> On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev < >>> e.zhuravlev...@gmail.com> wrote: >>> Hi, You should have one cache per table(query entity) and configure separate CacheKeyConfigurations for each of the caches. Evgenii пн, 16 мар. 2020 г. в 11:42, narges saleh : > Hi All, > > I have a question that might be trivial. > If I define my query entity for each in the XML configuration file and > define the affinity key via CacheKeyConfiguration (again in the xml file), > considering that here affinity key is defined at IgniteConfiguration > level, > how do I specify which cache keys (i.e., query entity key fields) will use > the affinity key and which ones don't? > > Say I have these 4 tables > Employee(company-id, employee-id) > Contractor(company-id, contractor-id) > Customer(company-id, customer-id) > Company(company-id, address) > > How do I collocate employee, and contractors with companies but not > the customers and companies? Can you provide the CacheKeyConfiguration and > keyfields for each query entity? > > thanks. >
Re: Query Entity and Affinity Key
Attached. thanks. On Mon, Mar 16, 2020 at 8:28 PM Evgenii Zhuravlev wrote: > Hi, please share the whole config file > > пн, 16 мар. 2020 г. в 15:38, narges saleh : > >> Thanks Evgenii for the reply. >> How do I do that in XML configuration file if my query entities are >> defined solely in the xml file? What does ClassNameOfKey and >> fieldNameinThatClass represent? I assume I will have one bean for each >> cache. >> >> >> >> >> >> > >> value="fieldNameInThatClass"/> >> >> >> >> >> And the bean for the query entity is:have >> >> > value="java.lang.Integer"/> >> > value="PERSON"/> >> > value="PERSON"/> >> >> >> >> > value="java.lang.Integer"/> >>> value="java.lang.Integer"/> >> > value="java.lang.String"/> >> > value="java.lang.String"/> >> >> >> >> >> >> CompanyId >> EmployeeId >> >> >> >> >> >> On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev < >> e.zhuravlev...@gmail.com> wrote: >> >>> Hi, >>> >>> You should have one cache per table(query entity) and configure separate >>> CacheKeyConfigurations for each of the caches. >>> >>> Evgenii >>> >>> пн, 16 мар. 2020 г. в 11:42, narges saleh : >>> Hi All, I have a question that might be trivial. If I define my query entity for each in the XML configuration file and define the affinity key via CacheKeyConfiguration (again in the xml file), considering that here affinity key is defined at IgniteConfiguration level, how do I specify which cache keys (i.e., query entity key fields) will use the affinity key and which ones don't? Say I have these 4 tables Employee(company-id, employee-id) Contractor(company-id, contractor-id) Customer(company-id, customer-id) Company(company-id, address) How do I collocate employee, and contractors with companies but not the customers and companies? Can you provide the CacheKeyConfiguration and keyfields for each query entity? thanks. >>> http://www.springframework.org/schema/beans; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xmlns:util="http://www.springframework.org/schema/util; xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd;> employeeId companyId
Re: Query Entity and Affinity Key
Hi, please share the whole config file пн, 16 мар. 2020 г. в 15:38, narges saleh : > Thanks Evgenii for the reply. > How do I do that in XML configuration file if my query entities are > defined solely in the xml file? What does ClassNameOfKey and > fieldNameinThatClass represent? I assume I will have one bean for each > cache. > > > > > > > value="fieldNameInThatClass"/> > > > > > And the bean for the query entity is:have > > value="java.lang.Integer"/> > > > > > > value="java.lang.Integer"/> > value="java.lang.Integer"/> > value="java.lang.String"/> > value="java.lang.String"/> > > > > > > CompanyId > EmployeeId > > > > > > On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev < > e.zhuravlev...@gmail.com> wrote: > >> Hi, >> >> You should have one cache per table(query entity) and configure separate >> CacheKeyConfigurations for each of the caches. >> >> Evgenii >> >> пн, 16 мар. 2020 г. в 11:42, narges saleh : >> >>> Hi All, >>> >>> I have a question that might be trivial. >>> If I define my query entity for each in the XML configuration file and >>> define the affinity key via CacheKeyConfiguration (again in the xml file), >>> considering that here affinity key is defined at IgniteConfiguration level, >>> how do I specify which cache keys (i.e., query entity key fields) will use >>> the affinity key and which ones don't? >>> >>> Say I have these 4 tables >>> Employee(company-id, employee-id) >>> Contractor(company-id, contractor-id) >>> Customer(company-id, customer-id) >>> Company(company-id, address) >>> >>> How do I collocate employee, and contractors with companies but not the >>> customers and companies? Can you provide the CacheKeyConfiguration and >>> keyfields for each query entity? >>> >>> thanks. >>> >>
Re: Query Entity and Affinity Key
Thanks Evgenii for the reply. How do I do that in XML configuration file if my query entities are defined solely in the xml file? What does ClassNameOfKey and fieldNameinThatClass represent? I assume I will have one bean for each cache. And the bean for the query entity is:have CompanyId EmployeeId On Mon, Mar 16, 2020 at 3:22 PM Evgenii Zhuravlev wrote: > Hi, > > You should have one cache per table(query entity) and configure separate > CacheKeyConfigurations for each of the caches. > > Evgenii > > пн, 16 мар. 2020 г. в 11:42, narges saleh : > >> Hi All, >> >> I have a question that might be trivial. >> If I define my query entity for each in the XML configuration file and >> define the affinity key via CacheKeyConfiguration (again in the xml file), >> considering that here affinity key is defined at IgniteConfiguration level, >> how do I specify which cache keys (i.e., query entity key fields) will use >> the affinity key and which ones don't? >> >> Say I have these 4 tables >> Employee(company-id, employee-id) >> Contractor(company-id, contractor-id) >> Customer(company-id, customer-id) >> Company(company-id, address) >> >> How do I collocate employee, and contractors with companies but not the >> customers and companies? Can you provide the CacheKeyConfiguration and >> keyfields for each query entity? >> >> thanks. >> >
Re: Query Entity and Affinity Key
Hi, You should have one cache per table(query entity) and configure separate CacheKeyConfigurations for each of the caches. Evgenii пн, 16 мар. 2020 г. в 11:42, narges saleh : > Hi All, > > I have a question that might be trivial. > If I define my query entity for each in the XML configuration file and > define the affinity key via CacheKeyConfiguration (again in the xml file), > considering that here affinity key is defined at IgniteConfiguration level, > how do I specify which cache keys (i.e., query entity key fields) will use > the affinity key and which ones don't? > > Say I have these 4 tables > Employee(company-id, employee-id) > Contractor(company-id, contractor-id) > Customer(company-id, customer-id) > Company(company-id, address) > > How do I collocate employee, and contractors with companies but not the > customers and companies? Can you provide the CacheKeyConfiguration and > keyfields for each query entity? > > thanks. >
Query Entity and Affinity Key
Hi All, I have a question that might be trivial. If I define my query entity for each in the XML configuration file and define the affinity key via CacheKeyConfiguration (again in the xml file), considering that here affinity key is defined at IgniteConfiguration level, how do I specify which cache keys (i.e., query entity key fields) will use the affinity key and which ones don't? Say I have these 4 tables Employee(company-id, employee-id) Contractor(company-id, contractor-id) Customer(company-id, customer-id) Company(company-id, address) How do I collocate employee, and contractors with companies but not the customers and companies? Can you provide the CacheKeyConfiguration and keyfields for each query entity? thanks.