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

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new a9281884 [SEDONA-211] Enforce release managers to use JDK 8 (#724)
a9281884 is described below

commit a9281884851c3e5859f69e153c662101a1fca466
Author: Jia Yu <[email protected]>
AuthorDate: Sat Dec 10 14:21:53 2022 -0800

    [SEDONA-211] Enforce release managers to use JDK 8 (#724)
---
 core/pom.xml                                        |  4 ----
 docs/community/release-manager.md                   | 21 +++++++++++++++++++--
 examples/rdd-colocation-mining/build.sbt            | 13 +++++--------
 examples/sql/build.sbt                              | 14 ++++++--------
 examples/sql/src/main/scala/ScalaExample.scala      |  8 ++++----
 examples/viz/build.sbt                              | 16 ++++++----------
 flink/pom.xml                                       |  8 ++++++++
 pom.xml                                             | 21 ++++++++++-----------
 viz/pom.xml                                         |  4 ++++
 .../apache/sedona/viz/core/BigBufferedImage.java    |  9 ++++++---
 10 files changed, 68 insertions(+), 50 deletions(-)

diff --git a/core/pom.xml b/core/pom.xml
index d9ce85cb..438a3c61 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -79,10 +79,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <configuration>
-                    <source>8</source>
-                    <target>8</target>
-                </configuration>
             </plugin>
         </plugins>
     </build>
diff --git a/docs/community/release-manager.md 
b/docs/community/release-manager.md
index 1a997eec..3e964ccb 100644
--- a/docs/community/release-manager.md
+++ b/docs/community/release-manager.md
@@ -4,10 +4,27 @@ You only need to perform these steps if this is your first 
time being a release
 
 ### 0. Software requirement
 
-* JDK 8 or 11. Other versions might cause problems.
-* Maven 3.X. Your Maven must point to the correct JDK version (8 or 11). Check 
it by `mvn --version`
+* JDK 8: `brew install openjdk@8`
+* Maven 3.X. Your Maven must point to JDK 8 (1.8). Check it by `mvn --version`
 * Git and SVN
 
+If your Maven (`mvn --version`) points to other JDK versions, you must change 
it to JDK 8. Steps are as follows:
+
+1. Find all Java installed on your machine: `/usr/libexec/java_home -V`. You 
should see multiple JDK versions including JDK 8.
+2. Run `whereis mvn` to get the installation location of your Maven. The 
result is a symlink to the actual location.
+3. Open it in the terminal (with `sudo` if needed). It will be like this
+```
+#!/bin/bash
+JAVA_HOME="${JAVA_HOME:-$(/usr/libexec/java_home)}" exec 
"/usr/local/Cellar/maven/3.6.3/libexec/bin/mvn" "$@"
+```
+4. Change `JAVA_HOME:-$(/usr/libexec/java_home)}` to 
`JAVA_HOME:-$(/usr/libexec/java_home -v 1.8)}`.  The resulting content will be 
like this:
+```
+#!/bin/bash
+JAVA_HOME="${JAVA_HOME:-$(/usr/libexec/java_home -v 1.8)}" exec 
"/usr/local/Cellar/maven/3.6.3/libexec/bin/mvn" "$@"
+```
+5. Run `mvn --version` again. It should now point to JDK 8.
+
+
 ### 1. Obtain Write Access to Sedona GitHub repo
 
 1. Verify you have a Github ID enabled with 2FA 
https://help.github.com/articles/securing-your-account-with-two-factor-authentication-2fa/
diff --git a/examples/rdd-colocation-mining/build.sbt 
b/examples/rdd-colocation-mining/build.sbt
index e4c8880a..d94d6ed7 100644
--- a/examples/rdd-colocation-mining/build.sbt
+++ b/examples/rdd-colocation-mining/build.sbt
@@ -33,20 +33,20 @@ lazy val root = (project in file(".")).
     publishMavenStyle := true
   )
 
-val SparkVersion = "3.2.0"
+val SparkVersion = "3.3.1"
 
 val SparkCompatibleVersion = "3.0"
 
 val HadoopVersion = "2.7.2"
 
-val SedonaVersion = "1.1.1-incubating"
+val SedonaVersion = "1.3.1-incubating-SNAPSHOT"
 
 val ScalaCompatibleVersion = "2.12"
 
 // Change the dependency scope to "provided" when you run "sbt assembly"
 val dependencyScope = "compile"
 
-val geotoolsVersion = "1.1.0-25.2"
+val geotoolsVersion = "1.3.0-27.2"
 
 //val jacksonVersion = "2.10.0"
 
@@ -62,11 +62,8 @@ libraryDependencies ++= Seq(
   "org.apache.hadoop" % "hadoop-mapreduce-client-core" % HadoopVersion % 
dependencyScope,
   "org.apache.hadoop" % "hadoop-common" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-hdfs" % HadoopVersion % dependencyScope,
-  "org.apache.sedona" % 
"sedona-core-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion,
-  "org.apache.sedona" % 
"sedona-sql-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion ,
-  "org.apache.sedona" % 
"sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion,
-  "org.locationtech.jts"% "jts-core"% "1.18.0" % "compile",
-  "org.wololo" % "jts2geojson" % "0.14.3" % "compile", // Only needed if you 
read GeoJSON files. Under MIT License
+  "org.apache.sedona" % 
"sedona-python-adapter-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion changing(),
+  "org.apache.sedona" % 
"sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion changing(),
   //  The following GeoTools packages are only required if you need CRS 
transformation. Under GNU Lesser General Public License (LGPL) license
   "org.datasyslab" % "geotools-wrapper" % geotoolsVersion % "compile"
 )
diff --git a/examples/sql/build.sbt b/examples/sql/build.sbt
index fcd440b8..17b1b2a4 100644
--- a/examples/sql/build.sbt
+++ b/examples/sql/build.sbt
@@ -16,6 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
+
 import sbt.Keys.{libraryDependencies, version}
 
 
@@ -32,20 +33,20 @@ lazy val root = (project in file(".")).
     publishMavenStyle := true
   )
 
-val SparkVersion = "3.2.0"
+val SparkVersion = "3.3.1"
 
 val SparkCompatibleVersion = "3.0"
 
 val HadoopVersion = "2.7.2"
 
-val SedonaVersion = "1.1.1-incubating"
+val SedonaVersion = "1.3.1-incubating-SNAPSHOT"
 
 val ScalaCompatibleVersion = "2.12"
 
 // Change the dependency scope to "provided" when you run "sbt assembly"
 val dependencyScope = "compile"
 
-val geotoolsVersion = "1.1.0-25.2"
+val geotoolsVersion = "1.3.0-27.2"
 
 //val jacksonVersion = "2.10.0"
 
@@ -61,11 +62,8 @@ libraryDependencies ++= Seq(
   "org.apache.hadoop" % "hadoop-mapreduce-client-core" % HadoopVersion % 
dependencyScope,
   "org.apache.hadoop" % "hadoop-common" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-hdfs" % HadoopVersion % dependencyScope,
-  "org.apache.sedona" % 
"sedona-core-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion,
-  "org.apache.sedona" % 
"sedona-sql-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion ,
-  "org.apache.sedona" % 
"sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion,
-  "org.locationtech.jts"% "jts-core"% "1.18.0" % "compile",
-  "org.wololo" % "jts2geojson" % "0.14.3" % "compile", // Only needed if you 
read GeoJSON files. Under MIT License
+  "org.apache.sedona" % 
"sedona-python-adapter-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion changing(),
+  "org.apache.sedona" % 
"sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion changing(),
   //  The following GeoTools packages are only required if you need CRS 
transformation. Under GNU Lesser General Public License (LGPL) license
   "org.datasyslab" % "geotools-wrapper" % geotoolsVersion % "compile"
 )
diff --git a/examples/sql/src/main/scala/ScalaExample.scala 
b/examples/sql/src/main/scala/ScalaExample.scala
index 362d611e..4b3f4576 100644
--- a/examples/sql/src/main/scala/ScalaExample.scala
+++ b/examples/sql/src/main/scala/ScalaExample.scala
@@ -57,7 +57,7 @@ object ScalaExample extends App{
 
   def testPredicatePushdownAndRangeJonQuery():Unit =
   {
-    val sedonaConf = new SedonaConf(sparkSession.sparkContext.getConf)
+    val sedonaConf = new SedonaConf(sparkSession.conf)
     println(sedonaConf)
 
     var polygonCsvDf = 
sparkSession.read.format("csv").option("delimiter",",").option("header","false").load(csvPolygonInputLocation)
@@ -84,7 +84,7 @@ object ScalaExample extends App{
 
   def testDistanceJoinQuery(): Unit =
   {
-    val sedonaConf = new SedonaConf(sparkSession.sparkContext.getConf)
+    val sedonaConf = new SedonaConf(sparkSession.conf)
     println(sedonaConf)
 
     var pointCsvDF1 = 
sparkSession.read.format("csv").option("delimiter",",").option("header","false").load(csvPointInputLocation)
@@ -109,7 +109,7 @@ object ScalaExample extends App{
 
   def testAggregateFunction(): Unit =
   {
-    val sedonaConf = new SedonaConf(sparkSession.sparkContext.getConf)
+    val sedonaConf = new SedonaConf(sparkSession.conf)
     println(sedonaConf)
 
     var pointCsvDF = 
sparkSession.read.format("csv").option("delimiter",",").option("header","false").load(csvPointInputLocation)
@@ -145,7 +145,7 @@ object ScalaExample extends App{
   def testRasterIOAndMapAlgebra(): Unit = {
     var df = sparkSession.read.format("geotiff").option("dropInvalid", 
true).load(rasterdatalocation)
     df.printSchema()
-    df.selectExpr("image.origin as origin","ST_GeomFromWkt(image.wkt) as 
Geom", "image.height as height", "image.width as width", "image.data as data", 
"image.nBands as numBands").show()
+    df.selectExpr("image.origin as origin","ST_GeomFromWkt(image.geometry) as 
Geom", "image.height as height", "image.width as width", "image.data as data", 
"image.nBands as numBands").show()
     df = df.selectExpr(" image.data as data", "image.nBands as numBands")
     df = df.selectExpr("RS_GetBand(data, 1, numBands) as targetBand")
     df.selectExpr("RS_MultiplyFactor(targetBand, 3) as multiply").show()
diff --git a/examples/viz/build.sbt b/examples/viz/build.sbt
index 7df481a9..42055ba3 100644
--- a/examples/viz/build.sbt
+++ b/examples/viz/build.sbt
@@ -20,7 +20,6 @@
 import sbt.Keys.{libraryDependencies, version}
 
 
-
 lazy val root = (project in file(".")).
   settings(
     name := "SedonaVizTemplate",
@@ -29,25 +28,25 @@ lazy val root = (project in file(".")).
 
     scalaVersion := "2.12.11",
 
-    organization  := "org.apache.sedona",
+    organization := "org.apache.sedona",
 
     publishMavenStyle := true
   )
 
-val SparkVersion = "3.1.2"
+val SparkVersion = "3.3.1"
 
 val SparkCompatibleVersion = "3.0"
 
 val HadoopVersion = "2.7.2"
 
-val SedonaVersion = "1.1.1-incubating"
+val SedonaVersion = "1.3.1-incubating-SNAPSHOT"
 
 val ScalaCompatibleVersion = "2.12"
 
 // Change the dependency scope to "provided" when you run "sbt assembly"
 val dependencyScope = "compile"
 
-val geotoolsVersion = "1.1.0-25.2"
+val geotoolsVersion = "1.3.0-27.2"
 
 //val jacksonVersion = "2.10.0"
 
@@ -63,11 +62,8 @@ libraryDependencies ++= Seq(
   "org.apache.hadoop" % "hadoop-mapreduce-client-core" % HadoopVersion % 
dependencyScope,
   "org.apache.hadoop" % "hadoop-common" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-hdfs" % HadoopVersion % dependencyScope,
-  "org.apache.sedona" % 
"sedona-core-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion,
-  "org.apache.sedona" % 
"sedona-sql-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion ,
-  "org.apache.sedona" % 
"sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion,
-  "org.locationtech.jts"% "jts-core"% "1.18.0" % "compile",
-  "org.wololo" % "jts2geojson" % "0.14.3" % "compile", // Only needed if you 
read GeoJSON files. Under MIT License
+  "org.apache.sedona" % 
"sedona-python-adapter-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion changing(),
+  "org.apache.sedona" % 
"sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion)
 % SedonaVersion changing(),
   //  The following GeoTools packages are only required if you need CRS 
transformation. Under GNU Lesser General Public License (LGPL) license
   "org.datasyslab" % "geotools-wrapper" % geotoolsVersion % "compile"
 )
diff --git a/flink/pom.xml b/flink/pom.xml
index d76869ad..c4bdefec 100644
--- a/flink/pom.xml
+++ b/flink/pom.xml
@@ -117,6 +117,14 @@
             <scope>compile</scope>
         </dependency>
     </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+            </plugin>
+        </plugins>
+    </build>
 <!--   <build>-->
 <!--        <sourceDirectory>src/main/scala</sourceDirectory>-->
 <!--        <plugins>-->
diff --git a/pom.xml b/pom.xml
index 1d7f6ac0..0bda46b4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@
         <sedona.jackson.version>2.13.3</sedona.jackson.version>
         <hadoop.version>3.2.4</hadoop.version>
         <maven.deploy.skip>false</maven.deploy.skip>
-
+        <maven.compiler.plugin.version>3.10.1</maven.compiler.plugin.version>
         <!-- Actual scala version will be set by a profile.
         Setting a default value helps IDE:s that can't make sense of profiles. 
-->
         <scala.compat.version>2.12</scala.compat.version>
@@ -299,11 +299,19 @@
                 <plugin>
                     <groupId>org.apache.maven.plugins</groupId>
                     <artifactId>maven-compiler-plugin</artifactId>
-                    <version>3.1</version>
+                    <version>${maven.compiler.plugin.version}</version>
                     <configuration>
                         <source>1.8</source>
                         <target>1.8</target>
                     </configuration>
+                    <executions>
+                        <execution>
+                            <phase>compile</phase>
+                            <goals>
+                                <goal>compile</goal>
+                            </goals>
+                        </execution>
+                    </executions>
                 </plugin>
             </plugins>
         </pluginManagement>
@@ -348,15 +356,6 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
-                <version>3.8.1</version>
-                <executions>
-                    <execution>
-                        <phase>compile</phase>
-                        <goals>
-                            <goal>compile</goal>
-                        </goals>
-                    </execution>
-                </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
diff --git a/viz/pom.xml b/viz/pom.xml
index 6b4ba770..ac2dc302 100644
--- a/viz/pom.xml
+++ b/viz/pom.xml
@@ -70,6 +70,10 @@
        <build>
         <sourceDirectory>src/main/java</sourceDirectory>
         <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+            </plugin>
             <plugin>
                 <groupId>org.scalastyle</groupId>
                 <artifactId>scalastyle-maven-plugin</artifactId>
diff --git a/viz/src/main/java/org/apache/sedona/viz/core/BigBufferedImage.java 
b/viz/src/main/java/org/apache/sedona/viz/core/BigBufferedImage.java
index 9e958f84..28d73b9b 100644
--- a/viz/src/main/java/org/apache/sedona/viz/core/BigBufferedImage.java
+++ b/viz/src/main/java/org/apache/sedona/viz/core/BigBufferedImage.java
@@ -29,8 +29,6 @@ package org.apache.sedona.viz.core;
  * http://nyomdmegteis.hu/en/
  */
 
-import sun.nio.ch.DirectBuffer;
-
 import javax.imageio.ImageIO;
 import javax.imageio.ImageReadParam;
 import javax.imageio.ImageReader;
@@ -517,7 +515,12 @@ public class BigBufferedImage
             FileDataBufferDeleterHook.undisposedBuffers.remove(this);
             if (disposedBuffer != null) {
                 for (MappedByteBuffer b : disposedBuffer) {
-                    ((DirectBuffer) b).cleaner().clean();
+                    // This method does not actually erase the data in the 
buffer,
+                    // but it is named as if it did because it will most often 
be used in situations
+                    // in which that might as well be the case
+                    // The original method uses the ((DirectBuffer) 
b).cleaner().clean(), which is
+                    // no longer available since Java 9
+                    b.clear();
                 }
             }
             if (accessFiles != null) {

Reply via email to