Hi Rick,

You could use rest api that documented in
https://apacheignite.readme.io/docs/rest-api .

Thanks,
Pavel

2018-03-22 9:44 GMT+03:00 <[email protected]>:

> Dear all,
>
>
>
> My settings of running environment is as:
>
> OS: Ubuntn 14.04.3 LTS
>
> JAVA: JDK 1.7
>
> Ignite: 2.4.0
>
>
>
> I would like to get all data of one cache in Ignite
>
>
>
> Without creating a new ignite node, I do not know how to get data by
> another executive java program (without the Ignition.getOrStart(cfg)).
>
>
>
> The setting of one listening ignite node is:
>
> " IgniteConfiguration cfg  = new IgniteConfiguration();
>
>  cfg.setClientMode(*false*);  //server
>
>   *CacheConfiguration* cacheConf = *new* *CacheConfiguration*();
>
> cacheConf.setName("igniteCache");
>
> *cacheConf**.setIndexedTypes(String.**class**, String.**class**)*;
>
> cacheConf.setCacheMode(CacheMode.*REPLICATED*);
>
> cacheConf.setAtomicityMode(CacheAtomicityMode.*ATOMIC*);
>
> cfg.setCacheConfiguration(cacheConf);
>
> Ignite igniteNode =
>
> *IgniteCache* cache = *igniteNode**.getOrCreateCache(**cacheConf**)*;
>
>
> *int* datasize = 10;
>
> *for* (*int* i = 0; i < datasize; i++) {
>
> cache.put("key " + Integer.*toString*(i), Integer.*toString*(i));
>
> }"
>
>
>
> *In the Ignite document, there are many ways to get data. However, it
> seems to need to create a new ignite node (server/client) to get data.*
>
>
>
> *I know that Restful API is a way to get data. But, it is not flexible to
> use over the java program.*
>
>
>
> If you have any idea about the issue, I am looking forward to hearing from
> you.
>
>
>
> Thanks
>
>
>
> Rick
>
>
>
>
> --
> 本信件可能包含工研院機密資訊,非指定之收件者,請勿使用或揭露本信件內容,並請銷毀此信件。 This email may contain
> confidential information. Please do not use or disclose it in any way and
> delete it if you are not the intended recipient.
>



-- 

Regards

Pavel Vinokurov

Reply via email to