Hi Shawn, Looks strange that Query Indexed Types is "n/a" Are you forget to add query entities to configuration? I can't see in your code: cacheCfg.setQueryEntities(Arrays.asList(entity))
On Mon, Dec 12, 2016 at 1:41 PM, Shawn Du <[email protected]> wrote: > Hi, > > > > Just this is part of my cache configuration. See the red part. Query > schema Name is empty, it is so-called *table name*? > > > > |Store Write Through | > off | > > | Write-Behind Enabled | > off | > > | Write-Behind Flush Size | > 10240 | > > | Write-Behind Frequency | > 5000 | > > | Write-Behind Flush Threads Count | > 1 | > > | Write-Behind Batch Size | > 512 | > > | Concurrent Asynchronous Operations Number | > 500 | > > | Memory Mode | > ONHEAP_TIERED | > > | Off-Heap Size | > <n/a> | > > | Loader Factory Class Name | > <n/a> | > > | Writer Factory Class Name | > <n/a> | > > | Expiry Policy Factory Class Name | javax.cache.configuration. > FactoryBuilder$SingletonFactory | > > | Query Execution Time Threshold | > 3000 | > > | Query Schema Name | > | > > | Query Escaped Names | > off | > > | Query Onheap Cache Size | > 10240 | > > | Query SQL functions | > <n/a> | > > | Query Indexed Types | > <n/a> | > > +----------------------------------------------------------- > -----------------------------------------------+ > > > > > > I create queryEntity by the following code, ColumnScheme is my own class, > just contains information column name/type and ensureIndex or not. > > > > Is the entity value type is “Table Name”? I set it the same with the > cache name. I try to use this as the table name in SQL, still not work. > Please help. Thanks. > > > > QueryEntity entity = new QueryEntity(); > entity.setKeyType(keyType); > entity.setValueType(valueType); > LinkedHashMap<String, String> fields = new LinkedHashMap<>(); > List<QueryIndex> indexes = new ArrayList<>(); > for (ColumnScheme columnScheme : columns) > { > fields.put(columnScheme.getName(), columnScheme.getType()); > if (columnScheme.isEnsureIndex()) > { > indexes.add(new QueryIndex(columnScheme.getName())); > } > } > entity.setIndexes(indexes); > entity.setFields(fields); > > > > Shawn > > > > *发件人:* Andrey Mashenkov [mailto:[email protected]] > *发送时间:* 2016年12月12日 17:24 > *收件人:* [email protected] > *主题:* Re: query binaryobject cache in zeppelin > > > > Hi Shawn, > > > > Classes that you want to use in queries should be set via setQueryEntities. > > > > *Table name* in Ignite has name of type. E.g if you want to get some > record of class "my.org.Person" you should use "Person" as table name: > Select * from Person. > > To make cross cache query you should use full table name as > "cache_name".class_name: Select ... from Person, "other_cache".Org Where ... > > > > For JDK classes like java.lang.Integer, table name will be "Integer" > > > > On Mon, Dec 12, 2016 at 12:09 PM, Shawn Du <[email protected]> > wrote: > > Hi, > > > > Today, I had a try of zeppelin. After setup a zeppelin node and began to > issue SQL for query, I don’t know how to input the *table name* of SQL. > > For my cache are built with BinaryObject and config with setQueryEntities. > > > > It is possible to do query in zeppinlin for these caches? > > > > Thanks > > Shawn > > > -- С уважением, Машенков Андрей Владимирович Тел. +7-921-932-61-82 Best regards, Andrey V. Mashenkov Cerr: +7-921-932-61-82
