7 Replies Latest reply on Feb 24, 2014 6:48 AM by mvpratap

    data is not distributed amoung multiple machines in cluster

    mvpratap

      i am forming a cluster in distrbution mode.And i insert some data in cache of first machine and not able to get in second machine, can any body providde help on this?

        • 1. Re: data is not distributed amoung multiple machines in cluster
          mvpratap

          can i use keySet(),size(),values() on cache ?? i am using these 3 methods frequently ,Is there any limitation with these methods and any alternative solution for this

          • 2. Re: data is not distributed amoung multiple machines in cluster
            william.burns

            Currently the bulk read operations, such as size, keySet and values are only ran local to the node invoking them (cache loaders are checked)r.  The Javadoc talks about this Cache (Infinispan Distribution 6.0.0.Final API)

             

            Depending on what you are trying to do you could always do a map reduce task to do some of these operations.

             

            I know it has come up in the past to change these to work across the cluster, but it hasn't gotten anywhere yet.

            • 3. Re: data is not distributed amoung multiple machines in cluster
              mvpratap

              when i use infinispan with two nodes .Each node is having 6 caches .when i add an element to 6 caches on first node .but only 3 got stored on first node.remaining 3 got stored on second node.

                   I am using distribution mode with numOwners=1.state transfer is also enabled in jgroups.xml

                   cluster is formed successfully .But data is not distributed between the nodes.

              Does anybody knows what might be the problem??

              • 4. Re: data is not distributed amoung multiple machines in cluster
                nadirx

                You're getting expected behaviour:

                with numOwners=1 only one node in the cluster will have each item. Which node this is is determined by the consistent hash of the key. So you'll see some of your data on one node and some data on the other node. Performing a get for a key not present locally will perform a remote lookup.

                 

                JGroups state transfer has got nothing to do with Infinispan's notion of state transfer.

                 

                Tristan

                • 5. Re: data is not distributed amoung multiple machines in cluster
                  mvpratap

                  yes i agree with you,but that remote lookup is not happening in my case.so i am not able to get data on node2 in node1

                  • 6. Re: data is not distributed amoung multiple machines in cluster
                    nadirx

                    you mean a cache.get(x) after a cache.put(x, y) doesn't return y ?

                    • 7. Re: data is not distributed amoung multiple machines in cluster
                      mvpratap

                      yes.

                      these are my configurations

                      infinispan

                      ======

                      <infinispan

                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                              xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"

                              xmlns="urn:infinispan:config:6.0">

                       

                         <global>

                           <transport clusterName="Mycluster" machineId="16" nodeName="N16">

                           <properties>

                              <property name="configurationFile" value="jgroups.xml"/>

                           </properties>

                           </transport>

                         </global>

                         <default>

                            <clustering mode="distribution">

                      <stateTransfer chunkSize="2000" timeout="10000" fetchInMemoryState="true"/>

                             <hash numOwners="1"/>

                               <sync/>

                            </clustering>

                         </default>

                      <namedCache name="users">

                      </namedCache>

                      <infinispan>

                       

                      jgroups

                      =====

                      <config xmlns="urn:org:jgroups"

                              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

                              xsi:schemaLocation="urn:org:jgroups http://www.jgroups.org/schema/JGroups-3.4.xsd">

                          <TCP bind_addr="131.10.20.16"

                               bind_port="7800" port_range="10"

                               recv_buf_size="20000000"

                               send_buf_size="640000"

                               loopback="false"

                               max_bundle_size="64k"

                               bundler_type="old"

                               enable_diagnostics="true"

                               thread_naming_pattern="cl"

                       

                               timer_type="new"

                               timer.min_threads="4"

                               timer.max_threads="10"

                               timer.keep_alive_time="3000"

                               timer.queue_max_size="1000"

                               timer.wheel_size="200"

                               timer.tick_time="50"

                       

                               thread_pool.enabled="true"

                               thread_pool.min_threads="2"

                               thread_pool.max_threads="10"

                               thread_pool.keep_alive_time="5000"

                               thread_pool.queue_enabled="true"

                               thread_pool.queue_max_size="100000"

                               thread_pool.rejection_policy="discard"

                       

                               oob_thread_pool.enabled="true"

                               oob_thread_pool.min_threads="2"

                               oob_thread_pool.max_threads="10"

                               oob_thread_pool.keep_alive_time="5000"

                               oob_thread_pool.queue_enabled="false"

                               oob_thread_pool.queue_max_size="100"

                               oob_thread_pool.rejection_policy="discard"/>

                       

                              <TCPPING initial_hosts="131.10.20.16[7800],131.10.20.27[7800]" port_range="2"

                               timeout="3000" num_initial_members="2" />

                          <MERGE2 max_interval="30000"

                                  min_interval="10000"/>

                       

                          <FD_SOCK/>

                          <FD_ALL interval="4000" timeout="25000" />

                          <VERIFY_SUSPECT timeout="500"  />

                          <BARRIER />

                          <pbcast.NAKACK use_mcast_xmit="false"

                                         retransmit_timeout="100,300,600,1200"

                                         discard_delivered_msgs="true" />

                          <UNICAST3 conn_expiry_timeout="0"/>

                       

                          <pbcast.STABLE stability_delay="1000" desired_avg_gossip="50000"

                                         max_bytes="10m"/>

                          <pbcast.GMS print_local_addr="true" join_timeout="5000"

                                      max_bundling_time="30"

                                      view_bundling="true"/>

                          <UFC max_credits="2M"

                               min_threshold="0.4"/>

                          <MFC max_credits="2M"

                               min_threshold="0.4"/>

                          <FRAG2 frag_size="60000"  />

                          <pbcast.STATE_TRANSFER/>

                      </config>

                       

                      i am using JavaSE. No web server at all.