ignite-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "kcheng.mvp (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (IGNITE-2037) Update javadocs and documentation about LOCAL cache could be created on client node
Date Mon, 01 Feb 2016 02:16:39 GMT

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

kcheng.mvp commented on IGNITE-2037:
------------------------------------

Below is from the document
Ignite has an optional notion of client and server nodes. **Server nodes participate in caching,
compute execution, stream processing, etc., while the native client nodes provide the ability
to connect to the servers remotely**. Ignite native clients allow to use the whole set of
Ignite APIs, including near caching, transactions, compute, streaming, services, etc. from
the client side.

By default, all Ignite nodes are started as server nodes, and client mode needs to be explicitly
enabled.

--- here is the description about local cache


**LOCAL mode is the most light weight mode of cache operation, as no data is distributed to
other cache nodes**


Seems the descriptions are conflict. can you please clarify this. then I can update the document.




> Update javadocs and documentation about LOCAL cache could be created on client node
> -----------------------------------------------------------------------------------
>
>                 Key: IGNITE-2037
>                 URL: https://issues.apache.org/jira/browse/IGNITE-2037
>             Project: Ignite
>          Issue Type: Bug
>          Components: cache, newbie
>    Affects Versions: ignite-1.4
>            Reporter: Alexey Kuznetsov
>            Priority: Trivial
>             Fix For: 1.6
>
>
> Code that show local cache on client node:
> {code}
> public class LocalCacheOnClient {
>     public static void main(String[] args) throws IgniteException {
>         IgniteConfiguration cfgSrv = new IgniteConfiguration();
>         cfgSrv.setGridName("srv");
>         Ignite n1 = Ignition.start(cfgSrv);
>         IgniteConfiguration cfgClm = new IgniteConfiguration();
>         cfgClm.setGridName("cln");
>         cfgClm.setClientMode(true);
>         Ignite n2 = Ignition.start(cfgClm);
>         CacheConfiguration<Integer, Integer> ccfg = new CacheConfiguration<>("local");
>         ccfg.setCacheMode(CacheMode.LOCAL);
>         IgniteCache<Integer, Integer> c = n2.getOrCreateCache(ccfg);
>         c.put(1, 100);
>         n1.close(); // stop server node
>         c.put(2, 200); // local cache works fine.
>         System.out.println(c.get(1));
>         System.out.println(c.get(2));
>     }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message