You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datasketches.apache.org by le...@apache.org on 2021/09/26 01:37:41 UTC

[datasketches-java] 02/02: Fix Javadoc warnings.

This is an automated email from the ASF dual-hosted git repository.

leerho pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/datasketches-java.git

commit 4db24c1368566bc555712270f89e2b007032f5ff
Author: Lee Rhodes <le...@users.noreply.github.com>
AuthorDate: Sat Sep 25 18:37:28 2021 -0700

    Fix Javadoc warnings.
    
    Remove references to slf4j and dependencies on XxHash. This enables
    cleanup of License and Notice files.
---
 LICENSE                                            | 58 ----------------------
 NOTICE                                             |  2 +-
 pom.xml                                            |  8 ---
 .../java/org/apache/datasketches/hash/XxHash.java  | 17 ++-----
 .../org/apache/datasketches/hll/BaseHllSketch.java |  4 +-
 .../datasketches/quantiles/KolmogorovSmirnov.java  |  5 +-
 .../org/apache/datasketches/quantiles/Util.java    |  5 +-
 .../org/apache/datasketches/req/BaseReqSketch.java | 10 ++--
 .../apache/datasketches/req/ReqSketchBuilder.java  |  6 +--
 9 files changed, 20 insertions(+), 95 deletions(-)

diff --git a/LICENSE b/LICENSE
index 6c89e81..ac03f4b 100644
--- a/LICENSE
+++ b/LICENSE
@@ -214,64 +214,6 @@ APPENDIX B: Additional licenses relevant to this product:
     the source code for these subcomponents is subject to the terms and
     conditions of the following licenses.
 
-
-
-    =============================================================
-    Apache License version 2.0 (see above)
-    =============================================================
-    Zero-Allocation Hashing
-    Copyright 2015 Higher Frequency Trading http://www.higherfrequencytrading.com
-
-    Code locations:
-    -------------------------------------------------------------
-    This product contains code to implement the xxHash function:
-      * src/main/java/org/apache/datasketches/hash/XxHash.java
-    and adapted from Java source code located at:
-      * https://github.com/OpenHFT/Zero-Allocation-Hashing/blob/master/src/main/java/net/openhft/hashing/XxHash.java
-
-
-
-    =============================================================
-    BSD-2-Clause License
-    =============================================================
-    xxHash Library
-    Copyright (c) 2012-present, Yann Collet
-    All rights reserved.
-
-    BSD 2-Clause License (http://www.opensource.org/licenses/bsd-license.php)
-
-    Redistribution and use in source and binary forms, with or without modification,
-    are permitted provided that the following conditions are met:
-
-    * Redistributions of source code must retain the above copyright notice, this
-      list of conditions and the following disclaimer.
-
-    * Redistributions in binary form must reproduce the above copyright notice, this
-      list of conditions and the following disclaimer in the documentation and/or
-      other materials provided with the distribution.
-
-    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-    ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-    WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
-    ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-    (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-    LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
-    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-    (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-    Code locations:
-    -------------------------------------------------------------
-    This product contains code to implement the xxHash function:
-      * src/main/java/org/apache/datasketches/hash/XxHash.java
-      * src/test/java/org/apache/datasketches/hash/XxHashTest.java
-    and adapted from C++ source code located at:
-      * https://github.com/Cyan4973/xxHash/blob/dev/xxhash.c
-      * https://github.com/Cyan4973/xxHash/blob/dev/xxhash.h
-
-
-
     =============================================================
     Public Domain (optional)
     =============================================================
diff --git a/NOTICE b/NOTICE
index 15564a0..aecaa08 100644
--- a/NOTICE
+++ b/NOTICE
@@ -8,4 +8,4 @@ This product includes software developed at
 The Apache Software Foundation (http://www.apache.org/).
 
 Prior to moving to ASF, the software for this project was developed at
-Yahoo (now Verizon Media) (https://developer.yahoo.com).
+Yahoo, Inc. (https://developer.yahoo.com).
diff --git a/pom.xml b/pom.xml
index aa6a4d5..657f77f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -163,15 +163,7 @@ under the License.
       <artifactId>datasketches-memory</artifactId>
       <version>${datasketches-memory.version}</version>
     </dependency>
-    <!-- Test Scope -->
-    <dependency>
-      <groupId>org.slf4j</groupId>
-      <artifactId>slf4j-simple</artifactId>
-      <version>${slf4j-simple.version}</version>
-      <scope>test</scope>
-    </dependency>
     <!-- END: UNIQUE FOR THIS JAVA COMPONENT -->
-
     <!-- Test Scope -->
     <dependency>
       <groupId>org.testng</groupId>
diff --git a/src/main/java/org/apache/datasketches/hash/XxHash.java b/src/main/java/org/apache/datasketches/hash/XxHash.java
index 397a325..25a51a1 100644
--- a/src/main/java/org/apache/datasketches/hash/XxHash.java
+++ b/src/main/java/org/apache/datasketches/hash/XxHash.java
@@ -24,21 +24,14 @@ import org.apache.datasketches.memory.Memory;
 /**
  * The XxHash is a fast, non-cryptographic, 64-bit hash function that has
  * excellent avalanche and 2-way bit independence properties.
- * This java version used the C++ version and the OpenHFT/Zero-Allocation-Hashing implementation
- * referenced below as inspiration.
- *
- * <p>The C++ source repository:
- * <a href="https://github.com/Cyan4973/xxHash">
- * https://github.com/Cyan4973/xxHash</a>. It has a BSD 2-Clause License:
- * <a href="http://www.opensource.org/licenses/bsd-license.php">
- * http://www.opensource.org/licenses/bsd-license.php</a>   See LICENSE.
- *
- * <p>Portions of this code were adapted from
- * <a href="https://github.com/OpenHFT/Zero-Allocation-Hashing/blob/master/src/main/java/net/openhft/hashing/XxHash.java">
- * OpenHFT/Zero-Allocation-Hashing</a>, which has an Apache 2 license as does this site. See LICENSE.
+ *  
+ * <p>This class wraps the   
+ * <a href="https://github.com/apache/datasketches-memory/blob/master/datasketches-memory-java8/src/main/java/org/apache/datasketches/memory/XxHash.java">Memory Component XxHash</a>
+ * implementation.
  *
  * @author Lee Rhodes
  */
+@SuppressWarnings("javadoc")
 public class XxHash {
 
   /**
diff --git a/src/main/java/org/apache/datasketches/hll/BaseHllSketch.java b/src/main/java/org/apache/datasketches/hll/BaseHllSketch.java
index 076cd0b..4d63b27 100644
--- a/src/main/java/org/apache/datasketches/hll/BaseHllSketch.java
+++ b/src/main/java/org/apache/datasketches/hll/BaseHllSketch.java
@@ -48,7 +48,7 @@ abstract class BaseHllSketch {
   public abstract int getCompactSerializationBytes();
 
   /**
-   * This is less accurate than the {@link #getEstimate()} method and is automatically used
+   * This is less accurate than the <i>getEstimate()</i> method and is automatically used
    * when the sketch has gone through union operations where the more accurate HIP estimator
    * cannot be used.
    * This is made public only for error characterization software that exists in separate
@@ -361,7 +361,7 @@ abstract class BaseHllSketch {
    * Present the given char array as a potential unique item.
    * If the char array is null or empty no update attempt is made and the method returns.
    *
-   * <p>Note: this will not produce the same output hash values as the {@link #update(String)}
+   * <p>Note: this will not produce the same output hash values as the <i>update(String)</i>
    * method but will be a little faster as it avoids the complexity of the UTF8 encoding.</p>
    *
    * @param data The given char array.
diff --git a/src/main/java/org/apache/datasketches/quantiles/KolmogorovSmirnov.java b/src/main/java/org/apache/datasketches/quantiles/KolmogorovSmirnov.java
index 848272f..c639cbe 100644
--- a/src/main/java/org/apache/datasketches/quantiles/KolmogorovSmirnov.java
+++ b/src/main/java/org/apache/datasketches/quantiles/KolmogorovSmirnov.java
@@ -27,8 +27,7 @@ final class KolmogorovSmirnov {
 
   /**
    * Computes the raw delta area between two quantile sketches for the
-   * {@link #kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double)
-   * Kolmogorov-Smirnov Test}
+   * <i>kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double)</i>
    * method.
    * @param sketch1 Input DoubleSketch 1
    * @param sketch2 Input DoubleSketch 2
@@ -70,7 +69,7 @@ final class KolmogorovSmirnov {
 
   /**
    * Computes the adjusted delta area threshold for the
-   * {@link #kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double) Kolmogorov-Smirnov Test}
+   * <i>kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double)</i>
    * method.
    * This adjusts the computed threshold by the error epsilons of the two given sketches.
    * @param sketch1 Input DoubleSketch 1
diff --git a/src/main/java/org/apache/datasketches/quantiles/Util.java b/src/main/java/org/apache/datasketches/quantiles/Util.java
index a61a2c2..b574fab 100644
--- a/src/main/java/org/apache/datasketches/quantiles/Util.java
+++ b/src/main/java/org/apache/datasketches/quantiles/Util.java
@@ -66,8 +66,7 @@ final class Util {
 
   /**
    * Computes the raw delta area between two quantile sketches for the
-   * {@link #kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double)
-   * Kolmogorov-Smirnov Test}
+   * <i>kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double)</i>
    * method.
    * @param sketch1 Input DoubleSketch 1
    * @param sketch2 Input DoubleSketch 2
@@ -80,7 +79,7 @@ final class Util {
 
   /**
    * Computes the adjusted delta area threshold for the
-   * {@link #kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double) Kolmogorov-Smirnov Test}
+   * <i>kolmogorovSmirnovTest(DoublesSketch, DoublesSketch, double)</i>
    * method.
    * This adjusts the computed threshold by the error epsilons of the two given sketches.
    * See <a href="https://en.wikipedia.org/wiki/Kolmogorov-Smirnov_test">Kolmogorov–Smirnov Test</a>
diff --git a/src/main/java/org/apache/datasketches/req/BaseReqSketch.java b/src/main/java/org/apache/datasketches/req/BaseReqSketch.java
index b4b082d..0193c8b 100644
--- a/src/main/java/org/apache/datasketches/req/BaseReqSketch.java
+++ b/src/main/java/org/apache/datasketches/req/BaseReqSketch.java
@@ -32,7 +32,7 @@ abstract class BaseReqSketch {
    * cumulative analog of the PMF, of the input stream given a set of splitPoint (values).
    *
    * <p>The resulting approximations have a probabilistic guarantee that be obtained, a priori,
-   * from the {@link #getRSE(int, double, boolean, long)} function.
+   * from the <i>getRSE(int, double, boolean, long)</i> function.
    *
    * <p>If the sketch is empty this returns null.</p>
    *
@@ -94,7 +94,7 @@ abstract class BaseReqSketch {
    * given a set of splitPoints (values).
    *
    * <p>The resulting approximations have a probabilistic guarantee that be obtained, a priori,
-   * from the {@link #getRSE(int, double, boolean, long)} function.
+   * from the <i>getRSE(int, double, boolean, long)</i> function.
    *
    * <p>If the sketch is empty this returns null.</p>
    *
@@ -124,7 +124,7 @@ abstract class BaseReqSketch {
    * Gets an array of quantiles that correspond to the given array of normalized ranks.
    * @param normRanks the given array of normalized ranks.
    * @return the array of quantiles that correspond to the given array of normalized ranks.
-   * @see #getQuantile(double)
+   * See <i>getQuantile(double)</i>
    */
   public abstract float[] getQuantiles(final double[] normRanks);
 
@@ -149,7 +149,7 @@ abstract class BaseReqSketch {
    * Gets an array of normalized ranks that correspond to the given array of values.
    * @param values the given array of values.
    * @return the  array of normalized ranks that correspond to the given array of values.
-   * @see #getRank(float)
+   * See <i>getRank(float)</i>
    */
   public abstract double[] getRanks(final float[] values);
 
@@ -218,7 +218,7 @@ abstract class BaseReqSketch {
    *
    * @param ltEq (Less-than-or Equals) If true, the sketch will use the &le; criterion for comparing
    * values.  Otherwise, the criterion is strictly &lt;, the default.
-   * This can be set anytime prior to a {@link #getRank(float)} or {@link #getQuantile(double)} or
+   * This can be set anytime prior to a <i>getRank(float)</i> or <i>getQuantile(double)</i> or
    * equivalent query.
    * @return this
    */
diff --git a/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java b/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java
index 33a7cc0..341b416 100644
--- a/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java
+++ b/src/main/java/org/apache/datasketches/req/ReqSketchBuilder.java
@@ -88,7 +88,7 @@ public class ReqSketchBuilder {
 
   /**
    * This sets the parameter highRankAccuracy.
-   * @param hra See {@link ReqSketch#ReqSketch(int, boolean, ReqDebug)}
+   * @param hra See  <i>ReqSketch#ReqSketch(int, boolean, ReqDebug)</i>
    * @return this
    */
   public ReqSketchBuilder setHighRankAccuracy(final boolean hra) {
@@ -98,7 +98,7 @@ public class ReqSketchBuilder {
 
   /**
    * This sets the parameter k.
-   * @param k See {@link ReqSketch#ReqSketch(int, boolean, ReqDebug)}
+   * @param k See <i>ReqSketch#ReqSketch(int, boolean, ReqDebug)</i>
    * @return this
    */
   public ReqSketchBuilder setK(final int k) {
@@ -119,7 +119,7 @@ public class ReqSketchBuilder {
 
   /**
    * This sets the parameter reqDebug.
-   * @param reqDebug See {@link ReqSketch#ReqSketch(int, boolean, ReqDebug)}
+   * @param reqDebug See <i>ReqSketch#ReqSketch(int, boolean, ReqDebug)</i>
    * @return this
    */
   public ReqSketchBuilder setReqDebug(final ReqDebug reqDebug) {

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datasketches.apache.org
For additional commands, e-mail: commits-help@datasketches.apache.org