Github user knusbaum commented on a diff in the pull request: https://github.com/apache/storm/pull/1642#discussion_r76169008 --- Diff: storm-core/src/jvm/org/apache/storm/daemon/supervisor/Supervisor.java --- @@ -17,135 +17,541 @@ */ package org.apache.storm.daemon.supervisor; +import java.io.File; +import java.io.IOException; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Map.Entry; +import java.util.Set; +import java.util.concurrent.Callable; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicInteger; +import java.util.concurrent.atomic.AtomicReference; + import org.apache.commons.io.FileUtils; import org.apache.storm.Config; import org.apache.storm.StormTimer; -import org.apache.storm.daemon.supervisor.timer.RunProfilerActions; +import org.apache.storm.cluster.ClusterStateContext; +import org.apache.storm.cluster.ClusterUtils; +import org.apache.storm.cluster.DaemonType; +import org.apache.storm.cluster.IStateStorage; +import org.apache.storm.cluster.IStormClusterState; +import org.apache.storm.daemon.DaemonCommon; +import org.apache.storm.daemon.supervisor.Slot.MachineState; +import org.apache.storm.daemon.supervisor.Slot.TopoProfileAction; import org.apache.storm.daemon.supervisor.timer.SupervisorHealthCheck; import org.apache.storm.daemon.supervisor.timer.SupervisorHeartbeat; import org.apache.storm.daemon.supervisor.timer.UpdateBlobs; +import org.apache.storm.event.EventManager; import org.apache.storm.event.EventManagerImp; +import org.apache.storm.generated.Assignment; +import org.apache.storm.generated.ExecutorInfo; +import org.apache.storm.generated.LocalAssignment; +import org.apache.storm.generated.NodeInfo; +import org.apache.storm.generated.ProfileRequest; +import org.apache.storm.generated.WorkerResources; +import org.apache.storm.localizer.AsyncLocalizer; +import org.apache.storm.localizer.ILocalizer; import org.apache.storm.localizer.Localizer; import org.apache.storm.messaging.IContext; import org.apache.storm.metric.StormMetricsRegistry; import org.apache.storm.scheduler.ISupervisor; import org.apache.storm.utils.ConfigUtils; +import org.apache.storm.utils.LocalState; +import org.apache.storm.utils.Time; import org.apache.storm.utils.Utils; import org.apache.storm.utils.VersionInfo; +import org.apache.zookeeper.data.ACL; +import org.eclipse.jetty.util.ConcurrentHashSet; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import java.io.File; -import java.io.InterruptedIOException; -import java.util.Collection; -import java.util.Map; -import java.util.Set; -import java.util.concurrent.Callable; +public class Supervisor implements DaemonCommon, AutoCloseable { + + public class ReadStateThread implements Runnable, AutoCloseable { --- End diff -- This is big enough that I wonder if it should be its own class. I don't see that it's taking advantage of the special access inner classes have to any extent, and we already have a supervisor package it could comfortably live in.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---