Codota Logo
org.apache.storm.cluster
Code IndexAdd Codota to your IDE (free)

How to use org.apache.storm.cluster

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

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
LocalDateTime l =
  • Codota Iconnew LocalDateTime()
  • Codota IconLocalDateTime.now()
  • Codota IconDateTimeFormatter formatter;String text;formatter.parseLocalDateTime(text)
  • Smart code suggestions by Codota
}
origin: apache/storm

@Override
public ErrorInfo lastError(String stormId, String componentId) {
  String path = ClusterUtils.lastErrorPath(stormId, componentId);
  if (stateStorage.node_exists(path, false)) {
    ErrorInfo errorInfo = ClusterUtils.maybeDeserialize(stateStorage.get_data(path, false), ErrorInfo.class);
    return errorInfo;
  }
  return null;
}
origin: apache/storm

@Override
public void setupErrors(String stormId, Map<String, Object> topoConf) {
  stateStorage.mkdirs(ClusterUtils.ERRORS_SUBTREE, defaultAcls);
  stateStorage.mkdirs(ClusterUtils.errorStormRoot(stormId), ClusterUtils.mkTopoReadWriteAcls(topoConf));
}
origin: apache/storm

@Override
public List<String> blobstoreInfo(String blobKey) {
  String path = ClusterUtils.blobstorePath(blobKey);
  stateStorage.sync_path(path);
  return stateStorage.get_children(path, false);
}
origin: apache/storm

@Override
public void removeStorm(String stormId) {
  stateStorage.delete_node(ClusterUtils.assignmentPath(stormId));
  this.assignmentsBackend.clearStateForStorm(stormId);
  stateStorage.delete_node(ClusterUtils.credentialsPath(stormId));
  stateStorage.delete_node(ClusterUtils.logConfigPath(stormId));
  stateStorage.delete_node(ClusterUtils.profilerConfigPath(stormId));
  removeStormBase(stormId);
}
origin: apache/storm

private static IStormClusterState makeStormClusterState(Map<String, Object> conf) throws Exception {
  return ClusterUtils.mkStormClusterState(conf, new ClusterStateContext(DaemonType.NIMBUS, conf));
}
origin: apache/storm

@Override
public void setupBackpressure(String stormId, Map<String, Object> topoConf) {
  stateStorage.mkdirs(ClusterUtils.BACKPRESSURE_SUBTREE, defaultAcls);
  stateStorage.mkdirs(ClusterUtils.backpressureStormRoot(stormId), ClusterUtils.mkTopoReadWriteAcls(topoConf));
}
origin: apache/storm

@Override
public void setupHeatbeats(String stormId, Map<String, Object> topoConf) {
  stateStorage.mkdirs(ClusterUtils.WORKERBEATS_SUBTREE, defaultAcls);
  stateStorage.mkdirs(ClusterUtils.workerbeatStormRoot(stormId), ClusterUtils.mkTopoReadWriteAcls(topoConf));
}
origin: apache/storm

@Override
public void removeWorkerBackpressure(String stormId, String node, Long port) {
  String path = ClusterUtils.backpressurePath(stormId, node, port);
  boolean existed = stateStorage.node_exists(path, false);
  if (existed) {
    stateStorage.delete_node(path);
  }
}
origin: apache/storm

@Override
public ClusterWorkerHeartbeat getWorkerHeartbeat(String stormId, String node, Long port) {
  byte[] bytes = stateStorage.get_worker_hb(ClusterUtils.workerbeatPath(stormId, node, port), false);
  return ClusterUtils.maybeDeserialize(bytes, ClusterWorkerHeartbeat.class);
}
origin: apache/storm

@Override
public SupervisorInfo supervisorInfo(String supervisorId) {
  String path = ClusterUtils.supervisorPath(supervisorId);
  return ClusterUtils.maybeDeserialize(stateStorage.get_data(path, false), SupervisorInfo.class);
}
origin: apache/storm

public IStormClusterState mkStormClusterStateImpl(Object stateStorage, ILocalAssignmentsBackend backend,
                         ClusterStateContext context) throws Exception {
  if (stateStorage instanceof IStateStorage) {
    return new StormClusterStateImpl((IStateStorage) stateStorage, backend, context, false);
  } else {
    IStateStorage Storage = _instance.mkStateStorageImpl((Map<String, Object>) stateStorage,
                               (Map<String, Object>) stateStorage, context);
    return new StormClusterStateImpl(Storage, backend, context, true);
  }
}
origin: apache/storm

@Override
public void removeWorkerHeartbeat(String stormId, String node, Long port) {
  String path = ClusterUtils.workerbeatPath(stormId, node, port);
  stateStorage.delete_worker_hb(path);
}
origin: apache/storm

@Override
public void removeStormBase(String stormId) {
  stateStorage.delete_node(ClusterUtils.stormPath(stormId));
}
origin: apache/storm

@Override
public void removeKeyVersion(String blobKey) {
  stateStorage.delete_node(ClusterUtils.blobstoreMaxKeySequenceNumberPath(blobKey));
}
origin: apache/storm

/**
 * Get all of the supervisors with the ID as the key.
 */
default Map<String, SupervisorInfo> allSupervisorInfo() {
  return allSupervisorInfo(null);
}
origin: apache/storm

/**
 * Get ZK ACLs for a topology to have read/write access.
 *
 * @param topoConf the topology config.
 * @return the ACLs.
 */
public static List<ACL> mkTopoReadWriteAcls(Map<String, Object> topoConf) {
  return mkTopoAcls(topoConf, ZooDefs.Perms.ALL);
}
origin: apache/storm

/**
 * Get the path to a specific secret key.
 *
 * @param type       the service the secret is for.
 * @param topologyId the topology the secret is for.
 * @param version    the version the secret is for.
 * @return the path to the secret.
 */
public static String secretKeysPath(WorkerTokenServiceType type, String topologyId, long version) {
  return secretKeysPath(type, topologyId) + ZK_SEPERATOR + version;
}
origin: apache/storm

  @Override
  public void delete_node_blobstore(String path, String nimbusHostPortInfo) {
    stateStorage.delete_node_blobstore(path, nimbusHostPortInfo);
  }
}
origin: apache/storm

/**
 * Decide if the assignments is synchronized.
 *
 * @return true if assignments have been synchronized from remote state store
 */
private boolean isAssignmentsRecovered() {
  return stormClusterState.isAssignmentsBackendSynchronized();
}
origin: apache/storm

  @Override
  public void close() throws Exception {
    ClusterUtils.resetInstance();
  }
}
org.apache.storm.cluster

Most used classes

  • ClusterStateContext
    This class is intended to provide runtime-context to StateStorageFactory implementors, giving inform
  • IStormClusterState
  • ClusterUtils
  • DaemonType
    The type of process/daemon that this server is running as. This is used with the IStormClusterState
  • IStateStorage
    StateStorage provides the API for the pluggable state store used by the Storm daemons. Data is store
  • StormClusterStateImpl,
  • PaceMakerStateStorage,
  • StateStorageFactory,
  • VersionedData,
  • ZKStateStorage$ZkWatcherCallBack,
  • ZKStateStorage,
  • ZKStateStorageFactory
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