public class ContainerManager extends Object
Constructor and Description |
---|
ContainerManager(ZKDatabase zkDb,
RequestProcessor requestProcessor,
int checkIntervalMs,
int maxPerMinute) |
Modifier and Type | Method and Description |
---|---|
void |
checkContainers()
Manually check the containers.
|
protected Collection<String> |
getCandidates() |
protected long |
getElapsed(DataNode node) |
protected long |
getMinIntervalMs() |
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 void start()
public void stop()
public void checkContainers() throws InterruptedException
InterruptedException
protected long getMinIntervalMs()
protected Collection<String> getCandidates()
protected long getElapsed(DataNode node)
Copyright © 2008–2019 The Apache Software Foundation. All rights reserved.