Skip to content

Commit cac0ef7

Browse files
authored
Merge pull request #692 from apache/name_change_and_release_prep
Name Change and Release Preparation
2 parents 0833e37 + f811370 commit cac0ef7

22 files changed

Lines changed: 289 additions & 259 deletions

.github/workflows/javadoc.yml

Lines changed: 60 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,67 @@
1-
name: JavaDoc
1+
name: Deploy Versioned Javadoc (Manual Trigger)
2+
3+
# Select the target TAG where to run the workflow from.
4+
# This TAG name becomes the subdirectory under branch gh-pages/docs/${TAG}
5+
# where the javadocs will be copied to.
26

37
on:
4-
push:
5-
branches: main
68
workflow_dispatch:
7-
8-
permissions:
9-
contents: write
9+
inputs:
10+
tag_ref:
11+
description: 'Existing Git Tag to deploy (e.g., 1.0.0)'
12+
required: true
13+
default: '1.0.0' # Default can be left blank or set to a placeholder
1014

1115
jobs:
12-
javadoc:
16+
build-and-deploy-javadoc:
1317
runs-on: ubuntu-latest
18+
permissions:
19+
contents: write
20+
pages: write
21+
id-token: write
22+
23+
steps:
24+
- name: Checkout Code at Specified Tag
25+
uses: actions/checkout@v5
26+
with:
27+
ref: ${{ github.event.inputs.tag_ref }} # from manual trigger input
28+
fetch-depth: 0
29+
30+
- name: Set up JDK
31+
uses: actions/setup-java@v4
32+
with:
33+
java-version: '25'
34+
distribution: 'temurin'
35+
cache: 'maven'
36+
37+
- name: Build and Generate Javadoc
38+
run: mvn javadoc:javadoc
39+
40+
- name: Deploy Javadoc to gh-pages/docs/${TAG}
41+
env:
42+
GH_PAGES_EMAIL: noreply@github.com
43+
GH_PAGES_NAME: github-actions[bot]
44+
GIT_TAG_NAME: ${{ github.event.inputs.tag_ref }}
45+
TARGET_DIR: docs/${{ github.event.inputs.tag_ref }}
46+
run: |
47+
# 1. Configure Git user
48+
git config user.email "${GH_PAGES_EMAIL}"
49+
git config user.name "${GH_PAGES_NAME}"
50+
51+
# 2. Fetch and checkout the existing gh-pages branch
52+
git fetch origin gh-pages:gh-pages
53+
git checkout gh-pages
54+
55+
# 3. Clean up any previous documentation for this tag (optional, but safer)
56+
rm -rf $TARGET_DIR
57+
58+
# 4. Create the versioned directory structure
59+
mkdir -p $TARGET_DIR
60+
61+
# 5. Copy the generated Javadoc files into the versioned directory
62+
cp -r target/reports/apidocs/* $TARGET_DIR/
1463
15-
steps:
16-
- name: Checkout
17-
uses: actions/checkout@v5
18-
19-
- name: Setup Java
20-
uses: actions/setup-java@v5
21-
with:
22-
java-version: '25'
23-
distribution: 'temurin'
24-
25-
- name: Echo Java Version
26-
run: java -version
27-
28-
- name: Print Current workflow
29-
run: >
30-
cat .github/workflows/javadoc.yml
31-
32-
- name: Generate JavaDoc
33-
run: mvn javadoc:javadoc
34-
35-
- name: Deploy JavaDoc
36-
uses: JamesIves/github-pages-deploy-action@881db5376404c5c8d621010bcbec0310b58d5e29
37-
with:
38-
token: ${{ secrets.GITHUB_TOKEN }}
39-
folder: target/reports/apidocs
40-
target-folder: docs/${{ github.ref_name }}
41-
branch: gh-pages
64+
# 6. Add the new directory and files, commit, and push
65+
git add $TARGET_DIR
66+
git commit -m "Manual Javadoc deployment for tag ${GIT_TAG_NAME} into $TARGET_DIR"
67+
git push origin gh-pages

README.md

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,34 +27,33 @@ This is the core Java component of the DataSketches library. It contains all of
2727

2828
This component is also a dependency of other components of the library that create adaptors for target systems, such as the [Apache Pig adaptor](https://github.com/apache/datasketches-pig), the [Apache Hive adaptor](https://github.com/apache/datasketches-hive), and others.
2929

30-
Note that we have a parallel core component for C++, Python and GO implementations of many of the same sketch algorithms,
31-
[datasketches-cpp](https://github.com/apache/datasketches-cpp), [datasketches-python](https://github.com/apache/datasketches-python), and
32-
[datasketches-go](https://github.com/apache/datasketches-go).
30+
Note that we have parallel core library components for C++, Python and GO implementations of many of the same sketch algorithms:
31+
32+
- [datasketches-cpp](https://github.com/apache/datasketches-cpp),
33+
- [datasketches-python](https://github.com/apache/datasketches-python),
34+
- [datasketches-go](https://github.com/apache/datasketches-go).
3335

3436
Please visit the main [DataSketches website](https://datasketches.apache.org) for more information.
3537

3638
If you are interested in making contributions to this site please see our [Community](https://datasketches.apache.org/docs/Community/) page for how to contact us.
3739

38-
---
3940

4041
## Build & Runtime Dependencies
4142

4243
### Installation Directory Path
4344
**NOTE:** This component accesses resource files for testing. As a result, the directory elements of the full absolute path of the target installation directory must qualify as Java identifiers. In other words, the directory elements must not have any space characters (or non-Java identifier characters) in any of the path elements. This is required by the Oracle Java Specification in order to ensure location-independent access to resources: [See Oracle Location-Independent Access to Resources](https://docs.oracle.com/javase/8/docs/technotes/guides/lang/resources.html)
4445

45-
### OpenJDK Version 24
46-
An OpenJDK-compatible build of Java 24, provided by one of the Open-Source JVM providers, such as Azul Systems, Red Hat, SAP, Eclipse Temurin, etc, is required.
47-
All of the testing of this release has been performed with an Eclipse Temurin build.
48-
49-
This release uses the new Java Foreign Function & Memory (FFM) features that were made part of the Java Language in in Java 22.
46+
### OpenJDK Version 25
47+
At minimum, an OpenJDK-compatible build of Java 25, provided by one of the Open-Source JVM providers, such as *Azul Systems*, *Red Hat*, *SAP*, *Eclipse Temurin*, etc, is required.
48+
All of the testing of this release has been performed with the *Eclipse Temurin* build.
5049

5150
## Compilation and Test using Maven
5251
This DataSketches component is structured as a Maven project and Maven is the recommended tool for compile and test.
5352

5453
#### A Toolchain is required
5554

56-
* You must have a JDK type toolchain defined in location *~/.m2/toolchains.xml* that specifies where to find a locally installed OpenJDK-compatible version 24.
57-
* Your default \$JAVA\_HOME compiler must be OpenJDK compatible, specified in the toolchain, and may be a version greater than 24. Note that if your \$JAVA\_HOME is set to a Java version greater than 24, Maven will automatically use the Java 24 version specified in the toolchain instead. The included pom.xml specifies the necessary JVM flags, so no further action should be required.
55+
* You must have a JDK type toolchain defined in location *~/.m2/toolchains.xml* that specifies where to find a locally installed OpenJDK-compatible version 25.
56+
* Your default \$JAVA\_HOME compiler must be OpenJDK compatible, specified in the toolchain, and may be a version greater than 25. Note that if your \$JAVA\_HOME is set to a Java version greater than 25, Maven will automatically use the Java 25 version specified in the toolchain instead. The pom.xml specifies any necessary JVM flags, if required, so no further action is needed.
5857
* Note that the paths specified in the toolchain must be fully qualified direct paths to the OpenJDK version locations. Using environment variables will not work.
5958

6059
#### To run normal unit tests:
@@ -79,3 +78,7 @@ This will create the following jars:
7978

8079
* Make sure you configure SpotBugs with the /tools/FindBugsExcludeFilter.xml file. Otherwise, you may get a lot of false positive or low risk issues that we have examined and eliminated with this exclusion file.
8180

81+
### Checkstyle
82+
83+
* At the time of this writing, Checkstyle had not been upgraded to handle Java 25 features.
84+

pom.xml

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ under the License.
3333

3434
<groupId>org.apache.datasketches</groupId>
3535
<artifactId>datasketches-java</artifactId>
36-
<version>9.0.0-SNAPSHOT</version>
36+
<version>9.0.1-SNAPSHOT</version>
3737
<packaging>jar</packaging>
3838

3939
<name>${project.artifactId}</name>
40-
<description>Core sketch algorithms used alone and by other Java repositories in the DataSketches library.</description>
40+
<description>Core sketch algorithms used alone and by other Java repositories in the Apache DataSketches Project.</description>
4141
<url>https://datasketches.apache.org/</url>
4242
<inceptionYear>2015</inceptionYear>
4343

@@ -92,6 +92,8 @@ under the License.
9292
<!-- System-wide properties -->
9393
<maven.version>3.9.11</maven.version>
9494
<java.version>25</java.version>
95+
<!-- Reproducable Builds, arbitrary, fixed date
96+
<project.build.outputTimestamp>2025-12-01T00:00:00Z</project.build.outputTimestamp> -->
9597
<!-- removed: g -Duser.language=en -Duser.country=US -Dfile.encoding=UTF-8 -->
9698
<jvm.options>-Xmx4g</jvm.options> <!-- use space to separate args -->
9799
<charset.encoding>UTF-8</charset.encoding>
@@ -102,17 +104,17 @@ under the License.
102104

103105
<!-- org.apache.maven plugins -->
104106
<maven-assembly-plugin.version>3.7.1</maven-assembly-plugin.version>
105-
<maven-compiler-plugin.version>3.14.0</maven-compiler-plugin.version>
106-
<maven-dependency-plugin.version>3.8.1</maven-dependency-plugin.version>
107+
<maven-compiler-plugin.version>3.14.1</maven-compiler-plugin.version>
108+
<maven-dependency-plugin.version>3.9.0</maven-dependency-plugin.version>
107109
<maven-deploy-plugin.version>3.1.4</maven-deploy-plugin.version>
108-
<maven-enforcer-plugin.version>3.6.1</maven-enforcer-plugin.version>
110+
<maven-enforcer-plugin.version>3.6.2</maven-enforcer-plugin.version>
109111
<maven-gpg-plugin.version>3.2.8</maven-gpg-plugin.version>
110-
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version>
111-
<maven-javadoc-plugin.version>3.11.3</maven-javadoc-plugin.version>
112-
<maven-release-plugin.version>3.1.1</maven-release-plugin.version>
112+
<maven-jar-plugin.version>3.4.2</maven-jar-plugin.version> <!--3.5.0 fails -->
113+
<maven-javadoc-plugin.version>3.12.0</maven-javadoc-plugin.version>
114+
<maven-release-plugin.version>3.2.0</maven-release-plugin.version>
113115
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
114116
<!-- for surefire, failsafe and surefire-report: -->
115-
<maven-surefire-failsafe-plugins.version>3.5.3</maven-surefire-failsafe-plugins.version>
117+
<maven-surefire-failsafe-plugins.version>3.5.4</maven-surefire-failsafe-plugins.version>
116118
<maven-toolchains-plugin.version>3.2.0</maven-toolchains-plugin.version>
117119
<!-- com.github plugins -->
118120
<git-commit-id-plugin.version>4.9.10</git-commit-id-plugin.version>
@@ -122,11 +124,12 @@ under the License.
122124
<coveralls-repo-token></coveralls-repo-token>
123125
<coveralls-maven-plugin.version>4.3.0</coveralls-maven-plugin.version>
124126
<!-- org.jacoco.maven plugins -->
125-
<jacoco-maven-plugin.version>0.8.13</jacoco-maven-plugin.version>
127+
<jacoco-maven-plugin.version>0.8.14</jacoco-maven-plugin.version>
126128
<!-- org.mojohaus plugins -->
127-
<versions-maven-plugin.version>2.18.0</versions-maven-plugin.version>
129+
<versions-maven-plugin.version>2.19.1</versions-maven-plugin.version>
128130
<!-- other -->
129131
<lifecycle-mapping.version>1.0.0</lifecycle-mapping.version>
132+
<reproducible-build-maven-plugin.version>0.17</reproducible-build-maven-plugin.version>
130133
</properties>
131134

132135
<dependencies>
@@ -393,6 +396,19 @@ under the License.
393396
<version>${git-commit-id-plugin.version}</version>
394397
</plugin>
395398

399+
<plugin>
400+
<groupId>io.github.zlika</groupId>
401+
<artifactId>reproducible-build-maven-plugin</artifactId>
402+
<version>${reproducible-build-maven-plugin.version}</version>
403+
<executions>
404+
<execution>
405+
<goals>
406+
<goal>strip-jar</goal>
407+
</goals>
408+
</execution>
409+
</executions>
410+
</plugin>
411+
396412
</plugins>
397413
</pluginManagement>
398414
<plugins>
@@ -460,6 +476,10 @@ under the License.
460476
<groupId>pl.project13.maven</groupId>
461477
<artifactId>git-commit-id-plugin</artifactId>
462478
</plugin>
479+
<plugin>
480+
<groupId>io.github.zlika</groupId>
481+
<artifactId>reproducible-build-maven-plugin</artifactId>
482+
</plugin>
463483
</plugins>
464484
</build>
465485

@@ -506,7 +526,7 @@ under the License.
506526
<includeOnlyProperties>
507527
<includeProperty>git.branch</includeProperty>
508528
<includeProperty>git.commit.id.full</includeProperty>
509-
<includeProperty>git.commit.time</includeProperty>
529+
<!-- <includeProperty>git.commit.time</includeProperty> remove for reproducible builds-->
510530
<includeProperty>git.commit.user.email</includeProperty>
511531
<includeProperty>git.tags</includeProperty>
512532
</includeOnlyProperties>
@@ -610,8 +630,6 @@ under the License.
610630
</build>
611631
</profile>
612632

613-
614-
615633
<profile>
616634
<id>generate-java-files</id>
617635
<build>

src/main/java/org/apache/datasketches/hll/BaseHllSketch.java

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
/**
3737
* Although this class is package-private, it provides a single place to define and document
38-
* the common public API for both HllSketch and Union.
38+
* the common public API for both HllSketch and HllUnion.
3939
* @author Lee Rhodes
4040
* @author Kevin Lang
4141
*/
@@ -115,7 +115,7 @@ public static final int getSerializationVersion(final MemorySegment seg) {
115115
* Gets the current (approximate) Relative Error (RE) asymptotic values given several
116116
* parameters. This is used primarily for testing.
117117
* @param upperBound return the RE for the Upper Bound, otherwise for the Lower Bound.
118-
* @param oooFlag set true if the sketch is the result of a non qualifying union operation.
118+
* @param oooFlag set true if the sketch is the result of a non qualifying HllUnion operation.
119119
* @param lgConfigK the configured value for the sketch.
120120
* @param numStdDev the given number of Standard Deviations. This must be an integer between
121121
* 1 and 3, inclusive.
@@ -206,8 +206,8 @@ public boolean isEstimationMode() {
206206
* inquire of the sketch if it has, in fact, moved itself.
207207
*
208208
* @param seg the given MemorySegment
209-
* @return true if the given MemorySegment refers to the same underlying resource as this sketch or
210-
* union.
209+
* @return true if the given MemorySegment refers to the same underlying resource as this HllSketch or
210+
* HllUnion.
211211
*/
212212
@Override
213213
public abstract boolean isSameResource(MemorySegment seg);
@@ -219,17 +219,17 @@ public boolean isEstimationMode() {
219219

220220
/**
221221
* Serializes this sketch as a byte array in compact form. The compact form is smaller in size
222-
* than the updatable form and read-only. It can be used in union operations as follows:
222+
* than the updatable form and read-only. It can be used in HllUnion operations as follows:
223223
* <pre>{@code
224-
* Union union; HllSketch sk, sk2;
224+
* HllUnion union; HllSketch sk, sk2;
225225
* int lgK = 12;
226226
* sk = new HllSketch(lgK, TgtHllType.HLL_4); //can be 4, 6, or 8
227227
* for (int i = 0; i < (2 << lgK); i++) { sk.update(i); }
228228
* byte[] arr = HllSketch.toCompactByteArray();
229229
* //...
230-
* union = Union.heapify(arr); //initializes the union using data from the array.
230+
* union = HllUnion.heapify(arr); //initializes the HllUnion using data from the array.
231231
* //OR, if used in an off-heap environment:
232-
* union = Union.heapify(MemorySegment.ofArray(arr)); //same as above, except from MemorySegment object.
232+
* union = HllUnion.heapify(MemorySegment.ofArray(arr)); //same as above, except from MemorySegment object.
233233
*
234234
* //To recover an updatable heap sketch:
235235
* sk2 = HllSketch.heapify(arr);
@@ -250,17 +250,17 @@ public boolean isEstimationMode() {
250250
/**
251251
* Serializes this sketch as a byte array in an updatable form. The updatable form is larger than
252252
* the compact form. The use of this form is primarily in environments that support updating
253-
* sketches in off-heap MemorySegment. If the sketch is constructed using HLL_8, sketch updating and
254-
* union updating operations can actually occur in MemorySegment, which can be off-heap:
253+
* sketches in off-heap MemorySegment. If the sketch is constructed using HLL_8, HllSketch updating and
254+
* HllUnion updating operations can actually occur in MemorySegment, which can be off-heap:
255255
* <pre>{@code
256-
* Union union; HllSketch sk;
256+
* HllUnion union; HllSketch sk;
257257
* int lgK = 12;
258258
* sk = new HllSketch(lgK, TgtHllType.HLL_8) //must be 8
259259
* for (int i = 0; i < (2 << lgK); i++) { sk.update(i); }
260260
* byte[] arr = sk.toUpdatableByteArray();
261261
* MemorySegment wseg = MemorySegment.wrap(arr);
262262
* //...
263-
* union = Union.writableWrap(wseg); //no deserialization!
263+
* union = HllUnion.writableWrap(wseg); //no deserialization!
264264
* }</pre>
265265
* @return this sketch as an updatable byte array.
266266
*/

src/main/java/org/apache/datasketches/hll/DirectHll4Array.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void putNibble(final int slotNo, final int nibValue) {
136136
}
137137

138138
@Override
139-
//Would be used by Union, but not used because the gadget is always HLL8 type
139+
//Would be used by HllUnion, but not used because the gadget is always HLL8 type
140140
void updateSlotNoKxQ(final int slotNo, final int newValue) {
141141
throw new SketchesStateException("Improper access.");
142142
}

src/main/java/org/apache/datasketches/hll/DirectHll6Array.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ void putNibble(final int slotNo, final int nibValue) {
8383
}
8484

8585
@Override
86-
//Would be used by Union, but not used because the gadget is always HLL8 type
86+
//Would be used by HllUnion, but not used because the gadget is always HLL8 type
8787
void updateSlotNoKxQ(final int slotNo, final int newValue) {
8888
throw new SketchesStateException("Improper access.");
8989
}

src/main/java/org/apache/datasketches/hll/DirectHll8Array.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ void putNibble(final int slotNo, final int nibValue) {
8686
}
8787

8888
@Override
89-
//Used by Union when source is not HLL8
89+
//Used by HllUnion when source is not HLL8
9090
void updateSlotNoKxQ(final int slotNo, final int newValue) {
9191
final int oldValue = getSlotValue(slotNo);
9292
if (newValue > oldValue) {

src/main/java/org/apache/datasketches/hll/Hll4Array.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ void putNibble(final int slotNo, final int nibValue) {
136136
}
137137

138138
@Override
139-
//Would be used by Union, but not used because the gadget is always HLL8 type
139+
//Would be used by HllUnion, but not used because the gadget is always HLL8 type
140140
void updateSlotNoKxQ(final int slotNo, final int newValue) {
141141
throw new SketchesStateException("Improper access.");
142142
}

src/main/java/org/apache/datasketches/hll/Hll6Array.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ void putNibble(final int slotNo, final int nibValue) {
9393
}
9494

9595
@Override
96-
//Would be used by Union, but not used because the gadget is always HLL8 type
96+
//Would be used by HllUnion, but not used because the gadget is always HLL8 type
9797
void updateSlotNoKxQ(final int slotNo, final int newValue) {
9898
throw new SketchesStateException("Improper access.");
9999
}

src/main/java/org/apache/datasketches/hll/Hll8Array.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ void putNibble(final int slotNo, final int nibValue) {
9292
}
9393

9494
@Override
95-
//Used by Union when source is not HLL8
95+
//Used by HllUnion when source is not HLL8
9696
void updateSlotNoKxQ(final int slotNo, final int newValue) {
9797
final int oldValue = getSlotValue(slotNo);
9898
hllByteArr[slotNo] = (byte) Math.max(newValue, oldValue);

0 commit comments

Comments
 (0)