Skip to content

Commit

Permalink
Fix Javadoc warnings.
Browse files Browse the repository at this point in the history
Remove references to slf4j and dependencies on XxHash. This enables
cleanup of License and Notice files.
  • Loading branch information
leerho committed Sep 26, 2021
1 parent 8dc75a4 commit 4db24c1
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 95 deletions.
58 changes: 0 additions & 58 deletions LICENSE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
=============================================================
Expand Down
2 changes: 1 addition & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -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).
8 changes: 0 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
17 changes: 5 additions & 12 deletions src/main/java/org/apache/datasketches/hash/XxHash.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,14 @@
/**
* 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 {

/**
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/apache/datasketches/hll/BaseHllSketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -361,7 +361,7 @@ public void update(final byte[] data) {
* 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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -70,7 +69,7 @@ public static double computeKSDelta(final DoublesSketch sketch1, final DoublesSk

/**
* 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
Expand Down
5 changes: 2 additions & 3 deletions src/main/java/org/apache/datasketches/quantiles/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,7 @@ private 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
Expand All @@ -80,7 +79,7 @@ public static double computeKSDelta(final DoublesSketch sketch1, final DoublesSk

/**
* 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>
Expand Down
10 changes: 5 additions & 5 deletions src/main/java/org/apache/datasketches/req/BaseReqSketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -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>
*
Expand Down Expand Up @@ -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>
*
Expand Down Expand Up @@ -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);

Expand All @@ -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);

Expand Down Expand Up @@ -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
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public ReqDebug getReqDebug() {

/**
* 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) {
Expand All @@ -98,7 +98,7 @@ public ReqSketchBuilder setHighRankAccuracy(final boolean hra) {

/**
* 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) {
Expand All @@ -119,7 +119,7 @@ public ReqSketchBuilder setLessThanOrEqual(final boolean ltEq) {

/**
* 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) {
Expand Down

0 comments on commit 4db24c1

Please sign in to comment.