You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@fury.apache.org by ch...@apache.org on 2024/04/01 05:19:48 UTC
(incubator-fury) branch main updated (9341868c -> b9e0b70b)
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git
omit 9341868c chore: update rules (#1448)
omit 37d34340 fix: add license header to build.sbt (#1442)
omit 59da6e90 feat(java): add openj9 ci (#1437)
omit 09583c90 fix(java): fix illegal classname caused by negative hash (#1436)
new 286b9147 fix(java): fix illegal classname caused by negative hash (#1436)
new cf1a7cda feat(java): add openj9 ci (#1437)
new 94cd225e fix: add license header to build.sbt (#1442)
new b9e0b70b chore: update rules (#1448)
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (9341868c)
\
N -- N -- N refs/heads/main (b9e0b70b)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.asf.yaml | 7 +++++++
1 file changed, 7 insertions(+)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
(incubator-fury) 03/04: fix: add license header to build.sbt (#1442)
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git
commit 94cd225eb3f4910fe036fcbc4dab08169be897f9
Author: chaokunyang <ch...@apache.org>
AuthorDate: Sun Mar 31 18:31:27 2024 +0200
fix: add license header to build.sbt (#1442)
ideally all files should have license headers
relates to #1441
---
scala/build.sbt | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/scala/build.sbt b/scala/build.sbt
index d4d7b188..892c01c5 100644
--- a/scala/build.sbt
+++ b/scala/build.sbt
@@ -1,3 +1,21 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
name := "fury-scala"
scalaVersion := "2.13.13"
crossScalaVersions := Seq("2.13.12", "3.3.3")
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
(incubator-fury) 02/04: feat(java): add openj9 ci (#1437)
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git
commit cf1a7cda62e261905cce960d3f66e20c9b96e483
Author: chaokunyang <ch...@apache.org>
AuthorDate: Sun Mar 31 13:13:32 2024 +0800
feat(java): add openj9 ci (#1437)
This PR add openj9 ci, since we have openj9 users, see #1433 . Class GC
in linux distribution are not supported in this PR.
---
.github/workflows/ci.yml | 25 +++++++++++++++++++++-
.../org/apache/fury/util/unsafe/_JDKAccess.java | 4 ++--
.../java/org/apache/fury/util/unsafe/_Lookup.java | 2 +-
.../src/test/java/org/apache/fury/TestUtils.java | 5 +++++
4 files changed, 32 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index a200dc4f..bff362f2 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -62,7 +62,30 @@ jobs:
run: ./ci/run_ci.sh install_pyfury
- name: Run CI with Maven
run: ./ci/run_ci.sh java${{ matrix.java-version }}
-
+ openj9:
+ name: Openj9 Java CI
+ runs-on: ubuntu-latest
+ env:
+ MY_VAR: "PATH"
+ strategy:
+ matrix:
+ # String in openj9 1.8 share byte array by offset, fury doesn't allow it.
+ java-version: ["21"]
+ steps:
+ - uses: actions/checkout@v4
+ - name: Set up JDK ${{ matrix.java-version }}
+ uses: actions/setup-java@v4
+ with:
+ java-version: ${{ matrix.java-version }}
+ distribution: 'adopt-openj9'
+ - name: Install bazel
+ run: ./ci/run_ci.sh install_bazel
+ - name: Install python
+ run: ./ci/run_ci.sh install_python
+ - name: Install pyfury
+ run: ./ci/run_ci.sh install_pyfury
+ - name: Run CI with Maven
+ run: ./ci/run_ci.sh java${{ matrix.java-version }}
graalvm:
name: GraalVM CI
runs-on: ubuntu-latest
diff --git a/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_JDKAccess.java b/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_JDKAccess.java
index e7d3b0de..dd429197 100644
--- a/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_JDKAccess.java
+++ b/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_JDKAccess.java
@@ -54,7 +54,7 @@ import sun.misc.Unsafe;
public class _JDKAccess {
// CHECKSTYLE.ON:TypeName
public static final int JAVA_VERSION;
- public static final boolean OPEN_J9;
+ public static final boolean IS_OPEN_J9;
public static final Unsafe UNSAFE;
public static final Class<?> _INNER_UNSAFE_CLASS;
public static final Object _INNER_UNSAFE;
@@ -65,7 +65,7 @@ public class _JDKAccess {
property = property.substring(2);
}
String jmvName = System.getProperty("java.vm.name", "");
- OPEN_J9 = jmvName.contains("OpenJ9");
+ IS_OPEN_J9 = jmvName.contains("OpenJ9");
JAVA_VERSION = Integer.parseInt(property);
Unsafe unsafe;
try {
diff --git a/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_Lookup.java b/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_Lookup.java
index 16ddedb1..7ade95e0 100644
--- a/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_Lookup.java
+++ b/java/fury-core/src/main/java/org/apache/fury/util/unsafe/_Lookup.java
@@ -72,7 +72,7 @@ class _Lookup {
}
int fullAccessMask = 31; // for IBM Open J9 JDK
return (Lookup)
- constructor.invoke(objectClass, _JDKAccess.OPEN_J9 ? fullAccessMask : trusted);
+ constructor.invoke(objectClass, _JDKAccess.IS_OPEN_J9 ? fullAccessMask : trusted);
} else {
if (constructor == null) {
constructor =
diff --git a/java/fury-core/src/test/java/org/apache/fury/TestUtils.java b/java/fury-core/src/test/java/org/apache/fury/TestUtils.java
index b45d3707..97050684 100644
--- a/java/fury-core/src/test/java/org/apache/fury/TestUtils.java
+++ b/java/fury-core/src/test/java/org/apache/fury/TestUtils.java
@@ -28,6 +28,8 @@ import java.util.ArrayList;
import java.util.function.Supplier;
import org.apache.fury.util.FieldAccessor;
import org.apache.fury.util.ReflectionUtils;
+import org.apache.fury.util.unsafe._JDKAccess;
+import org.testng.SkipException;
/** Test utils. */
public class TestUtils {
@@ -47,6 +49,9 @@ public class TestUtils {
* @param predicate whether stop Trigger OOM.
*/
public static void triggerOOMForSoftGC(Supplier<Boolean> predicate) {
+ if (_JDKAccess.IS_OPEN_J9) {
+ throw new SkipException("OpenJ9 unsupported");
+ }
System.gc();
while (predicate.get()) {
triggerOOM();
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
(incubator-fury) 04/04: chore: update rules (#1448)
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git
commit b9e0b70b902a5258eaf97b705d4408f10f31bb5a
Author: Shawn Yang <sh...@gmail.com>
AuthorDate: Mon Apr 1 13:11:54 2024 +0800
chore: update rules (#1448)
---
.asf.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.asf.yaml b/.asf.yaml
index b35272ad..8e7acb26 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -61,7 +61,7 @@ github:
releases-0.2.1: {}
releases-0.2.0: {}
releases-0.1.2: {}
-
+
notifications:
commits: commits@fury.apache.org
issues: commits@fury.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org
(incubator-fury) 01/04: fix(java): fix illegal classname caused by negative hash (#1436)
Posted by ch...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
chaokunyang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git
commit 286b9147a1393f5c7bafd549bdd1a8366b0cef8d
Author: chaokunyang <ch...@apache.org>
AuthorDate: Sat Mar 30 22:00:00 2024 +0800
fix(java): fix illegal classname caused by negative hash (#1436)
Closes #1433
---
.../src/main/java/org/apache/fury/codegen/CodeGenerator.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/java/fury-core/src/main/java/org/apache/fury/codegen/CodeGenerator.java b/java/fury-core/src/main/java/org/apache/fury/codegen/CodeGenerator.java
index da3bc7e0..397ddca4 100644
--- a/java/fury-core/src/main/java/org/apache/fury/codegen/CodeGenerator.java
+++ b/java/fury-core/src/main/java/org/apache/fury/codegen/CodeGenerator.java
@@ -344,10 +344,12 @@ public class CodeGenerator {
}
// classLoader will be null for jdk classes.
ClassLoader classLoader = cls.getClassLoader();
+ // Hashcode may be negative in open-j9 jdk. While using `abs` to remove sign works fine too.
+ // it's still possible that hashCodes of two objects only differ in sign.
if (classLoader == null) {
- return String.valueOf(cls.hashCode());
+ return String.valueOf(cls.hashCode()).replace("-", "_");
} else {
- return String.format("%s_%s", classLoader.hashCode(), cls.hashCode());
+ return String.format("%s_%s", classLoader.hashCode(), cls.hashCode()).replace("-", "_");
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@fury.apache.org
For additional commands, e-mail: commits-help@fury.apache.org