ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vladislav Pyatkov <vldpyat...@gmail.com>
Subject Re: Rest-api: Creating service to read data from cache
Date Fri, 05 Aug 2016 13:20:18 GMT
Hello

Ignite REST API has predefined methods. If you need to do some SQL over a
cache (for aggregation), you can see the topic[1].

In order to using REST API you need just put ignite-rest-http into
classpath and Ignite deploys Jetty (with default configuration) automaticly.

If you will have issue with Ignite-rest-http, you could ask any quetion on
User List.

[1] https://apacheignite.readme.io/docs/rest-api#sql-query-execute

On Fri, Aug 5, 2016 at 12:39 PM, chevy <chetan.v.yadav@target.com> wrote:

> Hi,
>
> I have created bean which aligns to my table structure as shown below and
> add data to it. While pulling data from cache I need to do some aggregation
> on data and then create service using the data. Ignite provides rest-api
> but
> I did not see any variant where I just use that api by mentioning my cache
> name and add my data say aggregated(a), b, aggregated(c) as params into URL
> and access it directly.
>
> 1. Is there a way to do this or should I write my own services using
> jetty/spring?
> 2. If yes, please provide me some sample implementation.
>
> public class TableA implements Serializable {
>
>         private static final long serialVersionUID = 1L;
>
>     @QuerySqlField(index = true)
>     public int a;
>
>     @QuerySqlField
>     public Date b;
>
>     @QuerySqlField
>     public int c;
>
>     public TableA(int a, Date b, int c) {
>         this.a = a;
>         this.b = b;
>         this.c = c;
>     }
>
> }
>
>
>
>
> --
> View this message in context: http://apache-ignite-users.
> 70518.x6.nabble.com/Rest-api-Creating-service-to-read-data-
> from-cache-tp6788.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>



-- 
Vladislav Pyatkov

Mime
View raw message