ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Welly Tambunan <if05...@gmail.com>
Subject Sorting behaviour on Time Series data in partitioned cache
Date Wed, 23 Dec 2015 07:27:08 GMT
Hi All,

I have a node with this configuration for working with TimeSeries

val cacheConfig = new CacheConfiguration[SeriesKey, TimeSeries]("time-series")
cacheConfig.setIndexedTypes(classOf[SeriesKey], classOf[TimeSeries])
val cfg = new IgniteConfiguration()

The class i have is the simple one like this

case class SeriesKey(@AffinityKeyMapped chId: UUID, idx: Long) extends

case class TimeSeries(@(QuerySqlField @field) chId: UUID,
@(QuerySqlField @field)(index = true) idx: Long, value: Any) extends

I expect that the series with the same channel will be cached in a
single node and it will be sorted based on the index. However when i'm
querying the cache like this i found out of order series.

val sql = new SqlQuery(classOf[TimeSeries], "chId = ?")

val chId = UUID.fromString("274061d5-7b48-4b35-b08a-1742c97865ef")

// Find only persons earning more than 1,000.
val cursor = cache.query(sql.setArgs(chId))

I'm confuse with this behavior as it seems doesn't index the
TimeSeries right. If i add the order by idx it works fine even when i
don't set querysqlfield index=true

Any thoughts ?

Welly Tambunan

http://www.triplelands.com <http://www.triplelands.com/blog/>

View raw message