kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wdberke...@apache.org
Subject [46/50] kudu git commit: [java] Fix javadoc issues
Date Wed, 28 Mar 2018 22:25:36 GMT
[java] Fix javadoc issues

Fixes some javadoc warnings:
- Removed @link and @see to external classes
- Remove invalid @inheritDoc tags
- Fixed code block
- Fixed a couple @return statment

This is far from all of the correctness issue, but the few
that were resulting in Javadoc Gradle errors.

Also disabled the super strict doc linter for Java 8+
in the gradle build to prevent a ton of warning output
and potnetial build failures. We could enable this at
somepoint after we correct the hundreds of warnings.

Change-Id: I5914b416e1b084a4f50dd8ea878be2f065acbe94
Reviewed-on: http://gerrit.cloudera.org:8080/9839
Tested-by: Grant Henke <granthenke@apache.org>
Reviewed-by: Adar Dembo <adar@cloudera.com>


Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/6a323db4
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/6a323db4
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/6a323db4

Branch: refs/heads/master
Commit: 6a323db4681ae350edbabbe130e35ccd338817dc
Parents: d364f01
Author: Grant Henke <granthenke@apache.org>
Authored: Wed Mar 28 10:04:31 2018 -0500
Committer: Grant Henke <granthenke@apache.org>
Committed: Wed Mar 28 17:21:50 2018 +0000

----------------------------------------------------------------------
 java/gradle/compile.gradle                                   | 8 ++++++++
 .../main/java/org/apache/kudu/client/AsyncKuduClient.java    | 8 ++++----
 .../src/main/java/org/apache/kudu/client/Bytes.java          | 3 +--
 .../src/main/java/org/apache/kudu/client/KuduException.java  | 2 +-
 .../java/org/apache/kudu/mapreduce/KuduTableInputFormat.java | 2 +-
 .../org/apache/kudu/mapreduce/KuduTableMapReduceUtil.java    | 6 ------
 6 files changed, 15 insertions(+), 14 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kudu/blob/6a323db4/java/gradle/compile.gradle
----------------------------------------------------------------------
diff --git a/java/gradle/compile.gradle b/java/gradle/compile.gradle
index 1e42acf..44d011c 100644
--- a/java/gradle/compile.gradle
+++ b/java/gradle/compile.gradle
@@ -25,6 +25,14 @@ tasks.withType(JavaCompile) {
   options.incremental = true // enable incremental compilation.
 }
 
+// Javadoc Configuration
+tasks.withType(Javadoc) {
+  if (JavaVersion.current().isJava8Compatible()) {
+    // Disable the super-strict doclint tool in Java 8+
+    options.addStringOption('Xdoclint:none', '-quiet')
+  }
+}
+
 // Scala configuration
 tasks.withType(ScalaCompile) {
   sourceCompatibility = javaCompatibility

http://git-wip-us.apache.org/repos/asf/kudu/blob/6a323db4/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
index 1bf2184..102df11 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/AsyncKuduClient.java
@@ -166,7 +166,7 @@ import org.apache.kudu.util.Pair;
  * <p>
  * In the context of the Hadoop ecosystem, the {@code UserGroupInformation}
  * class provides utility methods to login from a keytab and then run code as
- * the resulting {@link javax.security.auth.Subject}: <code><pre>
+ * the resulting {@link javax.security.auth.Subject}: <pre>{@code
  *   UserGroupInformation.loginUserFromKeytab("my-app", "/path/to/app.keytab");
  *   KuduClient c = UserGroupInformation.getLoginUser().doAs(
  *     new PrivilegedExceptionAction<KuduClient>() {
@@ -176,7 +176,7 @@ import org.apache.kudu.util.Pair;
  *       }
  *     }
  *   );
- * </pre></code> The {@code UserGroupInformation} class will also automatically
+ * }</pre> The {@code UserGroupInformation} class will also automatically
  * start a thread to periodically re-login from the keytab.
  *
  * <h3>Debugging Kudu's usage of Kerberos credentials</h3>
@@ -221,13 +221,13 @@ import org.apache.kudu.util.Pair;
  * <h1>API Compatibility</h1>
  *
  * Note that some methods in the Kudu client implementation are public but
- * annotated with the {@link InterfaceAudience.Private} annotation. This
+ * annotated with the InterfaceAudience.Private annotation. This
  * annotation indicates that, despite having {@code public} visibility, the
  * method is not part of the public API and there is no guarantee that its
  * existence or behavior will be maintained in subsequent versions of the Kudu
  * client library.
  *
- * Other APIs are annotated with the {@link InterfaceStability.Unstable} annotation.
+ * Other APIs are annotated with the InterfaceStability.Unstable annotation.
  * These APIs are meant for public consumption but may change between minor releases.
  * Note that the asynchronous client is currently considered unstable.
  *

http://git-wip-us.apache.org/repos/asf/kudu/blob/6a323db4/java/kudu-client/src/main/java/org/apache/kudu/client/Bytes.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/Bytes.java b/java/kudu-client/src/main/java/org/apache/kudu/client/Bytes.java
index 11b8849..0f31d6d 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/Bytes.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/Bytes.java
@@ -108,7 +108,6 @@ public final class Bytes {
    * Reads a byte from an offset in the given array.
    * @param b The array to read from.
    * @return A byte
-   * @return
    */
   public static byte getByte(final byte[] b, final int offset) {
     return b[offset];
@@ -1268,7 +1267,7 @@ public final class Bytes {
   /**
    * Utility method to read a byte array written the way {@link #writeByteArray} does it.
    * @param dataInput
-   * @return
+   * @return The read byte array
    * @throws IOException
    */
   public static byte[] readByteArray(DataInput dataInput) throws IOException {

http://git-wip-us.apache.org/repos/asf/kudu/blob/6a323db4/java/kudu-client/src/main/java/org/apache/kudu/client/KuduException.java
----------------------------------------------------------------------
diff --git a/java/kudu-client/src/main/java/org/apache/kudu/client/KuduException.java b/java/kudu-client/src/main/java/org/apache/kudu/client/KuduException.java
index d6dacf2..c9aa9a6 100644
--- a/java/kudu-client/src/main/java/org/apache/kudu/client/KuduException.java
+++ b/java/kudu-client/src/main/java/org/apache/kudu/client/KuduException.java
@@ -80,7 +80,7 @@ public abstract class KuduException extends IOException {
    * Thus, when the synchronous Kudu client wraps and throws the exception,
    * we suppress that stack trace and replace it with the stack trace of the user's
    * calling thread. The original stack trace is added to the {@link KuduException}
-   * as a suppressed exception ({@see Throwable#addSuppressed(Throwable)}) of
+   * as a suppressed exception (see Throwable#addSuppressed(Throwable)) of
    * this
    */
   @InterfaceAudience.Public

http://git-wip-us.apache.org/repos/asf/kudu/blob/6a323db4/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableInputFormat.java
----------------------------------------------------------------------
diff --git a/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableInputFormat.java
b/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableInputFormat.java
index a018ae2..aa8d877 100644
--- a/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableInputFormat.java
+++ b/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableInputFormat.java
@@ -87,7 +87,7 @@ import org.apache.kudu.client.RowResultIterator;
  * Therefore, total number of Kudu clients opened over the course of a MR application can
be
  * estimated by (#Tablets +1). To reduce the number of concurrent open clients, it might
be
  * advisable to restrict resources of the MR application or implement the
- * {@link org.apache.hadoop.mapred.lib.CombineFileInputFormat} over this InputFormat.
+ * org.apache.hadoop.mapred.lib.CombineFileInputFormat over this InputFormat.
  * </p>
  */
 @InterfaceAudience.Public

http://git-wip-us.apache.org/repos/asf/kudu/blob/6a323db4/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableMapReduceUtil.java
----------------------------------------------------------------------
diff --git a/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableMapReduceUtil.java
b/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableMapReduceUtil.java
index 52c6b1d..800bfd5 100644
--- a/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableMapReduceUtil.java
+++ b/java/kudu-mapreduce/src/main/java/org/apache/kudu/mapreduce/KuduTableMapReduceUtil.java
@@ -305,9 +305,6 @@ public class KuduTableMapReduceUtil {
   public static class TableOutputFormatConfiguratorWithCommandLineParser extends
       AbstractTableOutputFormatConfigurator<TableOutputFormatConfiguratorWithCommandLineParser>
{
 
-    /**
-     * {@inheritDoc}
-     */
     public TableOutputFormatConfiguratorWithCommandLineParser(Job job, String table) {
       super(job, table);
       CommandLineParser parser = new CommandLineParser(job.getConfiguration());
@@ -382,9 +379,6 @@ public class KuduTableMapReduceUtil {
   public static class TableInputFormatConfiguratorWithCommandLineParser extends
       AbstractTableInputFormatConfigurator<TableInputFormatConfiguratorWithCommandLineParser>
{
 
-    /**
-     * {@inheritDoc}
-     */
     public TableInputFormatConfiguratorWithCommandLineParser(Job job,
                                                              String table,
                                                              String columnProjection) {


Mime
View raw message