public class ContainerManager extends Object
Constructor and Description |
---|
ContainerManager(ZKDatabase zkDb,
RequestProcessor requestProcessor,
int checkIntervalMs,
int maxPerMinute) |
ContainerManager(ZKDatabase zkDb,
RequestProcessor requestProcessor,
int checkIntervalMs,
int maxPerMinute,
long maxNeverUsedIntervalMs) |
Modifier and Type | Method and Description |
---|---|
void |
checkContainers()
Manually check the containers.
|
protected Collection<String> |
getCandidates() |
protected long |
getElapsed(DataNode node) |
protected long |
getMinIntervalMs() |
protected void |
postDeleteRequest(Request request) |
void |
start()
start/restart the timer the runs the check.
|
void |
stop()
stop the timer if necessary.
|
public ContainerManager(ZKDatabase zkDb, RequestProcessor requestProcessor, int checkIntervalMs, int maxPerMinute)
zkDb
- the ZK databaserequestProcessor
- request processer - used to inject delete
container requestscheckIntervalMs
- how often to check containers in millisecondsmaxPerMinute
- the max containers to delete per second - avoids
herding of container deletionspublic ContainerManager(ZKDatabase zkDb, RequestProcessor requestProcessor, int checkIntervalMs, int maxPerMinute, long maxNeverUsedIntervalMs)
zkDb
- the ZK databaserequestProcessor
- request processer - used to inject delete
container requestscheckIntervalMs
- how often to check containers in millisecondsmaxPerMinute
- the max containers to delete per second - avoids
herding of container deletionsmaxNeverUsedIntervalMs
- the max time in milliseconds that a container that has never had
any children is retainedpublic void start()
public void stop()
public void checkContainers() throws InterruptedException
InterruptedException
protected void postDeleteRequest(Request request) throws RequestProcessor.RequestProcessorException
protected long getMinIntervalMs()
protected Collection<String> getCandidates()
protected long getElapsed(DataNode node)
Copyright © 2008–2023 The Apache Software Foundation. All rights reserved.