Examples of MurmurHash3


Examples of org.infinispan.commons.hash.MurmurHash3

* @see org.infinispan.commons.hash.MurmurHash3
* @since 5.0
*/
public class ConsistentHashV2 extends ConsistentHashV1 {
   public ConsistentHashV2() {
      hash = new MurmurHash3();
   }
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

         map.put(new InetSocketAddress(i), Collections.singleton(i * 1000));
      }


      dch.init(map, 2, 10024);
      dch.setHash(new MurmurHash3());
   }
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

* @see org.infinispan.commons.hash.MurmurHash3
* @since 5.0
*/
public class ConsistentHashV2 extends ConsistentHashV1 {
   public ConsistentHashV2() {
      hash = new MurmurHash3();
   }
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

      members2.remove(F);
      members2.add(G);

      // create CHes
      DefaultConsistentHashFactory chf = new DefaultConsistentHashFactory();
      DefaultConsistentHash ch1 = chf.create(new MurmurHash3(), 2, numSegments, members1);
      DefaultConsistentHash ch2 = chf.updateMembers(ch1, members2);

      // create dependencies
      when(mockExecutorService.submit(any(Runnable.class))).thenAnswer(new Answer<Future<?>>() {
         @Override
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

      members2.remove(F);
      members2.add(G);

      // create CHes
      DefaultConsistentHashFactory chf = new DefaultConsistentHashFactory();
      DefaultConsistentHash ch1 = chf.create(new MurmurHash3(), 2, numSegments, members1);
      DefaultConsistentHash ch2 = chf.updateMembers(ch1, members2);   //todo [anistor] it seems that address 6 is not used for un-owned segments

      when(commandsFactory.buildStateResponseCommand(any(Address.class), anyInt(), any(Collection.class))).thenAnswer(new Answer<StateResponseCommand>() {
         @Override
         public StateResponseCommand answer(InvocationOnMock invocation) {
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

      members2.remove(new TestAddress(5));
      members2.add(new TestAddress(6));

      // create CHes
      DefaultConsistentHashFactory chf = new DefaultConsistentHashFactory();
      DefaultConsistentHash ch1 = chf.create(new MurmurHash3(), 2, 4, members1);
      DefaultConsistentHash ch2 = chf.updateMembers(ch1, members2);   //todo [anistor] it seems that address 6 is not used for un-owned segments

      log.debug(ch1);
      log.debug(ch2);
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

      try {
         ConfigurationBuilder builder = new ConfigurationBuilder();
         builder.clustering().hash()
            .consistentHash(null);
         // TODO Revisit after we have replaced the CH with the CHFactory in the configuration
         return new DefaultConsistentHashFactory().create(new MurmurHash3(), 2, 10, servers);
      } catch (RuntimeException re) {
         throw re;
      } catch (Exception e) {
         throw new RuntimeException(e);
      }
View Full Code Here

Examples of org.infinispan.commons.hash.MurmurHash3

      Address a3 = new JGroupsAddress(UUID.randomUUID());
      List<Address> oldAddresses = new ArrayList<Address>();
      oldAddresses.add(a1);
      oldAddresses.add(a2);
      DefaultConsistentHashFactory chf = new DefaultConsistentHashFactory();
      DefaultConsistentHash oldCh = chf.create(new MurmurHash3(), 2, 3, oldAddresses);
      List<Address> newAddresses = new ArrayList<Address>();
      newAddresses.add(a1);
      newAddresses.add(a2);
      newAddresses.add(a3);
      DefaultConsistentHash newCh = chf.create(new MurmurHash3(), 2, 3, newAddresses);
      StateRequestCommand c14 = new StateRequestCommand(cacheName, StateRequestCommand.Type.START_STATE_TRANSFER, a1, 99, null);
      byte[] bytes = marshaller.objectToByteBuffer(c14);
      marshaller.objectFromByteBuffer(bytes);

      bytes = marshaller.objectToByteBuffer(c14);
View Full Code Here

Examples of org.infinispan.util.hash.MurmurHash3

* @see org.infinispan.util.hash.MurmurHash3
* @since 5.0
*/
public class ConsistentHashV2 extends ConsistentHashV1 {
   public ConsistentHashV2() {
      hash = new MurmurHash3();
   }
View Full Code Here

Examples of org.infinispan.util.hash.MurmurHash3

* @see org.infinispan.util.hash.MurmurHash3
* @since 5.0
*/
public class ConsistentHashV2 extends ConsistentHashV1 {
   public ConsistentHashV2() {
      mmh = new MurmurHash3();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.