congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
AbstractMappingPartitionAssigner$HostAndIndexInRing
Code IndexAdd Tabnine to your IDE (free)

How to use
AbstractMappingPartitionAssigner$HostAndIndexInRing
in
com.liveramp.hank.partition_assigner

Best Java code snippets using com.liveramp.hank.partition_assigner.AbstractMappingPartitionAssigner$HostAndIndexInRing (Showing top 5 results out of 315)

origin: LiveRamp/hank

validHosts.add(new HostAndIndexInRing(host, hostIndex));
origin: LiveRamp/hank

result.put(hostAndIndex.getHost(), new ArrayList<Integer>());
origin: LiveRamp/hank

 private Map<Integer, Host> getPartitionAssignment(int numPartitions, Host... hosts) {
  List<AbstractMappingPartitionAssigner.HostAndIndexInRing> hostAndIndexInRings = new ArrayList<AbstractMappingPartitionAssigner.HostAndIndexInRing>();
  for (int i = 0; i < hosts.length; ++i) {
   Host host = hosts[i];
   if (host != null) {
    hostAndIndexInRings.add(new AbstractMappingPartitionAssigner.HostAndIndexInRing(host, i));
   }
  }
  RendezVousPartitionAssigner partitionAssigner = new RendezVousPartitionAssigner();
  Domain domain = new MockDomain("domain", 0, numPartitions, null, null, null, null);
  return partitionAssigner.getPartitionsAssignment(domain, hostAndIndexInRings);
 }
}
origin: LiveRamp/hank

private HostAndPartitionRendezVous(Domain domain, int partitionId, HostAndIndexInRing hostAndIndexInRing) {
 this.host = hostAndIndexInRing.getHost();
 this.rendezVousHashValue = computeRendezVousHashValue(domain, partitionId, hostAndIndexInRing.getIndexInRing());
}
origin: LiveRamp/hank

 protected Host getHostResponsibleForPartition(List<HostAndIndexInRing> validHostsSorted, int partitionNumber) {
  int hostIndex = partitionNumber % validHostsSorted.size();
  return validHostsSorted.get(hostIndex).getHost();
 }
}
com.liveramp.hank.partition_assignerAbstractMappingPartitionAssigner$HostAndIndexInRing

Most used methods

  • <init>
  • getHost
  • getIndexInRing

Popular in Java

  • Finding current android device location
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • GridBagLayout (java.awt)
    The GridBagLayout class is a flexible layout manager that aligns components vertically and horizonta
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • ConnectException (java.net)
    A ConnectException is thrown if a connection cannot be established to a remote host on a specific po
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • PhpStorm for WordPress
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now