Class LocalState


  • public class LocalState
    extends Object
    A simple, durable, atomic K/V database. *Very inefficient*, should only be used for occasional reads/writes. Every read/write hits disk.
    • Method Detail

      • snapshot

        public Map<String,​org.apache.storm.thrift.TBase> snapshot()
      • get

        public org.apache.storm.thrift.TBase get​(String key)
      • put

        public void put​(String key,
                        org.apache.storm.thrift.TBase val)
      • put

        public void put​(String key,
                        org.apache.storm.thrift.TBase val,
                        boolean cleanup)
      • remove

        public void remove​(String key)
      • remove

        public void remove​(String key,
                           boolean cleanup)
      • filterOldTopologies

        public void filterOldTopologies​(long cutOffAge)
        Remove topologies from local state which are older than cutOffAge.
      • addTopologyHistory

        public void addTopologyHistory​(LSTopoHistory lsTopoHistory)
      • getSupervisorId

        public String getSupervisorId()
      • setSupervisorId

        public void setSupervisorId​(String supervisorId)
      • setApprovedWorkers

        public void setApprovedWorkers​(Map<String,​Integer> approvedWorkers)
      • setWorkerHeartBeat

        public void setWorkerHeartBeat​(LSWorkerHeartbeat workerHeartBeat)