Codota Logo
ClusterUtils.convertExecutorBeats
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
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
  • putExtra (Intent)
  • setContentView (Activity)
  • getContentResolver (Context)
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ImageIO (javax.imageio)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now