congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ClusterUtils.convertExecutorBeats
Code IndexAdd Tabnine to your IDE (free)

How to use
convertExecutorBeats
method
in
org.apache.storm.cluster.ClusterUtils

Best Java code snippets using org.apache.storm.cluster.ClusterUtils.convertExecutorBeats (Showing top 2 results out of 315)

origin: apache/storm

/**
 * need to take executor->node+port in explicitly so that we don't run into a situation where a long dead worker with a skewed clock
 * overrides all the timestamps. By only checking heartbeats with an assigned node+port, and only reading executors from that heartbeat
 * that are actually assigned, we avoid situations like that.
 *
 * @param stormId          topology id
 * @param executorNodePort executor id -> node + port
 * @return mapping of executorInfo -> executor beat
 */
@Override
public Map<ExecutorInfo, ExecutorBeat> executorBeats(String stormId, Map<List<Long>, NodeInfo> executorNodePort) {
  Map<ExecutorInfo, ExecutorBeat> executorWhbs = new HashMap<>();
  Map<NodeInfo, List<List<Long>>> nodePortExecutors = Utils.reverseMap(executorNodePort);
  for (Map.Entry<NodeInfo, List<List<Long>>> entry : nodePortExecutors.entrySet()) {
    String node = entry.getKey().get_node();
    Long port = entry.getKey().get_port_iterator().next();
    ClusterWorkerHeartbeat whb = getWorkerHeartbeat(stormId, node, port);
    List<ExecutorInfo> executorInfoList = new ArrayList<>();
    for (List<Long> list : entry.getValue()) {
      executorInfoList.add(new ExecutorInfo(list.get(0).intValue(), list.get(list.size() - 1).intValue()));
    }
    if (whb != null) {
      executorWhbs.putAll(ClusterUtils.convertExecutorBeats(executorInfoList, whb));
    }
  }
  return executorWhbs;
}
origin: org.apache.storm/storm-core

/**
 * need to take executor->node+port in explicitly so that we don't run into a situation where a long dead worker with a skewed clock overrides all the
 * timestamps. By only checking heartbeats with an assigned node+port, and only reading executors from that heartbeat that are actually assigned, we avoid
 * situations like that
 * 
 * @param stormId
 * @param executorNodePort
 * @return
 */
@Override
public Map<ExecutorInfo, ExecutorBeat> executorBeats(String stormId, Map<List<Long>, NodeInfo> executorNodePort) {
  Map<ExecutorInfo, ExecutorBeat> executorWhbs = new HashMap<>();
  Map<NodeInfo, List<List<Long>>> nodePortExecutors = Utils.reverseMap(executorNodePort);
  for (Map.Entry<NodeInfo, List<List<Long>>> entry : nodePortExecutors.entrySet()) {
    String node = entry.getKey().get_node();
    Long port = entry.getKey().get_port_iterator().next();
    ClusterWorkerHeartbeat whb = getWorkerHeartbeat(stormId, node, port);
    List<ExecutorInfo> executorInfoList = new ArrayList<>();
    for (List<Long> list : entry.getValue()) {
      executorInfoList.add(new ExecutorInfo(list.get(0).intValue(), list.get(list.size() - 1).intValue()));
    }
    if (whb != null)
      executorWhbs.putAll(ClusterUtils.convertExecutorBeats(executorInfoList, whb));
  }
  return executorWhbs;
}
org.apache.storm.clusterClusterUtilsconvertExecutorBeats

Javadoc

Ensures that we only return heartbeats for executors assigned to this worker

Popular methods of ClusterUtils

  • mkStormClusterState
  • errorStormRoot
  • assignmentPath
  • backpressurePath
  • backpressureStormRoot
  • blobstoreMaxKeySequenceNumberPath
  • blobstorePath
  • credentialsPath
  • errorPath
  • lastErrorPath
  • logConfigPath
  • maybeDeserialize
  • logConfigPath,
  • maybeDeserialize,
  • mkStateStorage,
  • mkStateStorageImpl,
  • mkStormClusterStateImpl,
  • mkTopoAcls,
  • mkTopoReadOnlyAcls,
  • mkTopoReadWriteAcls,
  • nimbusPath

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • Menu (java.awt)
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JList (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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