diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java index d704bb7b5b..08a8f5d47f 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java @@ -225,7 +225,8 @@ public void verifyContainerData(ContainerData containerData) } } - private void initializeUsedBytes(KeyValueContainer container) throws IOException { + private void initializeUsedBytes(KeyValueContainer container) + throws IOException { KeyValueBlockIterator blockIter = new KeyValueBlockIterator( container.getContainerData().getContainerID(), new File(container.getContainerData().getContainerPath())); diff --git a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java index 198885d0e6..7cdb692597 100644 --- a/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java +++ b/hadoop-hdds/container-service/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java @@ -70,7 +70,7 @@ public class TestOzoneContainer { private KeyValueContainer keyValueContainer; private final DatanodeDetails datanodeDetails = createDatanodeDetails(); private HashMap commitSpaceMap; //RootDir -> committed space - private final int NUM_TEST_CONTAINERS = 10; + private final int numTestContainers = 10; @Before public void setUp() throws Exception { @@ -94,7 +94,7 @@ public void testBuildContainerMap() throws Exception { } // Add containers to disk - for (int i=0; i < NUM_TEST_CONTAINERS; i++) { + for (int i = 0; i < numTestContainers; i++) { long freeBytes = 0; long volCommitBytes; long maxCap = (long) StorageUnit.GB.toBytes(1); @@ -130,7 +130,7 @@ public void testBuildContainerMap() throws Exception { OzoneContainer(datanodeDetails, conf, context, null); ContainerSet containerset = ozoneContainer.getContainerSet(); - assertEquals(NUM_TEST_CONTAINERS, containerset.containerCount()); + assertEquals(numTestContainers, containerset.containerCount()); verifyCommittedSpace(ozoneContainer); }