Skip to content

Commit c57687b

Browse files
committed
Update README.md
1 parent 34aaa8b commit c57687b

File tree

1 file changed

+17
-81
lines changed

1 file changed

+17
-81
lines changed

README.md

Lines changed: 17 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@
2525
# Apache<sup>&reg;</sup> DataSketches&trade; Core Java Library Component
2626
This is the core Java component of the DataSketches library. It contains all of the sketching algorithms and can be accessed directly from user applications.
2727

28-
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) and the [Apache Hive adaptor](https://github.com/apache/datasketches-hive).
28+
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

3030
Note that we have a parallel core component for C++ and Python implementations of the same sketch algorithms,
31-
[datasketches-cpp](https://github.com/apache/datasketches-cpp).
31+
[datasketches-cpp](https://github.com/apache/datasketches-cpp) and [datasketches-python](https://github.com/apache/datasketches-python)
3232

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

@@ -39,30 +39,29 @@ If you are interested in making contributions to this site please see our [Commu
3939
## Maven Build Instructions
4040
__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)
4141

42-
### A JDK8 with Hotspot or JDK11 with Hotspot is required to compile
43-
This component depends on the [datasketches-memory](https://github.com/apache/datasketches-memory) component,
44-
and, as a result, must be compiled with one of the above JDKs.
45-
If your application only relies on the APIs of this component no special JVM arguments are required.
46-
However, if your application also directly relies on the APIs of the *datasketches-memory* component,
47-
you may need additional JVM arguments.
48-
Please refer to the [datasketches-memory README](https://github.com/apache/datasketches-memory/blob/master/README.md) for details.
42+
### JDK17 is required to compile
43+
This component depends on the [datasketches-memory-4.1.X](https://github.com/apache/datasketches-memory/tree/4.1.X) component,
44+
and, as a result, must be compiled with JDK17 and this dependency:
4945

50-
If your application uses Maven, you can also use the *pom.xml* of this component as an example of how to automatically
51-
configure the JVM arguments for compilation and testing based on the version of the JDK.
46+
```
47+
<dependency>
48+
<groupId>org.apache.datasketches</groupId>
49+
<artifactId>datasketches-memory</artifactId>
50+
<version>4.1.0</version>
51+
</dependency>
52+
```
53+
54+
If your application only relies on the APIs of datasketches-java no special JVM arguments are required.
55+
However, if your application also directly relies on the APIs of the *datasketches-memory* component,
56+
you may need the additional JVM argument **--enable-preview**.
5257

5358
### Recommended Build Tool
5459
This DataSketches component is structured as a Maven project and Maven is the recommended Build Tool.
5560

56-
There are two types of tests: normal unit tests and tests run by the strict profile.
57-
5861
To run normal unit tests:
5962

6063
$ mvn clean test
6164

62-
To run the strict profile tests (only supported in Java 8):
63-
64-
$ mvn clean test -P strict
65-
6665
To install jars built from the downloaded source:
6766

6867
$ mvn clean install -DskipTests=true
@@ -80,74 +79,11 @@ This will create the following jars:
8079
#### Run-time
8180
There is one run-time dependency:
8281

83-
* org.apache.datasketches : datasketches-memory
82+
* [datasketches-memory-4.1.X](https://github.com/apache/datasketches-memory/tree/4.1.X)
8483

8584
#### Testing
8685
See the pom.xml file for test dependencies.
8786

88-
## Special Build / Test Instructions for Eclipse
89-
90-
Building and running tests using JDK 8 should not be a problem.
91-
92-
However, with JDK 9+, and Eclipse versions up to and including 4.22.0 (2021-12), Eclipse fails to translate the required JPMS JVM arguments specified in the POM compiler or surefire plugins into the *.classpath* file, causing illegal reflection access errors
93-
[eclipse-m2e/m2e-core Bug 543631](https://github.com/eclipse-m2e/m2e-core/issues/129).
94-
95-
There are two ways to fix this:
96-
97-
#### Method 1: Manually update *.classpath* file:
98-
Open the *.classpath* file in a text editor and find the following *classpathentry* element (this assumes JDK11, change to suit):
99-
100-
```
101-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
102-
<attributes>
103-
<attribute name="module" value="true"/>
104-
<attribute name="maven.pomderived" value="true"/>
105-
</attributes>
106-
</classpathentry>
107-
```
108-
Then edit it as follows:
109-
110-
```
111-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11">
112-
<attributes>
113-
<attribute name="module" value="true"/>
114-
<attribute name="add-exports" value="java.base/jdk.internal.misc=ALL-UNNAMED:java.base/jdk.internal.ref=ALL-UNNAMED"/>
115-
<attribute name="add-opens" value="java.base/java.nio=ALL-UNNAMED:java.base/sun.nio.ch=ALL-UNNAMED"/>
116-
<attribute name="maven.pomderived" value="true"/>
117-
</attributes>
118-
</classpathentry>
119-
```
120-
Finally, *refresh*.
121-
122-
#### Method 2: Manually update *Module Dependencies*
123-
124-
In Eclipse, open the project *Properties / Java Build Path / Module Dependencies ...*
125-
126-
* Select *java.base*
127-
* Select *Configured details*
128-
* Select *Expose Package...*
129-
* Enter *Package* = java.nio
130-
* Enter *Target module* = ALL-UNNAMED
131-
* Select button: *opens*
132-
* Hit *OK*
133-
* Select *Expose Package...*
134-
* Enter *Package* = jdk.internal.misc
135-
* Enter *Target module* = ALL-UNNAMED
136-
* Select button: *exports*
137-
* Hit *OK*
138-
* Select *Expose Package...*
139-
* Enter *Package* = jdk.internal.ref
140-
* Enter *Target module* = ALL-UNNAMED
141-
* Select button: *exports*
142-
* Hit *OK*
143-
* Select *Expose Package...*
144-
* Enter *Package* = sun.nio.ch
145-
* Enter *Target module* = ALL-UNNAMED
146-
* Select button: *opens*
147-
* Hit *OK*
148-
149-
**NOTE:** If you execute *Maven/Update Project...* from Eclipse with the option *Update project configuration from pom.xml* checked, all of the above will be erased, and you will have to redo it.
150-
15187
## Known Issues
15288

15389
#### SpotBugs

0 commit comments

Comments
 (0)