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 SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddTopologyHistory(LSTopoHistory lsTopoHistory) voidcleanup(int keepVersions) voidfilterOldTopologies(long cutOffAge) Remove topologies from local state which are older than cutOffAge.org.apache.storm.thrift.TBasevoidvoidvoidvoidvoidsetApprovedWorkers(Map<String, Integer> approvedWorkers) voidsetLocalAssignmentsMap(Map<Integer, LocalAssignment> localAssignmentMap) voidsetSupervisorId(String supervisorId) voidsetWorkerHeartBeat(LSWorkerHeartbeat workerHeartBeat) snapshot()
- 
Field Details- 
LOGpublic 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
- 
filterOldTopologiespublic void filterOldTopologies(long cutOffAge) Remove topologies from local state which are older than cutOffAge.
- 
addTopologyHistory
- 
getSupervisorId
- 
setSupervisorId
- 
getApprovedWorkers
- 
setApprovedWorkers
- 
getWorkerHeartBeat
- 
setWorkerHeartBeat
- 
getLocalAssignmentsMap
- 
setLocalAssignmentsMap
 
-