[ 
https://issues.apache.org/jira/browse/IGNITE-7687?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16553804#comment-16553804
 ] 

Satendra Kumar commented on IGNITE-7687:
----------------------------------------

[~vozerov] We are using spark Dataframe for persisting into Ignite. It is real 
time data. We only need 10 minutes window data into Ignite for real time 
Dashboard. Is any alternative solutions for this?

I also posted on 
[stackoverflow|https://stackoverflow.com/questions/51459535/how-to-set-expiry-policy-for-ignite-cache-inserting-data-using-spark-dataframe]

 

Thanks!

> SQL SELECT doesn't update TTL for Touched/AccessedExpiryPolicy
> --------------------------------------------------------------
>
>                 Key: IGNITE-7687
>                 URL: https://issues.apache.org/jira/browse/IGNITE-7687
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.5
>            Reporter: Stanislav Lukyanov
>            Priority: Major
>
> SQL SELECT queries don't update TTLs when TouchedExpiryPolicy or 
> AccessedExpiryPolicy is used (unlike IgniteCache::get which does update the 
> TTLs).
> Example (modified SqlDmlExample):
> ========================
>     CacheConfiguration<Long, Organization> orgCacheCfg = new 
> CacheConfiguration<Long, Organization>(ORG_CACHE)
>         .setIndexedTypes(Long.class, Organization.class)
>         .setExpiryPolicyFactory(TouchedExpiryPolicy.factoryOf(new 
> Duration(TimeUnit.SECONDS, 10)));
>     
>     IgniteCache<Long, Organization> orgCache = 
> ignite.getOrCreateCache(orgCacheCfg);
>     
>     SqlFieldsQuery qry = new SqlFieldsQuery("insert into Organization (_key, 
> id, name) values (?, ?, ?)");
>     orgCache.query(qry.setArgs(1L, 1L, "ASF"));
>     orgCache.query(qry.setArgs(2L, 2L, "Eclipse"));
>     
>     SqlFieldsQuery qry1 = new SqlFieldsQuery("select id, name from 
> Organization as o");
>     for (int i = 0; ;i++) {
>         List<List<?>> res = orgCache.query(qry1).getAll();
>         print("i = " + i);
>         for (Object next : res)
>             System.out.println(">>>     " + next);
>         U.sleep(5000);
>     }
> ========================
> Output:
> >>> i = 0
> >>>     [1, ASF]
> >>>     [2, Eclipse]
> >>> i = 1
> >>>     [1, ASF]
> >>>     [2, Eclipse]
> >>> i = 2
> >>> i = 3
> ...



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to