Re: How to configure a QueryEntity for a BinaryObject
Thanks Evgenii,It does work! -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: How to configure a QueryEntity for a BinaryObject
Check QueryEntity class, it contains tableName property. Evgenii -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: How to configure a QueryEntity for a BinaryObject
Thanks, Evgenii. I removed the indexedTypes configuration according to your suggestion. But it still doesn't work. The ignite throws a exception:"Failed to find SQL table for type: com.example.Foo". (There is a error in the configuration of my previous post, i change the valType from "com.Foo.Bar" to "com.example.Foo"). -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: How to configure a QueryEntity for a BinaryObject
If you're configuring QueryEntity, you don't need to add to the configuration indexedTypes too. It's just different ways to configure Indexes and queryable fields. Evgenii 2017-09-20 10:10 GMT+03:00 Savagearts: > I failed to configure the binaryobject ignitecache. My cache configuration > as > following: > class="org.apache.ignite.configuration.CacheConfiguration"> > > > > > > > > > /> > value="java.lang.String" /> > > > > > name > > > > > > > java.lang.String > org.apache.ignite. > binary.BinaryObject > > > > > 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 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/ >
Re: How to configure a QueryEntity for a BinaryObject
I failed to configure the binaryobject ignitecache. My cache configuration as following: name java.lang.String org.apache.ignite.binary.BinaryObject 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 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/
Re: How to configure a QueryEntity for a BinaryObject
Thanks,I'll give it a try -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: How to configure a QueryEntity for a BinaryObject
Hi, Yes, you can do this with, just provide the field name and its type in the QueryEntity#fields map. Is there anything in particular that doesn't work? -Val -- Sent from: http://apache-ignite-users.70518.x6.nabble.com/