HDFS-12382. Ozone: SCM: BlockManager creates a new container for each allocateBlock call. Contributed by Nandakumar.
This commit is contained in:
parent
91a8f134b7
commit
1a21136322
@ -316,7 +316,7 @@ private void updateContainer(OzoneProtos.LifeCycleState oldState, String name,
|
|||||||
// should be enough for now.
|
// should be enough for now.
|
||||||
private void refreshContainers() {
|
private void refreshContainers() {
|
||||||
Map<String, BlockContainerInfo> containersByState =
|
Map<String, BlockContainerInfo> containersByState =
|
||||||
this.containers.get(OzoneProtos.LifeCycleState.ALLOCATED);
|
this.containers.get(OzoneProtos.LifeCycleState.CREATING);
|
||||||
for (String containerName: containersByState.keySet()) {
|
for (String containerName: containersByState.keySet()) {
|
||||||
try {
|
try {
|
||||||
ContainerInfo containerInfo =
|
ContainerInfo containerInfo =
|
||||||
@ -329,7 +329,7 @@ private void refreshContainers() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (containerInfo.getState() == OzoneProtos.LifeCycleState.OPEN) {
|
if (containerInfo.getState() == OzoneProtos.LifeCycleState.OPEN) {
|
||||||
updateContainer(OzoneProtos.LifeCycleState.ALLOCATED, containerName,
|
updateContainer(OzoneProtos.LifeCycleState.CREATING, containerName,
|
||||||
containerInfo.getState());
|
containerInfo.getState());
|
||||||
}
|
}
|
||||||
// TODO: check containers in other state and refresh as needed.
|
// TODO: check containers in other state and refresh as needed.
|
||||||
|
Loading…
Reference in New Issue
Block a user