I failed to configure the binaryobject ignitecache. My cache configuration as
following:
            <bean
class="org.apache.ignite.configuration.CacheConfiguration">
                <property name="name" value="cache1" />
                <property name="storeKeepBinary" value="true" />
                <property name="queryEntities">
                    <bean class="org.apache.ignite.cache.QueryEntity">
                        <property name="keyType" value="java.lang.String"/>
                        <property name="valueType" value="com.Foo.Bar" />
                        <property name="fields">
                            <map>
                                <entry key="name" value="java.lang.String"
/>
                                <entry key="bar.name"
value="java.lang.String" />
                            </map>
                        </property>
                        <property name="indexes">
                            <list>
                                <value>name</value>
                            </list>
                        </property>
                    </bean>
                </property>
                <property name="indexedTypes">
                    <list>
                        <value>java.lang.String</value>
                        <value>org.apache.ignite.binary.BinaryObject</value>
                    </list>
                </property>
            </bean>

I can apply BinaryObjectBuilder to build a binaryobject with type
name:"com.example.Foo" and put it in the cache. But when i apply SqlQuery, a
IgniteSQLException is thrown with message:"Failed to find SQL table for
type: com.example.Foo". But when i change the cache configuration's
indexedTypes with com.example.Foo, The ignite fail to create such a cache,
cause of "com.example.Foo" doesn't exist. My binary object builder code as
following:
       final  Collection<BinaryObject> result = new ArrayList<>(numbers);
        IntStream.range(1,numbers).forEach((i)->{
            BinaryObjectBuilder fooBuilder
=ignite.binary().builder("com.example.Foo");
            fooBuilder.setField("name","foo"+i).setField("age",i);
            result.add(fooBuilder.build());
        });  



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Reply via email to