diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java index d96849e3c3..355fd7c987 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java @@ -175,7 +175,7 @@ public static long getContainerIDFromFile(File containerFile) { * Verifies that this is indeed a new container. * * @param containerFile - Container File to verify - * @throws IOException + * @throws FileAlreadyExistsException */ public static void verifyIsNewContainer(File containerFile) throws FileAlreadyExistsException { diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java index 7f4f147fe3..3c09f02eb0 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java @@ -117,7 +117,7 @@ public int containerCount() { /** * Return an container Iterator over {@link ContainerSet#containerMap}. - * @return Iterator + * @return {@literal Iterator} */ public Iterator getContainerIterator() { return containerMap.values().iterator(); @@ -141,13 +141,13 @@ public Map getContainerMap() { /** * A simple interface for container Iterations. - *

+ *

* This call make no guarantees about consistency of the data between * different list calls. It just returns the best known data at that point of * time. It is possible that using this iteration you can miss certain * container from the listing. * - * @param startContainerId - Return containers with Id >= startContainerId. + * @param startContainerId - Return containers with Id >= startContainerId. * @param count - how many to return * @param data - Actual containerData * @throws StorageContainerException diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/interfaces/Container.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/interfaces/Container.java index 2bda74707d..405cac3885 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/interfaces/Container.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/interfaces/Container.java @@ -69,7 +69,6 @@ void update(Map metaData, boolean forceUpdate) * Get metadata about the container. * * @return ContainerData - Container Data. - * @throws StorageContainerException */ CONTAINERDATA getContainerData(); @@ -77,7 +76,6 @@ void update(Map metaData, boolean forceUpdate) * Get the Container Lifecycle state. * * @return ContainerLifeCycleState - Container State. - * @throws StorageContainerException */ ContainerProtos.ContainerDataProto.State getContainerState(); diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java index 953f73035a..195e51b9c5 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java @@ -184,7 +184,7 @@ public void putBackReports(List reportsToPutBack) { * Returns all the available reports from the report queue, or empty list if * the queue is empty. * - * @return List + * @return List of reports */ public List getAllAvailableReports() { return getReports(Integer.MAX_VALUE); @@ -194,7 +194,7 @@ public List getAllAvailableReports() { * Returns available reports from the report queue with a max limit on * list size, or empty list if the queue is empty. * - * @return List + * @return List of reports */ public List getReports(int maxLimit) { List reportsToReturn = new LinkedList<>(); @@ -236,7 +236,7 @@ public void addContainerActionIfAbsent(ContainerAction containerAction) { * Returns all the pending ContainerActions from the ContainerAction queue, * or empty list if the queue is empty. * - * @return List + * @return {@literal List} */ public List getAllPendingContainerActions() { return getPendingContainerAction(Integer.MAX_VALUE); @@ -246,7 +246,7 @@ public List getAllPendingContainerActions() { * Returns pending ContainerActions from the ContainerAction queue with a * max limit on list size, or empty list if the queue is empty. * - * @return List + * @return {@literal List} */ public List getPendingContainerAction(int maxLimit) { List containerActionList = new ArrayList<>(); @@ -298,7 +298,7 @@ public void addPipelineActionIfAbsent(PipelineAction pipelineAction) { * Returns pending PipelineActions from the PipelineAction queue with a * max limit on list size, or empty list if the queue is empty. * - * @return List + * @return {@literal List} */ public List getPendingPipelineAction(int maxLimit) { List pipelineActionList = new ArrayList<>(); diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/DatanodeState.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/DatanodeState.java index 75142afd10..25be207dcd 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/DatanodeState.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/DatanodeState.java @@ -48,6 +48,9 @@ public interface DatanodeState { * * @param time - Time * @param timeUnit - Unit of time. + * @throws InterruptedException + * @throws ExecutionException + * @throws TimeoutException */ T await(long time, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException; diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java index 6b90146753..d08882606c 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java @@ -40,15 +40,17 @@ import java.util.UUID; /** - * HddsVolume represents volume in a datanode. {@link VolumeSet} maitains a + * HddsVolume represents volume in a datanode. {@link VolumeSet} maintains a * list of HddsVolumes, one for each volume in the Datanode. * {@link VolumeInfo} in encompassed by this class. - * + *

* The disk layout per volume is as follows: - * ../hdds/VERSION - * ../hdds/<>/current/<>/<>/metadata - * ../hdds/<>/current/<>/<>/<> - * + *

../hdds/VERSION + *

{@literal ../hdds/<>/current/<>/<>/metadata} + *

{@literal ../hdds/<>/current/<>/<>/<>} + *

* Each hdds volume has its own VERSION file. The hdds volume will have one * scmUuid directory for each SCM it is a part of (currently only one SCM is * supported). @@ -377,14 +379,14 @@ public void shutdown() { /** * VolumeState represents the different states a HddsVolume can be in. - * NORMAL => Volume can be used for storage - * FAILED => Volume has failed due and can no longer be used for + * NORMAL => Volume can be used for storage + * FAILED => Volume has failed due and can no longer be used for * storing containers. - * NON_EXISTENT => Volume Root dir does not exist - * INCONSISTENT => Volume Root dir is not empty but VERSION file is + * NON_EXISTENT => Volume Root dir does not exist + * INCONSISTENT => Volume Root dir is not empty but VERSION file is * missing or Volume Root dir is not a directory - * NOT_FORMATTED => Volume Root exists but not formatted (no VERSION file) - * NOT_INITIALIZED => VERSION file exists but has not been verified for + * NOT_FORMATTED => Volume Root exists but not formatted(no VERSION file) + * NOT_INITIALIZED => VERSION file exists but has not been verified for * correctness. */ public enum VolumeState { diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java index dc44dc5371..2ee82cb8fe 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java @@ -235,7 +235,7 @@ private static void verifyChecksum(ChunkInfo chunkInfo, ByteBuffer data, * * @param chunkFile - chunkFile to write data into. * @param info - chunk info. - * @return true if the chunkFile exists and chunkOffset < chunkFile length, + * @return true if the chunkFile exists and chunkOffset < chunkFile length, * false otherwise. */ public static boolean validateChunkForOverwrite(File chunkFile, diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java index 4f2b3a2a91..bad57b5807 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java @@ -96,9 +96,9 @@ public static void createContainerMetaData(File containerMetaDataPath, File /** * remove Container if it is empty. - *

+ *

* There are three things we need to delete. - *

+ *

* 1. Container file and metadata file. 2. The Level DB file 3. The path that * we created on the data location. * 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 aee5775b7e..43f78ed4eb 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 @@ -51,21 +51,24 @@ * * Layout of the container directory on disk is as follows: * - * ../hdds/VERSION - * ../hdds/<>/current/<>/</metadata/<>.container - * ../hdds/<>/current/<>/</<> - * + *

../hdds/VERSION + *

{@literal ../hdds/<>/current/<>/</metadata/<>.container} + *

{@literal ../hdds/<>/current/<>/</<>} + *

* Some ContainerTypes will have extra metadata other than the .container * file. For example, KeyValueContainer will have a .db file. This .db file * will also be stored in the metadata folder along with the .container file. - * - * ../hdds/<>/current/<>/</metadata/<>.db - * - * Note that the <> is dependent on the ContainerType. + *

+ * {@literal ../hdds/<>/current/<>/</metadata/<>.db} + *

+ * Note that the {@literal <>} is dependent on the ContainerType. * For KeyValueContainers, the data is stored in a "chunks" folder. As such, - * the <> layout for KeyValueContainers is - * - * ../hdds/<>/current/<>/</chunks/<> + * the {@literal <>} layout for KeyValueContainers is: + *

{@literal ../hdds/<>/current/<>/</chunks/<>} * */ public class ContainerReader implements Runnable { diff --git a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java index a89b50a704..80ce13d19b 100644 --- a/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java +++ b/hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java @@ -170,7 +170,6 @@ public ContainerSet getContainerSet() { /** * Returns container report. * @return - container report. - * @throws IOException */ public PipelineReportsProto getPipelineReport() {