Package org.apache.storm.utils
Class LocalState
java.lang.Object
org.apache.storm.utils.LocalState
A simple, durable, atomic K/V database. *Very inefficient*, should only be used for occasional reads/writes. Every read/write hits disk.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTopologyHistory
(LSTopoHistory lsTopoHistory) void
cleanup
(int keepVersions) void
filterOldTopologies
(long cutOffAge) Remove topologies from local state which are older than cutOffAge.org.apache.storm.thrift.TBase
void
void
void
void
void
setApprovedWorkers
(Map<String, Integer> approvedWorkers) void
setLocalAssignmentsMap
(Map<Integer, LocalAssignment> localAssignmentMap) void
setSupervisorId
(String supervisorId) void
setWorkerHeartBeat
(LSWorkerHeartbeat workerHeartBeat) snapshot()
-
Field Details
-
LOG
public static final org.slf4j.Logger LOG -
LS_WORKER_HEARTBEAT
- See Also:
-
LS_ID
- See Also:
-
LS_LOCAL_ASSIGNMENTS
- See Also:
-
LS_APPROVED_WORKERS
- See Also:
-
LS_TOPO_HISTORY
- See Also:
-
-
Constructor Details
-
LocalState
- Throws:
IOException
-
-
Method Details
-
snapshot
-
get
-
put
-
put
-
remove
-
remove
-
cleanup
- Throws:
IOException
-
getTopoHistoryList
-
filterOldTopologies
public void filterOldTopologies(long cutOffAge) Remove topologies from local state which are older than cutOffAge. -
addTopologyHistory
-
getSupervisorId
-
setSupervisorId
-
getApprovedWorkers
-
setApprovedWorkers
-
getWorkerHeartBeat
-
setWorkerHeartBeat
-
getLocalAssignmentsMap
-
setLocalAssignmentsMap
-