ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shawn Du" <shawn...@neulion.com.cn>
Subject 答复: 答复: query binaryobject cache in zeppelin
Date Tue, 13 Dec 2016 00:34:51 GMT

Hi Andrey,


I had code to add entities to configuration. It seems that it doesn’t support using Asterisk
in select clause.

If I use column names, zeppelin can show the data.


Also some background about the testing:


Using ignite 1.8 and zeppelin 0.6.2.  in order to make zeppelin work with ignite 1.8, I had
to build from source and change pom.xml to use ignite 1.8.0.

All Seems good. 





发件人: Andrey Mashenkov [mailto:andrey.mashenkov@gmail.com] 
发送时间: 2016年12月12日 18:54
收件人: user@ignite.apache.org
主题: Re: 答复: query binaryobject cache in zeppelin


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 <shawn.du@neulion.com.cn <mailto:shawn.du@neulion.com.cn>
> wrote:



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();
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()));




发件人: Andrey Mashenkov [mailto:amashenkov@gridgain.com <mailto:amashenkov@gridgain.com>
发送时间: 2016年12月12日 17:24
收件人: user@ignite.apache.org <mailto:user@ignite.apache.org> 
主题: 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 <shawn.du@neulion.com.cn <mailto:shawn.du@neulion.com.cn>
> wrote:



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?







С уважением,
Машенков Андрей Владимирович
Тел. +7-921-932-61-82

Best regards,
Andrey V. Mashenkov
Cerr: +7-921-932-61-82

View raw message