Got Checkstyle working. These are checkstyle fixes.
diff --git a/src/main/java/org/apache/datasketches/pig/hll/DataToSketch.java b/src/main/java/org/apache/datasketches/pig/hll/DataToSketch.java
index ac126bb..c6b5af9 100644
--- a/src/main/java/org/apache/datasketches/pig/hll/DataToSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/hll/DataToSketch.java
@@ -126,7 +126,8 @@
}
if (inputTuple == null || inputTuple.size() == 0) {
if (this.emptySketch_ == null) {
- this.emptySketch_ = new DataByteArray(new HllSketch(this.lgK_, this.tgtHllType_).toCompactByteArray());
+ this.emptySketch_ =
+ new DataByteArray(new HllSketch(this.lgK_, this.tgtHllType_).toCompactByteArray());
}
return this.emptySketch_;
}
@@ -172,7 +173,8 @@
public DataByteArray getValue() {
if (this.accumUnion_ == null) {
if (this.emptySketch_ == null) {
- this.emptySketch_ = new DataByteArray(new HllSketch(this.lgK_, this.tgtHllType_).toCompactByteArray());
+ this.emptySketch_ =
+ new DataByteArray(new HllSketch(this.lgK_, this.tgtHllType_).toCompactByteArray());
}
return this.emptySketch_;
}
diff --git a/src/main/java/org/apache/datasketches/pig/hll/UnionSketch.java b/src/main/java/org/apache/datasketches/pig/hll/UnionSketch.java
index 1f823c8..f2681d5 100644
--- a/src/main/java/org/apache/datasketches/pig/hll/UnionSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/hll/UnionSketch.java
@@ -112,7 +112,8 @@
}
if (inputTuple == null || inputTuple.size() == 0) {
if (this.emptySketch_ == null) {
- this.emptySketch_ = new DataByteArray(new HllSketch(this.lgK_, this.tgtHllType_).toCompactByteArray());
+ this.emptySketch_ =
+ new DataByteArray(new HllSketch(this.lgK_, this.tgtHllType_).toCompactByteArray());
}
return this.emptySketch_;
}
diff --git a/src/main/java/org/apache/datasketches/pig/hll/package-info.java b/src/main/java/org/apache/datasketches/pig/hll/package-info.java
index f49830d..6562d4f 100644
--- a/src/main/java/org/apache/datasketches/pig/hll/package-info.java
+++ b/src/main/java/org/apache/datasketches/pig/hll/package-info.java
@@ -20,7 +20,7 @@
/**
* Pig UDFs for HLL sketches.
*
- * These UDFs can be used as a replacement of corresponding Theta sketch UDFs.
+ * <p>These UDFs can be used as a replacement of corresponding Theta sketch UDFs.
* Notice that intersections and A-not-B operations are not supported by the HLL sketch.
* Also notice a small difference in the output type of DataToSketch and UnionSketch:
* HLL sketch UDFs return DataByteArray (BYTEARRAY in Pig), but corresponding Theta sketch
@@ -28,7 +28,7 @@
* and we are reluctant to break the compatibility with existing scripts. HLL sketch UDFs
* don't have to keep this compatibility. As a result, HLL sketch UDFs don't need
* flatten() around them to remove the Tuple, and internally they don't have to spend extra
- * resources to wrap every output DataByteArray into a Tuple.
+ * resources to wrap every output DataByteArray into a Tuple.</p>
*
* @author Alexander Saydakov
*/
diff --git a/src/main/java/org/apache/datasketches/pig/kll/DataToSketch.java b/src/main/java/org/apache/datasketches/pig/kll/DataToSketch.java
index dfa3686..b91e6d3 100644
--- a/src/main/java/org/apache/datasketches/pig/kll/DataToSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/kll/DataToSketch.java
@@ -273,7 +273,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override
+ @Override
public Tuple exec(final Tuple inputTuple) throws IOException { //throws is in API
return TUPLE_FACTORY_.newTuple(process(inputTuple, this.k_));
}
@@ -320,7 +320,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override
+ @Override
public DataByteArray exec(final Tuple inputTuple) throws IOException {
return process(inputTuple, this.k_);
}
diff --git a/src/main/java/org/apache/datasketches/pig/kll/UnionSketch.java b/src/main/java/org/apache/datasketches/pig/kll/UnionSketch.java
index fb34f07..6e00d8a 100644
--- a/src/main/java/org/apache/datasketches/pig/kll/UnionSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/kll/UnionSketch.java
@@ -287,7 +287,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override
+ @Override
public Tuple exec(final Tuple inputTuple) throws IOException {
return TUPLE_FACTORY_.newTuple(process(inputTuple, this.k_));
}
@@ -333,7 +333,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override
+ @Override
public DataByteArray exec(final Tuple inputTuple) throws IOException {
return process(inputTuple, this.k_);
}
diff --git a/src/main/java/org/apache/datasketches/pig/quantiles/DataToDoublesSketch.java b/src/main/java/org/apache/datasketches/pig/quantiles/DataToDoublesSketch.java
index 8a0b356..384bdcc 100644
--- a/src/main/java/org/apache/datasketches/pig/quantiles/DataToDoublesSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/quantiles/DataToDoublesSketch.java
@@ -152,7 +152,8 @@
}
}
// return empty sketch
- return tupleFactory_.newTuple(new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
+ return tupleFactory_.newTuple(
+ new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
}
@Override
@@ -214,7 +215,8 @@
}
}
// return empty sketch
- return tupleFactory_.newTuple(new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
+ return tupleFactory_.newTuple(
+ new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
}
/**
@@ -321,7 +323,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override // IntermediateFinal exec
+ @Override // IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException { //throws is in API
if ((inputTuple != null) && (inputTuple.size() > 0)) {
final DoublesUnion union = this.unionBuilder_.build();
@@ -359,7 +361,8 @@
}
}
// return empty sketch
- return tupleFactory_.newTuple(new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
+ return tupleFactory_.newTuple(
+ new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
}
} // end IntermediateFinal
diff --git a/src/main/java/org/apache/datasketches/pig/quantiles/DataToItemsSketch.java b/src/main/java/org/apache/datasketches/pig/quantiles/DataToItemsSketch.java
index edcf2da..29ce429 100644
--- a/src/main/java/org/apache/datasketches/pig/quantiles/DataToItemsSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/quantiles/DataToItemsSketch.java
@@ -309,7 +309,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override // IntermediateFinal exec
+ @Override // IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException { //throws is in API
if ((inputTuple != null) && (inputTuple.size() > 0)) {
final ItemsUnion<T> union = this.k_ > 0
diff --git a/src/main/java/org/apache/datasketches/pig/quantiles/DataToStringsSketch.java b/src/main/java/org/apache/datasketches/pig/quantiles/DataToStringsSketch.java
index b734218..5818001 100644
--- a/src/main/java/org/apache/datasketches/pig/quantiles/DataToStringsSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/quantiles/DataToStringsSketch.java
@@ -63,11 +63,11 @@
public static class DataToStringsSketchIntermediateFinal
extends DataToItemsSketchIntermediateFinal<String> {
- public DataToStringsSketchIntermediateFinal() {
+ public DataToStringsSketchIntermediateFinal() {
super(0, COMPARATOR, SER_DE);
}
- public DataToStringsSketchIntermediateFinal(final String kStr) {
+ public DataToStringsSketchIntermediateFinal(final String kStr) {
super(Integer.parseInt(kStr), COMPARATOR, SER_DE);
}
diff --git a/src/main/java/org/apache/datasketches/pig/quantiles/UnionDoublesSketch.java b/src/main/java/org/apache/datasketches/pig/quantiles/UnionDoublesSketch.java
index 726c665..1051fc1 100644
--- a/src/main/java/org/apache/datasketches/pig/quantiles/UnionDoublesSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/quantiles/UnionDoublesSketch.java
@@ -138,7 +138,8 @@
}
}
// return empty sketch
- return tupleFactory_.newTuple(new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
+ return tupleFactory_.newTuple(
+ new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
}
@Override
@@ -193,7 +194,8 @@
}
}
// return empty sketch
- return tupleFactory_.newTuple(new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
+ return tupleFactory_.newTuple(
+ new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
}
/**
@@ -321,7 +323,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override // IntermediateFinal exec
+ @Override // IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException {
if (inputTuple != null && inputTuple.size() > 0) {
final DoublesUnion union = this.unionBuilder_.build();
@@ -354,7 +356,8 @@
}
}
// return empty sketch
- return tupleFactory_.newTuple(new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
+ return tupleFactory_.newTuple(
+ new DataByteArray(this.unionBuilder_.build().getResult().toByteArray(true)));
}
} // end IntermediateFinal
diff --git a/src/main/java/org/apache/datasketches/pig/quantiles/UnionItemsSketch.java b/src/main/java/org/apache/datasketches/pig/quantiles/UnionItemsSketch.java
index ef9dace..2d63fda 100644
--- a/src/main/java/org/apache/datasketches/pig/quantiles/UnionItemsSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/quantiles/UnionItemsSketch.java
@@ -170,7 +170,9 @@
final DataBag bag = (DataBag) inputTuple.get(0);
if (bag == null) { return; }
if (this.accumUnion_ == null) {
- this.accumUnion_ = this.k_ > 0 ? ItemsUnion.getInstance(this.k_, this.comparator_) : ItemsUnion.getInstance(this.comparator_);
+ this.accumUnion_ = this.k_ > 0
+ ? ItemsUnion.getInstance(this.k_, this.comparator_)
+ : ItemsUnion.getInstance(this.comparator_);
}
updateUnion(bag, this.accumUnion_, this.comparator_, this.serDe_);
}
@@ -292,7 +294,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override // IntermediateFinal exec
+ @Override // IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException {
if (inputTuple != null && inputTuple.size() > 0) {
final ItemsUnion<T> union = this.k_ > 0
diff --git a/src/main/java/org/apache/datasketches/pig/quantiles/UnionStringsSketch.java b/src/main/java/org/apache/datasketches/pig/quantiles/UnionStringsSketch.java
index 6e6470e..db0c4b5 100644
--- a/src/main/java/org/apache/datasketches/pig/quantiles/UnionStringsSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/quantiles/UnionStringsSketch.java
@@ -62,7 +62,7 @@
@SuppressWarnings("synthetic-access")
public static class UnionStringsSketchIntermediateFinal extends UnionItemsSketchIntermediateFinal<String> {
- public UnionStringsSketchIntermediateFinal() {
+ public UnionStringsSketchIntermediateFinal() {
super(0, COMPARATOR, SER_DE);
}
diff --git a/src/main/java/org/apache/datasketches/pig/sampling/VarOptCommonImpl.java b/src/main/java/org/apache/datasketches/pig/sampling/VarOptCommonImpl.java
index b1f7eaf..21d16d7 100644
--- a/src/main/java/org/apache/datasketches/pig/sampling/VarOptCommonImpl.java
+++ b/src/main/java/org/apache/datasketches/pig/sampling/VarOptCommonImpl.java
@@ -272,7 +272,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override
+ @Override
public DataByteArray exec(final Tuple inputTuple) throws IOException {
if (inputTuple == null || inputTuple.size() < 1 || inputTuple.isNull(0)) {
return null;
diff --git a/src/main/java/org/apache/datasketches/pig/theta/DataToSketch.java b/src/main/java/org/apache/datasketches/pig/theta/DataToSketch.java
index 87292be..8d344f4 100644
--- a/src/main/java/org/apache/datasketches/pig/theta/DataToSketch.java
+++ b/src/main/java/org/apache/datasketches/pig/theta/DataToSketch.java
@@ -524,7 +524,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override //IntermediateFinal exec
+ @Override //IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException { //throws is in API
final Union union = newUnion(this.myNomEntries_, this.myP_, this.mySeed_);
final DataBag outerBag = extractBag(inputTuple); //InputTuple.bag0
diff --git a/src/main/java/org/apache/datasketches/pig/theta/Intersect.java b/src/main/java/org/apache/datasketches/pig/theta/Intersect.java
index e027e60..5d42fdc 100644
--- a/src/main/java/org/apache/datasketches/pig/theta/Intersect.java
+++ b/src/main/java/org/apache/datasketches/pig/theta/Intersect.java
@@ -346,7 +346,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override //IntermediateFinal exec
+ @Override //IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException { //throws is in API
final Intersection intersection = SetOperation.builder().setSeed(this.mySeed_).buildIntersection();
diff --git a/src/main/java/org/apache/datasketches/pig/theta/Union.java b/src/main/java/org/apache/datasketches/pig/theta/Union.java
index a9ccd34..fbd1be6 100644
--- a/src/main/java/org/apache/datasketches/pig/theta/Union.java
+++ b/src/main/java/org/apache/datasketches/pig/theta/Union.java
@@ -468,7 +468,7 @@
}
@SuppressWarnings("synthetic-access")
- @Override //IntermediateFinal exec
+ @Override //IntermediateFinal exec
public Tuple exec(final Tuple inputTuple) throws IOException { //throws is in API
final org.apache.datasketches.theta.Union union =
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/DataToSketchAlgebraicIntermediateFinal.java b/src/main/java/org/apache/datasketches/pig/tuple/DataToSketchAlgebraicIntermediateFinal.java
index b701551..d1bed2b 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/DataToSketchAlgebraicIntermediateFinal.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/DataToSketchAlgebraicIntermediateFinal.java
@@ -129,7 +129,8 @@
// This is a sketch from a prior call to the
// Intermediate function. merge it with the
// current sketch.
- final Sketch<S> incomingSketch = Util.deserializeSketchFromTuple(dataTuple, this.summaryDeserializer_);
+ final Sketch<S> incomingSketch =
+ Util.deserializeSketchFromTuple(dataTuple, this.summaryDeserializer_);
union.union(incomingSketch);
} else {
// we should never get here.
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/UnionSketchAlgebraicIntermediateFinal.java b/src/main/java/org/apache/datasketches/pig/tuple/UnionSketchAlgebraicIntermediateFinal.java
index 6f6a5c8..40d23b3 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/UnionSketchAlgebraicIntermediateFinal.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/UnionSketchAlgebraicIntermediateFinal.java
@@ -93,13 +93,15 @@
if (item instanceof DataBag) {
// this is from a prior call to the initial function, so there is a nested bag.
for (Tuple innerTuple: (DataBag) item) {
- final Sketch<S> incomingSketch = Util.deserializeSketchFromTuple(innerTuple, this.summaryDeserializer_);
+ final Sketch<S> incomingSketch =
+ Util.deserializeSketchFromTuple(innerTuple, this.summaryDeserializer_);
union.union(incomingSketch);
}
} else if (item instanceof DataByteArray) {
// This is a sketch from a call to the Intermediate function
// Add it to the current union.
- final Sketch<S> incomingSketch = Util.deserializeSketchFromTuple(dataTuple, this.summaryDeserializer_);
+ final Sketch<S> incomingSketch =
+ Util.deserializeSketchFromTuple(dataTuple, this.summaryDeserializer_);
union.union(incomingSketch);
} else {
// we should never get here.
diff --git a/src/main/java/org/apache/datasketches/pig/tuple/package-info.java b/src/main/java/org/apache/datasketches/pig/tuple/package-info.java
index 645912e..5d172c7 100644
--- a/src/main/java/org/apache/datasketches/pig/tuple/package-info.java
+++ b/src/main/java/org/apache/datasketches/pig/tuple/package-info.java
@@ -19,23 +19,24 @@
/**
* Pig UDFs for Tuple sketches.
- * Tuple sketches are based on the idea of Theta sketches with the addition of
+ *
+ * <p>Tuple sketches are based on the idea of Theta sketches with the addition of
* values associated with unique keys.
* Two sets of tuple sketch classes are available at the moment:
* generic Tuple sketches with user-defined Summary, and a faster specialized
- * implementation with an array of double values.
+ * implementation with an array of double values.</p>
*
* <p>There are two sets of Pig UDFs: one for generic Tuple sketch with an example
* implementation for DoubleSummay, and another one for a specialized ArrayOfDoublesSketch.
*
- * <p> The generic implementation is in the form of abstract classes DataToSketch and
+ * <p>The generic implementation is in the form of abstract classes DataToSketch and
* UnionSketch to be specialized for particular types of Summary.
* An example implementation for DoubleSumamry is provided: DataToDoubleSummarySketch and
* UnionDoubleSummarySketch, as well as UDFs to obtain the results from sketches:
- * DoubleSumamrySketchToEstimates and DoubleSummarySketchToPercentile.
+ * DoubleSumamrySketchToEstimates and DoubleSummarySketchToPercentile.</p>
*
* <p>UDFs for ArrayOfDoublesSketch: DataToArrayOfDoublesSketch, UnionArrayOfDoublesSketch,
- * ArrayOfDoublesSketchToEstimates.
+ * ArrayOfDoublesSketchToEstimates.</p>
*
* @author Alexander Saydakov
*/
diff --git a/tools/SketchesCheckstyle.xml b/tools/SketchesCheckstyle.xml
index 90597a9..7188cdf 100644
--- a/tools/SketchesCheckstyle.xml
+++ b/tools/SketchesCheckstyle.xml
@@ -203,10 +203,10 @@
<module name="JavadocMethod">
<property name="scope" value="public"/>
<property name="allowMissingParamTags" value="false"/>
- <property name="allowMissingThrowsTags" value="true"/>
+ <!-- <property name="allowMissingThrowsTags" value="true"/> now not allowed ?!? -->
<property name="allowMissingReturnTag" value="false"/>
<property name="allowedAnnotations" value="Override, Test"/>
- <property name="allowThrowsTagsForSubclasses" value="true"/>
+ <!-- <property name="allowThrowsTagsForSubclasses" value="true"/> now not allowed ?!? -->
</module>
<module name="JavadocParagraph"/>