Search in sources :

Example 1 with Executor

use of org.apache.storm.executor.Executor in project storm by apache.

the class Worker method doHeartBeat.

public void doHeartBeat() throws IOException {
    LocalState state = ConfigUtils.workerState(workerState.conf, workerState.workerId);
    state.setWorkerHeartBeat(new LSWorkerHeartbeat(Time.currentTimeSecs(), workerState.topologyId, workerState.executors.stream().map(executor -> new ExecutorInfo(executor.get(0).intValue(), executor.get(1).intValue())).collect(Collectors.toList()), workerState.port));
    // this is just in case supervisor is down so that disk doesn't fill up.
    state.cleanup(60);
// it shouldn't take supervisor 120 seconds between listing dir and reading it
}
Also used : LSWorkerHeartbeat(org.apache.storm.generated.LSWorkerHeartbeat) IRunningExecutor(org.apache.storm.executor.IRunningExecutor) LoggerFactory(org.slf4j.LoggerFactory) AuthUtils(org.apache.storm.security.auth.AuthUtils) DaemonType(org.apache.storm.cluster.DaemonType) Map(java.util.Map) LSWorkerHeartbeat(org.apache.storm.generated.LSWorkerHeartbeat) Executor(org.apache.storm.executor.Executor) IStateStorage(org.apache.storm.cluster.IStateStorage) Collection(java.util.Collection) ExecutorShutdown(org.apache.storm.executor.ExecutorShutdown) WorkerBackpressureCallback(org.apache.storm.utils.WorkerBackpressureCallback) LogConfig(org.apache.storm.generated.LogConfig) PrivilegedExceptionAction(java.security.PrivilegedExceptionAction) Collectors(java.util.stream.Collectors) ObjectUtils(org.apache.commons.lang.ObjectUtils) Credentials(org.apache.storm.generated.Credentials) Time(org.apache.storm.utils.Time) List(java.util.List) ConfigUtils(org.apache.storm.utils.ConfigUtils) SysOutOverSLF4J(uk.org.lidalia.sysoutslf4j.context.SysOutOverSLF4J) IContext(org.apache.storm.messaging.IContext) Config(org.apache.storm.Config) Shutdownable(org.apache.storm.daemon.Shutdownable) StormCommon(org.apache.storm.daemon.StormCommon) ClusterUtils(org.apache.storm.cluster.ClusterUtils) DisruptorBackpressureCallback(org.apache.storm.utils.DisruptorBackpressureCallback) LocalExecutor(org.apache.storm.executor.LocalExecutor) HashMap(java.util.HashMap) ACL(org.apache.zookeeper.data.ACL) AtomicReference(java.util.concurrent.atomic.AtomicReference) Function(java.util.function.Function) ArrayList(java.util.ArrayList) IAutoCredentials(org.apache.storm.security.auth.IAutoCredentials) Charset(java.nio.charset.Charset) ExecutorInfo(org.apache.storm.generated.ExecutorInfo) WorkerBackpressureThread(org.apache.storm.utils.WorkerBackpressureThread) DaemonCommon(org.apache.storm.daemon.DaemonCommon) EventHandler(com.lmax.disruptor.EventHandler) ClusterStateContext(org.apache.storm.cluster.ClusterStateContext) LocalState(org.apache.storm.utils.LocalState) Logger(org.slf4j.Logger) ExecutorStats(org.apache.storm.generated.ExecutorStats) IConnection(org.apache.storm.messaging.IConnection) IOException(java.io.IOException) FileUtils(org.apache.commons.io.FileUtils) TaskMessage(org.apache.storm.messaging.TaskMessage) IStormClusterState(org.apache.storm.cluster.IStormClusterState) Utils(org.apache.storm.utils.Utils) File(java.io.File) Subject(javax.security.auth.Subject) Preconditions(com.google.common.base.Preconditions) StatsUtil(org.apache.storm.stats.StatsUtil) ExecutorInfo(org.apache.storm.generated.ExecutorInfo) LocalState(org.apache.storm.utils.LocalState)

Aggregations

Preconditions (com.google.common.base.Preconditions)1 EventHandler (com.lmax.disruptor.EventHandler)1 File (java.io.File)1 IOException (java.io.IOException)1 Charset (java.nio.charset.Charset)1 PrivilegedExceptionAction (java.security.PrivilegedExceptionAction)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 HashMap (java.util.HashMap)1 List (java.util.List)1 Map (java.util.Map)1 AtomicReference (java.util.concurrent.atomic.AtomicReference)1 Function (java.util.function.Function)1 Collectors (java.util.stream.Collectors)1 Subject (javax.security.auth.Subject)1 FileUtils (org.apache.commons.io.FileUtils)1 ObjectUtils (org.apache.commons.lang.ObjectUtils)1 Config (org.apache.storm.Config)1 ClusterStateContext (org.apache.storm.cluster.ClusterStateContext)1 ClusterUtils (org.apache.storm.cluster.ClusterUtils)1