浏览代码

HDDS-841. [JDK11] Fix Javadoc errors in hadoop-hdds-container-service module. Contributed by Dinesh Chitlangia.

Márton Elek 6 年之前
父节点
当前提交
ff2484906c

+ 1 - 1
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/helpers/ContainerUtils.java

@@ -175,7 +175,7 @@ public final class ContainerUtils {
    * 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 {

+ 3 - 3
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/impl/ContainerSet.java

@@ -117,7 +117,7 @@ public class ContainerSet {
 
   /**
    * Return an container Iterator over {@link ContainerSet#containerMap}.
-   * @return Iterator<Container>
+   * @return {@literal Iterator<Container>}
    */
   public Iterator<Container> getContainerIterator() {
     return containerMap.values().iterator();
@@ -141,13 +141,13 @@ public class ContainerSet {
 
   /**
    * A simple interface for container Iterations.
-   * <p/>
+   * <p>
    * 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 &gt;= startContainerId.
    * @param count - how many to return
    * @param data - Actual containerData
    * @throws StorageContainerException

+ 0 - 2
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/interfaces/Container.java

@@ -69,7 +69,6 @@ public interface Container<CONTAINERDATA extends ContainerData> extends RwLock {
    * Get metadata about the container.
    *
    * @return ContainerData - Container Data.
-   * @throws StorageContainerException
    */
   CONTAINERDATA getContainerData();
 
@@ -77,7 +76,6 @@ public interface Container<CONTAINERDATA extends ContainerData> extends RwLock {
    * Get the Container Lifecycle state.
    *
    * @return ContainerLifeCycleState - Container State.
-   * @throws StorageContainerException
    */
   ContainerProtos.ContainerDataProto.State getContainerState();
 

+ 5 - 5
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/statemachine/StateContext.java

@@ -184,7 +184,7 @@ public class StateContext {
    * Returns all the available reports from the report queue, or empty list if
    * the queue is empty.
    *
-   * @return List<reports>
+   * @return List of reports
    */
   public List<GeneratedMessage> getAllAvailableReports() {
     return getReports(Integer.MAX_VALUE);
@@ -194,7 +194,7 @@ public class StateContext {
    * Returns available reports from the report queue with a max limit on
    * list size, or empty list if the queue is empty.
    *
-   * @return List<reports>
+   * @return List of reports
    */
   public List<GeneratedMessage> getReports(int maxLimit) {
     List<GeneratedMessage> reportsToReturn = new LinkedList<>();
@@ -236,7 +236,7 @@ public class StateContext {
    * Returns all the pending ContainerActions from the ContainerAction queue,
    * or empty list if the queue is empty.
    *
-   * @return List<ContainerAction>
+   * @return {@literal List<ContainerAction>}
    */
   public List<ContainerAction> getAllPendingContainerActions() {
     return getPendingContainerAction(Integer.MAX_VALUE);
@@ -246,7 +246,7 @@ public class StateContext {
    * Returns pending ContainerActions from the ContainerAction queue with a
    * max limit on list size, or empty list if the queue is empty.
    *
-   * @return List<ContainerAction>
+   * @return {@literal List<ContainerAction>}
    */
   public List<ContainerAction> getPendingContainerAction(int maxLimit) {
     List<ContainerAction> containerActionList = new ArrayList<>();
@@ -298,7 +298,7 @@ public class StateContext {
    * Returns pending PipelineActions from the PipelineAction queue with a
    * max limit on list size, or empty list if the queue is empty.
    *
-   * @return List<ContainerAction>
+   * @return {@literal List<ContainerAction>}
    */
   public List<PipelineAction> getPendingPipelineAction(int maxLimit) {
     List<PipelineAction> pipelineActionList = new ArrayList<>();

+ 3 - 0
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/states/DatanodeState.java

@@ -48,6 +48,9 @@ public interface DatanodeState<T> {
    *
    * @param time - Time
    * @param timeUnit - Unit of time.
+   * @throws InterruptedException
+   * @throws ExecutionException
+   * @throws TimeoutException
    */
   T await(long time, TimeUnit timeUnit)
       throws InterruptedException, ExecutionException, TimeoutException;

+ 14 - 12
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/volume/HddsVolume.java

@@ -40,15 +40,17 @@ import java.util.Properties;
 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.
- *
+ * <p>
  * The disk layout per volume is as follows:
- * ../hdds/VERSION
- * ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID>>/metadata
- * ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID>>/<<dataDir>>
- *
+ * <p>../hdds/VERSION
+ * <p>{@literal ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID
+ * >>/metadata}
+ * <p>{@literal ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID
+ * >>/<<dataDir>>}
+ * <p>
  * 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 final class HddsVolume {
 
   /**
    * 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          =&gt; Volume can be used for storage
+   * FAILED          =&gt; 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    =&gt; Volume Root dir does not exist
+   * INCONSISTENT    =&gt; 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   =&gt; Volume Root exists but not formatted(no VERSION file)
+   * NOT_INITIALIZED =&gt; VERSION file exists but has not been verified for
    *                    correctness.
    */
   public enum VolumeState {

+ 1 - 1
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/ChunkUtils.java

@@ -235,7 +235,7 @@ public final class ChunkUtils {
    *
    * @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 &lt; chunkFile length,
    *         false otherwise.
    */
   public static boolean validateChunkForOverwrite(File chunkFile,

+ 2 - 2
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/keyvalue/helpers/KeyValueContainerUtil.java

@@ -96,9 +96,9 @@ public final class KeyValueContainerUtil {
 
   /**
    * remove Container if it is empty.
-   * <p/>
+   * <p>
    * There are three things we need to delete.
-   * <p/>
+   * <p>
    * 1. Container file and metadata file. 2. The Level DB file 3. The path that
    * we created on the data location.
    *

+ 14 - 11
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/ContainerReader.java

@@ -51,21 +51,24 @@ import java.io.IOException;
  *
  * Layout of the container directory on disk is as follows:
  *
- * ../hdds/VERSION
- * ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID>/metadata/<<containerID>>.container
- * ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID>/<<dataPath>>
- *
+ * <p>../hdds/VERSION
+ * <p>{@literal ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID
+ * >/metadata/<<containerID>>.container}
+ * <p>{@literal ../hdds/<<scmUuid>>/current/<<containerDir>>/<<containerID
+ * >/<<dataPath>>}
+ * <p>
  * 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/<<scmUuid>>/current/<<containerDir>>/<<KVcontainerID>/metadata/<<KVcontainerID>>.db
- *
- * Note that the <<dataPath>> is dependent on the ContainerType.
+ * <p>
+ * {@literal ../hdds/<<scmUuid>>/current/<<containerDir>>/<<KVcontainerID
+ * >/metadata/<<KVcontainerID>>.db}
+ * <p>
+ * Note that the {@literal <<dataPath>>} is dependent on the ContainerType.
  * For KeyValueContainers, the data is stored in a "chunks" folder. As such,
- * the <<dataPath>> layout for KeyValueContainers is
- *
- * ../hdds/<<scmUuid>>/current/<<containerDir>>/<<KVcontainerID>/chunks/<<chunksFile>>
+ * the {@literal <<dataPath>>} layout for KeyValueContainers is:
+ * <p>{@literal ../hdds/<<scmUuid>>/current/<<containerDir>>/<<KVcontainerID
+ * >/chunks/<<chunksFile>>}
  *
  */
 public class ContainerReader implements Runnable {

+ 0 - 1
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/ozoneimpl/OzoneContainer.java

@@ -170,7 +170,6 @@ public class OzoneContainer {
   /**
    * Returns container report.
    * @return - container report.
-   * @throws IOException
    */
 
   public PipelineReportsProto getPipelineReport() {