(fury) branch main updated: build: publish jars for fury-scala (#1729)

2024-07-10 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 81b98438 build: publish jars for fury-scala (#1729)
81b98438 is described below

commit 81b9843827bf01ffa6a6f6a5049dd7c3882c569b
Author: PJ Fanning 
AuthorDate: Wed Jul 10 16:07:21 2024 +0100

build: publish jars for fury-scala (#1729)

This PR uses https://github.com/mdedetrich/sbt-apache-sonatype to
support publishing fury-scala jars to Apache's Nexus repository.

`sbt +publishSigned`

requires that you set NEXUS_USER and NEXUS_PW environment variables to
provide your Apache username and password.

I have used my PR code to publish some snapshots to
https://repository.apache.org/content/groups/snapshots/org/apache/fury/
---
 scala/build.sbt  | 23 ---
 scala/{build.sbt => project/plugins.sbt} | 16 +++-
 2 files changed, 23 insertions(+), 16 deletions(-)

diff --git a/scala/build.sbt b/scala/build.sbt
index f3cf2b59..60c966d0 100644
--- a/scala/build.sbt
+++ b/scala/build.sbt
@@ -16,16 +16,33 @@
  * limitations under the License.
  */
 
-name := "fury-scala"
+val furyVersion = "0.6.0-SNAPSHOT"
 val scala213Version = "2.13.14"
+ThisBuild / apacheSonatypeProjectProfile := "fury"
+version := furyVersion
 scalaVersion := scala213Version
 crossScalaVersions := Seq(scala213Version, "3.3.3")
 
+lazy val root = Project(id = "fury-scala", base = file("."))
+  .settings(
+name := "fury-scala",
+apacheSonatypeLicenseFile := baseDirectory.value / ".." / "LICENSE",
+apacheSonatypeNoticeFile := baseDirectory.value / ".." / "NOTICE",
+apacheSonatypeDisclaimerFile := Some(baseDirectory.value / ".." / 
"DISCLAIMER"),
+description := "Apache Fury(Incubating) is a blazingly fast multi-language 
serialization framework powered by JIT and zero-copy.",
+homepage := Some(url("https://fury.apache.org/;)),
+startYear := Some(2024),
+developers := List(
+  Developer(
+"fury-contributors",
+"Apache Fury(Incubating) Contributors",
+"d...@fury.apache.org",
+url("https://github.com/apache/fury/graphs/contributors;
+
 resolvers += Resolver.mavenLocal
 resolvers += Resolver.ApacheMavenSnapshotsRepo
 
-val furyVersion = "0.6.0-SNAPSHOT"
 libraryDependencies ++= Seq(
   "org.apache.fury" % "fury-core" % furyVersion,
-  "org.scalatest" %% "scalatest" % "3.2.19",
+  "org.scalatest" %% "scalatest" % "3.2.19" % Test,
 )
diff --git a/scala/build.sbt b/scala/project/plugins.sbt
similarity index 68%
copy from scala/build.sbt
copy to scala/project/plugins.sbt
index f3cf2b59..1fd06159 100644
--- a/scala/build.sbt
+++ b/scala/project/plugins.sbt
@@ -16,16 +16,6 @@
  * limitations under the License.
  */
 
-name := "fury-scala"
-val scala213Version = "2.13.14"
-scalaVersion := scala213Version
-crossScalaVersions := Seq(scala213Version, "3.3.3")
-
-resolvers += Resolver.mavenLocal
-resolvers += Resolver.ApacheMavenSnapshotsRepo
-
-val furyVersion = "0.6.0-SNAPSHOT"
-libraryDependencies ++= Seq(
-  "org.apache.fury" % "fury-core" % furyVersion,
-  "org.scalatest" %% "scalatest" % "3.2.19",
-)
+addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")
+addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
+addSbtPlugin("org.mdedetrich" % "sbt-apache-sonatype" % "0.1.11")


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: build: update scala build (#1725)

2024-07-08 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new e07c51ea build: update scala build (#1725)
e07c51ea is described below

commit e07c51eae2caa9616f5eb624b95d0c727263c14f
Author: PJ Fanning 
AuthorDate: Tue Jul 9 03:32:17 2024 +0100

build: update scala build (#1725)

* sbt 1.10.0
* scalatest 3.2.19
* scala 2.13.14
* add Apache Snapshot Repo resolver so you don't need to build the Java
jars, the build can get them from the snapshot repo
---
 scala/build.sbt| 9 ++---
 scala/project/build.properties | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/scala/build.sbt b/scala/build.sbt
index 9f19df8d..f3cf2b59 100644
--- a/scala/build.sbt
+++ b/scala/build.sbt
@@ -17,12 +17,15 @@
  */
 
 name := "fury-scala"
-scalaVersion := "2.13.13"
-crossScalaVersions := Seq("2.13.12", "3.3.3")
+val scala213Version = "2.13.14"
+scalaVersion := scala213Version
+crossScalaVersions := Seq(scala213Version, "3.3.3")
+
 resolvers += Resolver.mavenLocal
+resolvers += Resolver.ApacheMavenSnapshotsRepo
 
 val furyVersion = "0.6.0-SNAPSHOT"
 libraryDependencies ++= Seq(
   "org.apache.fury" % "fury-core" % furyVersion,
-  "org.scalatest" %% "scalatest" % "3.2.17",
+  "org.scalatest" %% "scalatest" % "3.2.19",
 )
diff --git a/scala/project/build.properties b/scala/project/build.properties
index c12725b4..e18e3ab3 100644
--- a/scala/project/build.properties
+++ b/scala/project/build.properties
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License.
 
-sbt.version=1.9.9
+sbt.version=1.10.0


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: feat(Python): meta string encoding algorithm in Python (#1702)

2024-07-08 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 15e25bde feat(Python): meta string encoding algorithm in Python (#1702)
15e25bde is described below

commit 15e25bde36957a7b61b475c74c47cf95e16ea46d
Author: PAN <46820719+pandale...@users.noreply.github.com>
AuthorDate: Mon Jul 8 21:40:38 2024 +0800

feat(Python): meta string encoding algorithm in Python (#1702)



## What does this PR do?
The Python algorithm for meta string is implemented and has passed all
13 tests
https://github.com/apache/fury/assets/46820719/0a23c236-8fe1-4a31-9d44-263982f5c15c;>

I am not familiar with Python, there may be a few problems, but the
overall code is relatively complete

How to have a better implementation, I would also like to improve it, I
like this projectBut I think this test environment is relatively bad,
and I feel that it can be further built




## Related issues
Closes #1541




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 python/pyfury/meta/__init__.py |  16 ++
 python/pyfury/meta/metastring.py   | 510 +
 python/pyfury/tests/test_metastring.py | 193 +
 3 files changed, 719 insertions(+)

diff --git a/python/pyfury/meta/__init__.py b/python/pyfury/meta/__init__.py
new file mode 100644
index ..13a83393
--- /dev/null
+++ b/python/pyfury/meta/__init__.py
@@ -0,0 +1,16 @@
+# 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.
diff --git a/python/pyfury/meta/metastring.py b/python/pyfury/meta/metastring.py
new file mode 100644
index ..63232b56
--- /dev/null
+++ b/python/pyfury/meta/metastring.py
@@ -0,0 +1,510 @@
+# 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.
+
+from collections import namedtuple
+from enum import Enum
+from typing import List
+
+
+class Encoding(Enum):
+"""
+Defines the types of supported encodings for MetaStrings.
+"""
+
+UTF_8 = 0x00
+LOWER_SPECIAL = 0x01
+LOWER_UPPER_DIGIT_SPECIAL = 0x02
+FIRST_TO_LOWER_SPECIAL = 0x03
+ALL_TO_LOWER_SPECIAL = 0x04
+
+
+Statistics = namedtuple(
+"Statistics",
+[
+"can_lower_upper_digit_special_encoded",
+"can_lower_special_encoded",
+"digit_count",
+"upper_count",
+],
+)
+
+# _METASTRING_NUM_CHARS_LIMIT is used to check whether the length of the value 
is valid.
+_METASTRING_NUM_CHARS_LIMIT = 32767
+
+
+class MetaString:
+def __init__(
+self, original: str, encoding: Encoding, encoded_data: bytes, length: 
int
+):
+self.original = original
+self.encoding = encoding
+self.encoded_data = encoded_data
+self.length = length
+if self.encoding != Encoding.UTF_8:
+self.strip_last_char = (encoded_data[0] & 0x80) != 0
+else:
+self.strip_last_char = False
+
+
+class MetaStringDecoder:
+"""
+Decodes MetaString objects back 

(fury) branch main updated: fix(java): fix fastjson object serialization (#1717)

2024-06-30 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 0c9dcc20 fix(java): fix fastjson object serialization (#1717)
0c9dcc20 is described below

commit 0c9dcc2056b332e73584d2f7cddf3b412d0699c7
Author: Shawn Yang 
AuthorDate: Sun Jun 30 23:02:52 2024 +0800

fix(java): fix fastjson object serialization (#1717)

## What does this PR do?

Closes #1716

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/resolver/ClassResolver.java|  3 +
 java/fury-testsuite/pom.xml|  6 ++
 .../java/org/apache/fury/test/FastJsonTest.java| 83 ++
 3 files changed, 92 insertions(+)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java 
b/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
index 58ea84aa..e8147a49 100644
--- a/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
+++ b/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
@@ -839,6 +839,9 @@ public class ClassResolver {
   } else if (ByteBuffer.class.isAssignableFrom(cls)) {
 return BufferSerializers.ByteBufferSerializer.class;
   }
+  if (shimDispatcher.contains(cls)) {
+return shimDispatcher.getSerializer(cls).getClass();
+  }
   if (fury.getConfig().checkJdkClassSerializable()) {
 if (cls.getName().startsWith("java") && 
!(Serializable.class.isAssignableFrom(cls))) {
   throw new UnsupportedOperationException(
diff --git a/java/fury-testsuite/pom.xml b/java/fury-testsuite/pom.xml
index 06010039..62fea8d6 100644
--- a/java/fury-testsuite/pom.xml
+++ b/java/fury-testsuite/pom.xml
@@ -105,6 +105,12 @@
   3.2.1
   test
 
+
+  com.alibaba
+  fastjson
+  1.2.83
+  test
+
   
 
   
diff --git 
a/java/fury-testsuite/src/test/java/org/apache/fury/test/FastJsonTest.java 
b/java/fury-testsuite/src/test/java/org/apache/fury/test/FastJsonTest.java
new file mode 100644
index ..ae539764
--- /dev/null
+++ b/java/fury-testsuite/src/test/java/org/apache/fury/test/FastJsonTest.java
@@ -0,0 +1,83 @@
+/*
+ * 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.
+ */
+
+package org.apache.fury.test;
+
+import com.alibaba.fastjson.JSONObject;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import java.util.List;
+import org.apache.fury.Fury;
+import org.apache.fury.collection.Collections;
+import org.apache.fury.config.CompatibleMode;
+import org.apache.fury.config.Language;
+import org.testng.Assert;
+import org.testng.annotations.DataProvider;
+import org.testng.annotations.Test;
+
+public class FastJsonTest {
+  public static class DemoResponse {
+private JSONObject json;
+private List objects;
+
+public DemoResponse(JSONObject json) {
+  this.json = json;
+  objects = Collections.ofArrayList(json);
+}
+  }
+
+  @DataProvider
+  public static Object[][] config() {
+return Sets.cartesianProduct(
+ImmutableSet.of(true, false), // referenceTracking
+ImmutableSet.of(true, false), // compatible mode
+ImmutableSet.of(true, false), // scoped meta share mode
+ImmutableSet.of(true, false) // fury enable codegen
+)
+.stream()
+.map(List::toArray)
+.toArray(Object[][]::new);
+  }
+
+  @Test(dataProvider = "config")
+  public void testSerializeJson(
+  boolean trackingRef, boolean compatible, boolean scoped, boolean 
codegen) {
+// For issue: https://github.com/apache/fury/issues/1604
+JSONObject jsonObject = new JSONObject();
+jsonObject.put("k1", "v1");
+jsonObject.put("k2", "v2");
+

(fury) branch main updated: fix(java): fix nested map serialization codegen (#1713)

2024-06-30 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new a7c45f34 fix(java): fix nested map serialization codegen (#1713)
a7c45f34 is described below

commit a7c45f344bf65bea73e2f0cb9aeb17a3698bec1f
Author: Shawn Yang 
AuthorDate: Sun Jun 30 19:05:19 2024 +0800

fix(java): fix nested map serialization codegen (#1713)

## What does this PR do?

Closes #1700

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/benchmark/state/JsonTest.java  | 32 --
 .../fury/builder/BaseObjectCodecBuilder.java   |  2 +-
 2 files changed, 30 insertions(+), 4 deletions(-)

diff --git 
a/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java 
b/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java
index c640b021..6f369dac 100644
--- a/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java
+++ b/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java
@@ -20,23 +20,44 @@
 package org.apache.fury.benchmark.state;
 
 import com.alibaba.fastjson2.JSONObject;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Sets;
+import java.util.List;
 import org.apache.fury.Fury;
+import org.apache.fury.collection.Collections;
 import org.apache.fury.config.CompatibleMode;
 import org.apache.fury.config.Language;
 import org.testng.Assert;
+import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
 
 public class JsonTest {
   public static class DemoResponse {
 private JSONObject json;
+private List objects;
 
 public DemoResponse(JSONObject json) {
   this.json = json;
+  objects = Collections.ofArrayList(json);
 }
   }
 
-  @Test
-  public void testSerializeJson() {
+  @DataProvider
+  public static Object[][] config() {
+return Sets.cartesianProduct(
+ImmutableSet.of(true, false), // referenceTracking
+ImmutableSet.of(true, false), // compatible mode
+ImmutableSet.of(true, false), // scoped meta share mode
+ImmutableSet.of(true, false) // fury enable codegen
+)
+.stream()
+.map(List::toArray)
+.toArray(Object[][]::new);
+  }
+
+  @Test(dataProvider = "config")
+  public void testSerializeJson(
+  boolean trackingRef, boolean compatible, boolean scoped, boolean 
codegen) {
 // For issue: https://github.com/apache/fury/issues/1604
 JSONObject jsonObject = new JSONObject();
 jsonObject.put("k1", "v1");
@@ -46,12 +67,17 @@ public class JsonTest {
 Fury.builder()
 .withLanguage(Language.JAVA)
 .requireClassRegistration(false)
-.withRefTracking(true)
+.withRefTracking(trackingRef)
+.withCompatibleMode(
+compatible ? CompatibleMode.COMPATIBLE : 
CompatibleMode.SCHEMA_CONSISTENT)
+.withScopedMetaShare(scoped)
+.withCodegen(codegen)
 .registerGuavaTypes(false)
 .withCompatibleMode(CompatibleMode.COMPATIBLE)
 .build();
 byte[] serialized = fury.serialize(resp);
 DemoResponse o = (DemoResponse) fury.deserialize(serialized);
 Assert.assertEquals(o.json, jsonObject);
+Assert.assertEquals(o.objects, Collections.ofArrayList(jsonObject));
   }
 }
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
index cc825a69..df7d52e1 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
@@ -970,7 +970,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 jitWriteMap(buffer, map, serializer, typeRef),
 new Invoke(serializer, "write", buffer, map));
 if (generateNewMethod) {
-  return invokeGenerated(ctx, ofHashSet(buffer, map), write, "writeMap", 
false);
+  return invokeGenerated(ctx, ofHashSet(buffer, map, serializer), write, 
"writeMap", false);
 }
 return write;
   }


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: chore(doc): the more complete readme is in python (#1709)

2024-06-29 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new d4641b30 chore(doc): the more complete readme is in python (#1709)
d4641b30 is described below

commit d4641b3083953c517c5a26e99efba0eb2727a42a
Author: PAN <46820719+pandale...@users.noreply.github.com>
AuthorDate: Sun Jun 30 02:06:44 2024 +0800

chore(doc): the more complete readme is in python (#1709)



## What does this PR do?
Improve documentation

In the java/rust/JavaScript readme, there is a fairly complete
development documentation.
but in python it is empty.
I thought it could be filled in and completed.



## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 python/README.md | 50 ++
 1 file changed, 50 insertions(+)

diff --git a/python/README.md b/python/README.md
index 5bd731e5..836b8d30 100644
--- a/python/README.md
+++ b/python/README.md
@@ -1 +1,51 @@
 # Apache Fury™ Python
+
+Fury is a blazingly-fast multi-language serialization framework powered by 
just-in-time compilation and zero-copy.
+
+## Build Fury Python
+
+```bash
+cd python
+pip install pyarrow==14.0.0 Cython wheel numpy pytest
+pip install -v -e .
+```
+
+### Environment Requirements
+
+- python 3.6+
+
+## Testing
+
+```bash
+cd python
+pytest -v -s .
+```
+
+## Code Style
+
+```bash
+cd python
+# install dependencies fro styling
+pip install black==22.1.0 flake8==3.9.1 flake8-quotes flake8-bugbear 
click==8.0.2
+# flake8 pyfury: prompts for code to be formatted, but not formatted
+flake8 pyfury
+# black pyfury: format python code
+black pyfury
+```
+
+## Debug
+
+```bash
+cd python
+python setup.py develop
+```
+
+* Use `cython --cplus -a  pyfury/_serialization.pyx` to produce an annotated 
HTML file of the source code. Then you can
+  analyze interaction between Python objects and Python's C API.
+* Read more: 
https://cython.readthedocs.io/en/latest/src/userguide/debugging.html
+
+```bash
+FURY_DEBUG=true python setup.py build_ext --inplace
+# For linux
+cygdb build
+```


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: refactor(java): move latin language checker method from string serializer to string util (#1708)

2024-06-29 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 09fda94a refactor(java): move latin language checker method from 
string serializer to string util (#1708)
09fda94a is described below

commit 09fda94ab7f476da4dc3b6752825b7249bda6ac2
Author: Anagh Mehran 
AuthorDate: Sat Jun 29 06:59:56 2024 -0400

refactor(java): move latin language checker method from string serializer 
to string util (#1708)



## What does this PR do?


This PR decouples and moves the `isLatin([])` method from
`StringSerializer` class to `StringUtils`.


## Related issues


#1703


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark



-

Co-authored-by: Shawn Yang 
---
 .../apache/fury/benchmark/CompressStringSuite.java |  3 +-
 .../org/apache/fury/meta/MetaStringEncoder.java|  6 +-
 .../org/apache/fury/serializer/Serializers.java|  3 +-
 .../apache/fury/serializer/StringSerializer.java   | 42 +--
 .../java/org/apache/fury/util/StringUtils.java | 42 +++
 .../fury-core/native-image.properties  |  3 +-
 .../fury/serializer/StringSerializerTest.java  | 83 -
 .../java/org/apache/fury/util/StringUtilsTest.java | 85 +-
 8 files changed, 137 insertions(+), 130 deletions(-)

diff --git 
a/java/benchmark/src/main/java/org/apache/fury/benchmark/CompressStringSuite.java
 
b/java/benchmark/src/main/java/org/apache/fury/benchmark/CompressStringSuite.java
index 63979c11..bc09fa20 100644
--- 
a/java/benchmark/src/main/java/org/apache/fury/benchmark/CompressStringSuite.java
+++ 
b/java/benchmark/src/main/java/org/apache/fury/benchmark/CompressStringSuite.java
@@ -22,7 +22,6 @@ package org.apache.fury.benchmark;
 import java.nio.ByteBuffer;
 import org.apache.fury.memory.MemoryBuffer;
 import org.apache.fury.memory.Platform;
-import org.apache.fury.serializer.StringSerializer;
 import org.apache.fury.util.StringUtils;
 import org.openjdk.jmh.Main;
 import org.openjdk.jmh.annotations.Benchmark;
@@ -102,7 +101,7 @@ public class CompressStringSuite {
 
   @Benchmark
   public Object latinSuperWordCheck() {
-return StringSerializer.isLatin(latinStrChars);
+return StringUtils.isLatin(latinStrChars);
   }
 
   public static void main(String[] args) throws Exception {
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java 
b/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java
index b6a0a58b..90298e8e 100644
--- a/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java
@@ -23,8 +23,8 @@ import java.nio.charset.StandardCharsets;
 import java.util.HashSet;
 import org.apache.fury.collection.Collections;
 import org.apache.fury.meta.MetaString.Encoding;
-import org.apache.fury.serializer.StringSerializer;
 import org.apache.fury.util.Preconditions;
+import org.apache.fury.util.StringUtils;
 
 /** Encodes plain text strings into MetaString objects with specified encoding 
mechanisms. */
 public class MetaStringEncoder {
@@ -57,7 +57,7 @@ public class MetaStringEncoder {
 if (input.isEmpty()) {
   return new MetaString(input, Encoding.UTF_8, specialChar1, specialChar2, 
new byte[0]);
 }
-if (!StringSerializer.isLatin(input.toCharArray())) {
+if (!StringUtils.isLatin(input.toCharArray())) {
   return new MetaString(
   input,
   Encoding.UTF_8,
@@ -79,7 +79,7 @@ public class MetaStringEncoder {
   public MetaString encode(String input, Encoding encoding) {
 Preconditions.checkArgument(
 input.length() < Short.MAX_VALUE, "Long meta string than 32767 is not 
allowed");
-if (encoding != Encoding.UTF_8 && 
!StringSerializer.isLatin(input.toCharArray())) {
+if (encoding != Encoding.UTF_8 && 
!StringUtils.isLatin(input.toCharArray())) {
   throw new IllegalArgumentException("Non-ASCII characters in meta string 
are not allowed");
 }
 if (input.isEmpty()) {
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/Serializers.java 
b/java/fury-core/src/main/java/org/apache/fury/serializer/Serializers.java
index 3dbd70eb..63d0099c 100644
--- a/java/fury-core/src/main/java/org/apache/fury/serializer/Serializers.java
+++ b/java/fury-core/src/main/java/org/apache/fury/serializer/Serializers.java
@@ -51,6 +51,7 @@ import org.apache.fury.resolver.ClassResolver;
 import org.apache.fury.type.Type;
 import org.apache.fury.util.ExceptionUtils;
 import org.a

(fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-06-24 Thread chaokunyang
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/fury-site.git


The following commit(s) were added to refs/heads/main by this push:
 new ebe93fe   synced local 'docs/guide/' with remote 'docs/guide/'
ebe93fe is described below

commit ebe93fe9cc314346c06555db23527d936ba83896
Author: chaokunyang 
AuthorDate: Mon Jun 24 14:18:14 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/row_format_guide.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/guide/row_format_guide.md b/docs/guide/row_format_guide.md
index 3c60927..076a2c0 100644
--- a/docs/guide/row_format_guide.md
+++ b/docs/guide/row_format_guide.md
@@ -44,7 +44,7 @@ BinaryArray binaryArray4 = binaryRow.getArray(3);
 BinaryRow barStruct = binaryArray4.getStruct(10);
 
 // zero-copy read 6th of f2 of 11th element of `readList f4`
-barStruct.getArray(1).getLong(5);
+barStruct.getArray(1).getInt64(5);
 RowEncoder barEncoder = Encoders.bean(Bar.class);
 // deserialize part of data.
 Bar newBar = barEncoder.fromRow(barStruct);


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: chore(doc): fix compiler error (#1698)

2024-06-24 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 8bfbac2d chore(doc): fix compiler error (#1698)
8bfbac2d is described below

commit 8bfbac2d1bb58c0b4c9225f7fe04427701a4b81d
Author: wangjie 
AuthorDate: Mon Jun 24 22:17:49 2024 +0800

chore(doc): fix compiler error (#1698)

## What does this PR do?
fix doc error.`BinaryArray#getLong` not exist

## Related issues

## Does this PR introduce any user-facing change?
- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark
---
 README.md  | 2 +-
 docs/guide/row_format_guide.md | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/README.md b/README.md
index 30dcf1de..de3e8bb2 100644
--- a/README.md
+++ b/README.md
@@ -325,7 +325,7 @@ BinaryArray binaryArray4 = binaryRow.getArray(3);
 BinaryRow barStruct = binaryArray4.getStruct(10);
 
 // zero-copy read 6th of f2 of 11th element of `readList f4`
-barStruct.getArray(1).getLong(5);
+barStruct.getArray(1).getInt64(5);
 RowEncoder barEncoder = Encoders.bean(Bar.class);
 // deserialize part of data.
 Bar newBar = barEncoder.fromRow(barStruct);
diff --git a/docs/guide/row_format_guide.md b/docs/guide/row_format_guide.md
index 3c60927a..076a2c06 100644
--- a/docs/guide/row_format_guide.md
+++ b/docs/guide/row_format_guide.md
@@ -44,7 +44,7 @@ BinaryArray binaryArray4 = binaryRow.getArray(3);
 BinaryRow barStruct = binaryArray4.getStruct(10);
 
 // zero-copy read 6th of f2 of 11th element of `readList f4`
-barStruct.getArray(1).getLong(5);
+barStruct.getArray(1).getInt64(5);
 RowEncoder barEncoder = Encoders.bean(Bar.class);
 // deserialize part of data.
 Bar newBar = barEncoder.fromRow(barStruct);


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: fix(java): return fury to pooled which get from (#1697)

2024-06-21 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new f1651d6e fix(java): return fury to pooled which get from (#1697)
f1651d6e is described below

commit f1651d6ed8fa389dd19ad766021e74869bf59d04
Author: Shuchang Li 
AuthorDate: Sat Jun 22 00:47:57 2024 +0800

fix(java): return fury to pooled which get from (#1697)



## What does this PR do?



incase of pooledCache expired from cache, and fury will return to
another pooledCache.
so we save pooledCache instead of get from cache.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../apache/fury/pool/ClassLoaderFuryPooled.java|  1 +
 .../apache/fury/pool/FuryPooledObjectFactory.java  | 23 +++---
 .../java/org/apache/fury/pool/ThreadPoolFury.java  | 15 --
 3 files changed, 17 insertions(+), 22 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/pool/ClassLoaderFuryPooled.java 
b/java/fury-core/src/main/java/org/apache/fury/pool/ClassLoaderFuryPooled.java
index 7f02fe02..c1ad2ada 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/pool/ClassLoaderFuryPooled.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/pool/ClassLoaderFuryPooled.java
@@ -109,6 +109,7 @@ public class ClassLoaderFuryPooled {
   furyCondition.signalAll();
 } catch (Exception e) {
   LOG.error(e.getMessage(), e);
+  throw new RuntimeException(e);
 } finally {
   lock.unlock();
 }
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
 
b/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
index 872fd459..56033bf5 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
@@ -81,33 +81,16 @@ public class FuryPooledObjectFactory {
 CacheBuilder.newBuilder().expireAfterAccess(expireTime, 
timeUnit).build();
   }
 
-  public Fury getFury() {
+  public ClassLoaderFuryPooled getPooledCache() {
 try {
   ClassLoader classLoader = classLoaderLocal.get();
   ClassLoaderFuryPooled classLoaderFuryPooled =
   classLoaderFuryPooledCache.getIfPresent(classLoader);
   if (classLoaderFuryPooled == null) {
 // double check cache
-ClassLoaderFuryPooled cache = getOrAddCache(classLoader);
-return cache.getFury();
+return getOrAddCache(classLoader);
   }
-  return classLoaderFuryPooled.getFury();
-} catch (Exception e) {
-  LOG.error(e.getMessage(), e);
-  throw new RuntimeException(e);
-}
-  }
-
-  public void returnFury(Fury fury) {
-try {
-  ClassLoader classLoader = classLoaderLocal.get();
-  ClassLoaderFuryPooled classLoaderFuryPooled =
-  classLoaderFuryPooledCache.getIfPresent(classLoader);
-  if (classLoaderFuryPooled == null) {
-// ifPresent will be cleared when cache expire 30's
-return;
-  }
-  classLoaderFuryPooled.returnFury(fury);
+  return classLoaderFuryPooled;
 } catch (Exception e) {
   LOG.error(e.getMessage(), e);
   throw new RuntimeException(e);
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java 
b/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java
index f1c4bd6b..da163ccf 100644
--- a/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java
@@ -29,6 +29,8 @@ import org.apache.fury.AbstractThreadSafeFury;
 import org.apache.fury.Fury;
 import org.apache.fury.io.FuryInputStream;
 import org.apache.fury.io.FuryReadableChannel;
+import org.apache.fury.logging.Logger;
+import org.apache.fury.logging.LoggerFactory;
 import org.apache.fury.memory.MemoryBuffer;
 import org.apache.fury.memory.MemoryUtils;
 import org.apache.fury.serializer.BufferCallback;
@@ -37,6 +39,8 @@ import org.apache.fury.util.LoaderBinding;
 @ThreadSafe
 public class ThreadPoolFury extends AbstractThreadSafeFury {
 
+  private static final Logger LOG = 
LoggerFactory.getLogger(ThreadPoolFury.class);
+
   private final FuryPooledObjectFactory furyPooledObjectFactory;
   private Consumer factoryCallback = f -> {};
 
@@ -67,12 +71,19 @@ public class ThreadPoolFury extends AbstractThreadSafeFury {
 
   @Override
   public  R execute(Function action) {
+ClassLoaderFuryPooled pooledCache = null;
 Fury fury = null;
 try {
-  fury = furyPooledObjectFactory.getF

(fury) branch main updated: docs: fix badge x (#1694)

2024-06-20 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new d8c6f1d4 docs: fix badge x (#1694)
d8c6f1d4 is described below

commit d8c6f1d47fa18cdd61007ab78994ace4e0b5f076
Author: Xin Wang 
AuthorDate: Fri Jun 21 00:06:16 2024 +0800

docs: fix badge x (#1694)



## What does this PR do?


fix badge: twitter -> x

preview:


![image](https://github.com/apache/fury/assets/6711230/b273ba2d-6105-4dab-ba2e-dbf7a3c1d53a)


## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index dda38951..30dcf1de 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,7 @@
 
 [![Build 
Status](https://img.shields.io/github/actions/workflow/status/apache/fury/ci.yml?branch=main=for-the-badge=GITHUB%20ACTIONS=github)](https://github.com/apache/fury/actions/workflows/ci.yml)
 [![Slack 
Channel](https://img.shields.io/badge/slack-join-3f0e40?logo=slack=for-the-badge)](https://join.slack.com/t/fury-project/shared_invite/zt-1u8soj4qc-ieYEu7ciHOqA2mo47llS8A)
-[![Twitter](https://img.shields.io/badge/@ApacheFury-follow-blue?logo=twitter=for-the-badge)](https://twitter.com/ApacheFury)
+[![X](https://img.shields.io/badge/@ApacheFury-follow-blue?logo=x=for-the-badge)](https://x.com/ApacheFury)
 [![Maven 
Version](https://img.shields.io/maven-central/v/org.apache.fury/fury-core?style=for-the-badge)](https://search.maven.org/#search|gav|1|g:"org.apache.fury"%20AND%20a:"fury-core")
 
 


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: ci: fix ci error (#1691)

2024-06-18 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new a0dd77e8 ci: fix ci error (#1691)
a0dd77e8 is described below

commit a0dd77e82f41320f950db200443bcff514e0f5e3
Author: LiangliangSui <116876207+liangliang...@users.noreply.github.com>
AuthorDate: Tue Jun 18 20:43:21 2024 +0800

ci: fix ci error (#1691)

## What does this PR do?
The current CI keeps failing.



[Error](https://github.com/apache/fury/actions/runs/9560557264/job/26352935638):
```
  A module that was compiled using NumPy 1.x cannot be run in
  NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
  versions of NumPy, modules must be compiled with NumPy 2.0.
  Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
```

`numpy` was updated to 2.0.0 on Jun 16, 2024, which caused compatibility
issues with CI, so `numpy<2.0.0` was set.



![image](https://github.com/apache/fury/assets/116876207/e89b9fcc-487e-4099-af12-218359863484)



## Related issues




## Does this PR introduce any user-facing change?


- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark

Signed-off-by: LiangliangSui 
---
 ci/run_ci.py | 1 +
 ci/run_ci.sh | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/ci/run_ci.py b/ci/run_ci.py
index 7a477409..d43a4af5 100644
--- a/ci/run_ci.py
+++ b/ci/run_ci.py
@@ -115,6 +115,7 @@ def _run_js():
 def _install_cpp_deps():
 _exec_cmd(f"pip install pyarrow=={PYARROW_VERSION}")
 _exec_cmd("pip install psutil")
+_exec_cmd("pip install 'numpy<2.0.0'")
 _install_bazel()
 
 
diff --git a/ci/run_ci.sh b/ci/run_ci.sh
index 30bbe44b..2883254b 100755
--- a/ci/run_ci.sh
+++ b/ci/run_ci.sh
@@ -34,7 +34,7 @@ install_python() {
 install_pyfury() {
   echo "Python version $(python -V), path $(which python)"
   "$ROOT"/ci/deploy.sh install_pyarrow
-  pip install Cython wheel numpy pytest
+  pip install Cython wheel "numpy<2.0.0" pytest
   pushd "$ROOT/python"
   pip list
   export PATH=~/bin:$PATH


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-06-14 Thread chaokunyang
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/fury-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 4f03f37   synced local 'docs/guide/' with remote 'docs/guide/'
4f03f37 is described below

commit 4f03f375b933f0bf82fc5429c8918c08bf38aa47
Author: chaokunyang 
AuthorDate: Fri Jun 14 09:47:15 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/graalvm_guide.md | 24 
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/docs/guide/graalvm_guide.md b/docs/guide/graalvm_guide.md
index 557f28e..3ed919f 100644
--- a/docs/guide/graalvm_guide.md
+++ b/docs/guide/graalvm_guide.md
@@ -6,26 +6,26 @@ id: graalvm_guide
 
 # GraalVM Native Image
 GraalVM `native image` can compile java code into native code ahead to build 
faster, smaller, leaner applications.
-The native image doesn't have a JIT compiler to compile bytecode into machine 
code, and doesn't support 
+The native image doesn't have a JIT compiler to compile bytecode into machine 
code, and doesn't support
 reflection unless configure reflection file.
 
-Fury runs on GraalVM native image pretty well. Fury generates all serializer 
code for `Fury JIT framework` and `MethodHandle/LambdaMetafactory` at graalvm 
build time. Then use those generated code for serialization at runtime without 
+Fury runs on GraalVM native image pretty well. Fury generates all serializer 
code for `Fury JIT framework` and `MethodHandle/LambdaMetafactory` at graalvm 
build time. Then use those generated code for serialization at runtime without
 any extra cost, the performance is great.
 
 In order to use Fury on graalvm native image, you must create Fury as an 
**static** field of a class, and **register** all classes at
- the enclosing class initialize time. Then configure `native-image.properties` 
under 
-`resources/META-INF/native-image/$xxx/native-image.propertie` to tell graalvm 
to init the class at native image 
+ the enclosing class initialize time. Then configure `native-image.properties` 
under
+`resources/META-INF/native-image/$xxx/native-image.propertie` to tell graalvm 
to init the class at native image
 build time. For example, here we configure `org.apache.fury.graalvm.Example` 
class be init at build time:
 ```properties
 Args = --initialize-at-build-time=org.apache.fury.graalvm.Example
 ```
 
-Another benefit using fury is that you don't have to configure [reflection 
json](https://www.graalvm.org/latest/reference-manual/native-image/metadata/#specifying-reflection-metadata-in-json)
 and 
+Another benefit using fury is that you don't have to configure [reflection 
json](https://www.graalvm.org/latest/reference-manual/native-image/metadata/#specifying-reflection-metadata-in-json)
 and
 [serialization 
json](https://www.graalvm.org/latest/reference-manual/native-image/metadata/#serialization),
 which is
-very tedious, cumbersome and inconvenient. When using fury, you just need to 
invoke 
+very tedious, cumbersome and inconvenient. When using fury, you just need to 
invoke
 `org.apache.fury.Fury.register(Class, boolean)` for every type you want to 
serialize.
 
-Note that Fury `asyncCompilationEnabled` option will be disabled automatically 
for graalvm native image since graalvm 
+Note that Fury `asyncCompilationEnabled` option will be disabled automatically 
for graalvm native image since graalvm
 native image doesn't support JIT at the image run time.
 
 ## Not thread-safe Fury
@@ -85,7 +85,7 @@ public class ThreadSafeExample {
 List f3,
 Map f4) {
   }
-  
+
   static ThreadSafeFury fury;
 
   static {
@@ -115,9 +115,9 @@ Args = 
--initialize-at-build-time=org.apache.fury.graalvm.ThreadSafeExample
 ```
 
 ## Framework Integration
-For framework developers, if you want to integrate fury for serialization, you 
can provided a configuration file to let 
-the users to list all the classes they want to serialize, then you can load 
those classes and invoke 
-`org.apache.fury.Fury.register(Class, boolean)` to register those classes 
in your Fury integration class, and configure that 
+For framework developers, if you want to integrate fury for serialization, you 
can provided a configuration file to let
+the users to list all the classes they want to serialize, then you can load 
those classes and invoke
+`org.apache.fury.Fury.register(Class, boolean)` to register those classes 
in your Fury integration class, and configure that
 class be initialized at graalvm native image build time.
 
 ## Benchmark
@@ -211,4 +211,4 @@ Fury serialization took mills: 1289
 JDK serialization took mills: 15069
 Compare speed: Fury is 12.11x speed of JDK
 Compare size: Fury is 0.48x size of JDK
-```
\ No newline at end of file
+```


-
To unsubscribe, e-mail: commits-unsubscr

(fury) branch pjfanning-patch-1 deleted (was 29fd4cb6)

2024-06-14 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to branch pjfanning-patch-1
in repository https://gitbox.apache.org/repos/asf/fury.git


 was 29fd4cb6 Update github URL in IntelliJ vcs.xml

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: fix(java): fix snapshot jar upload (#1688)

2024-06-14 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 75693d9c fix(java): fix snapshot jar upload (#1688)
75693d9c is described below

commit 75693d9c1402da13717abe841bd3d3b1e2848920
Author: Shawn Yang 
AuthorDate: Fri Jun 14 17:46:56 2024 +0800

fix(java): fix snapshot jar upload (#1688)

## What does this PR do?

Closes #1687

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .github/workflows/release-java-snapshot.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/release-java-snapshot.yaml 
b/.github/workflows/release-java-snapshot.yaml
index 15f79575..a267e484 100644
--- a/.github/workflows/release-java-snapshot.yaml
+++ b/.github/workflows/release-java-snapshot.yaml
@@ -26,7 +26,7 @@ on:
 jobs:
   publish-java:
 runs-on: ubuntu-latest
-if: github.repository == 'apache/incabator-fury'
+if: github.repository == 'apache/fury'
 steps:
   - uses: actions/checkout@v4
   - name: Set up Maven Central Repository


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury) branch main updated: chore(java): Update github URL in IntelliJ vcs.xml (#1689)

2024-06-14 Thread chaokunyang
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/fury.git


The following commit(s) were added to refs/heads/main by this push:
 new 05f10a54 chore(java): Update github URL in IntelliJ vcs.xml (#1689)
05f10a54 is described below

commit 05f10a543d751105c38e217cb2f0c495605499be
Author: PJ Fanning 
AuthorDate: Fri Jun 14 10:47:19 2024 +0100

chore(java): Update github URL in IntelliJ vcs.xml (#1689)



## What does this PR do?

GitHub repo was renamed


## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .idea/vcs.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.idea/vcs.xml b/.idea/vcs.xml
index a70151c7..0cae42f8 100644
--- a/.idea/vcs.xml
+++ b/.idea/vcs.xml
@@ -5,7 +5,7 @@
   
 
   
-  https://github.com/apache/incubator-fury/pull/$1; />
+  https://github.com/apache/fury/pull/$1; />
 
   
 
@@ -13,4 +13,4 @@
   
 
   
-
\ No newline at end of file
+


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(fury-site) branch main updated: remove incubator prefix (#136)

2024-06-13 Thread chaokunyang
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/fury-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 74cbc7c  remove incubator prefix (#136)
74cbc7c is described below

commit 74cbc7ce9686c909c8d264bab058b112bf3c9623
Author: Shawn Yang 
AuthorDate: Fri Jun 14 13:36:14 2024 +0800

remove incubator prefix (#136)

#134  #135
---
 CONTRIBUTING.md| 14 ++--
 ...st_multiple_language_serialization_framework.md |  6 +-
 blog/2024-05-03-fury_0_5_0_release.md  | 32 -
 ...tastring-space-efficient_encoding_for_string.md |  6 +-
 blog/2024-05-28-fury_0_5_1_release.md  | 76 +++---
 docs/community/community.md| 12 ++--
 docs/community/how_to_release.md   | 26 
 docs/guide/DEVELOPMENT.md  |  2 +-
 docs/guide/graalvm_guide.md|  2 +-
 docs/guide/scala_guide.md  |  6 +-
 docs/introduction/benchmark.md |  4 +-
 docs/introduction/introduction.md  |  4 +-
 docs/specification/java_serialization_spec.md  |  2 +-
 docs/specification/xlang_serialization_spec.md |  4 +-
 docs/start/usage.md|  2 +-
 docusaurus.config.ts   |  6 +-
 src/pages/download.md  |  2 +-
 src/pages/index.tsx|  2 +-
 18 files changed, 104 insertions(+), 104 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index ff4f451..6a6e594 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,27 +2,27 @@
 
 ## Finding good first issues
 
-See [Good First Issues](https://github.com/apache/incubator-fury/contribute).
+See [Good First Issues](https://github.com/apache/fury/contribute).
 
 ## How to create an issue for Fury
 
-Create an issue with [this 
form](https://github.com/apache/incubator-fury/issues/new/choose).
+Create an issue with [this 
form](https://github.com/apache/fury/issues/new/choose).
 
 # Fury Website
 
-Fury's website consists of static pages hosted at 
https://github.com/apache/incubator-fury-site.
+Fury's website consists of static pages hosted at 
https://github.com/apache/fury-site.
 
 
 ## How to create an issue for Fury Website
 
-Create an issue with [this 
form](https://github.com/apache/incubator-fury-site/issues/new/choose).
+Create an issue with [this 
form](https://github.com/apache/fury-site/issues/new/choose).
 
 ## How to update doc
 
-All updates about docs for 
[guide](https://github.com/apache/incubator-fury/tree/main/docs/guide) and 
[specification](https://github.com/apache/incubator-fury/tree/main/docs/specification)
 will be synced from [docs in fury 
repo](https://github.com/apache/incubator-fury/tree/main/docs) to this site 
repo automatically.
+All updates about docs for 
[guide](https://github.com/apache/fury/tree/main/docs/guide) and 
[specification](https://github.com/apache/fury/tree/main/docs/specification) 
will be synced from [docs in fury 
repo](https://github.com/apache/fury/tree/main/docs) to this site repo 
automatically.
 
-If you want to update those pages, please submit a PR to 
https://github.com/apache/incubator-fury.
+If you want to update those pages, please submit a PR to 
https://github.com/apache/fury.
 
 ## Write a blog
 
-If you want write a blog, or update other contents about the website, please 
submit PR to [this site repo](https://github.com/apache/incubator-fury-site).
+If you want write a blog, or update other contents about the website, please 
submit PR to [this site repo](https://github.com/apache/fury-site).
diff --git 
a/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
 
b/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
index ebdc99c..75db553 100644
--- 
a/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
+++ 
b/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
@@ -9,7 +9,7 @@ Apache Fury (incubating) is a multi-language serialization 
framework powered by
 
 
 
-The GitHub address of fury repository is: 
https://github.com/apache/incubator-fury
+The GitHub address of fury repository is: https://github.com/apache/fury
 
 
 
@@ -21,7 +21,7 @@ Static serialization frameworks like 
[Protobuf](https://github.com/protocolbuffe
 
 Dynamic serialization frameworks such as JDK serialization, Kryo, Fst, 
Hessian, Pickle provide ease-of-use and dynamics, but **don't support 
cross-language** and suffer significant **performance issues**, which is 
unsuitable for high throughput, low latency, and large-scale data transfer 
scenarios.
 
-Therefore, we developed a new multi-language serialization framework **Apache 
Fury**, which is open-sourced on https

(incubator-fury-site) branch main updated: add incuabtor prefix back (#135)

2024-06-13 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 95d25b7  add incuabtor prefix back (#135)
95d25b7 is described below

commit 95d25b7949ae8b8c8439215c5a793467b78b3c34
Author: Shawn Yang 
AuthorDate: Thu Jun 13 14:24:15 2024 +0800

add incuabtor prefix back (#135)

Add incubator prefix back, remove incubator prefix when
https://issues.apache.org/jira/browse/INFRA-25864 is addressed

Closing #134
---
 CONTRIBUTING.md| 14 ++--
 ...st_multiple_language_serialization_framework.md |  6 +-
 blog/2024-05-03-fury_0_5_0_release.md  | 32 -
 ...tastring-space-efficient_encoding_for_string.md |  6 +-
 blog/2024-05-28-fury_0_5_1_release.md  | 76 +++---
 docs/community/community.md| 10 +--
 docs/community/how_to_release.md   | 26 
 docs/guide/DEVELOPMENT.md  |  2 +-
 docs/guide/graalvm_guide.md|  2 +-
 docs/guide/scala_guide.md  |  6 +-
 docs/introduction/benchmark.md |  4 +-
 docs/introduction/introduction.md  |  4 +-
 docs/specification/java_serialization_spec.md  |  2 +-
 docs/specification/xlang_serialization_spec.md |  4 +-
 docs/start/usage.md|  2 +-
 docusaurus.config.ts   |  6 +-
 src/pages/download.md  |  2 +-
 src/pages/index.tsx|  2 +-
 18 files changed, 103 insertions(+), 103 deletions(-)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 6a6e594..ff4f451 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -2,27 +2,27 @@
 
 ## Finding good first issues
 
-See [Good First Issues](https://github.com/apache/fury/contribute).
+See [Good First Issues](https://github.com/apache/incubator-fury/contribute).
 
 ## How to create an issue for Fury
 
-Create an issue with [this 
form](https://github.com/apache/fury/issues/new/choose).
+Create an issue with [this 
form](https://github.com/apache/incubator-fury/issues/new/choose).
 
 # Fury Website
 
-Fury's website consists of static pages hosted at 
https://github.com/apache/fury-site.
+Fury's website consists of static pages hosted at 
https://github.com/apache/incubator-fury-site.
 
 
 ## How to create an issue for Fury Website
 
-Create an issue with [this 
form](https://github.com/apache/fury-site/issues/new/choose).
+Create an issue with [this 
form](https://github.com/apache/incubator-fury-site/issues/new/choose).
 
 ## How to update doc
 
-All updates about docs for 
[guide](https://github.com/apache/fury/tree/main/docs/guide) and 
[specification](https://github.com/apache/fury/tree/main/docs/specification) 
will be synced from [docs in fury 
repo](https://github.com/apache/fury/tree/main/docs) to this site repo 
automatically.
+All updates about docs for 
[guide](https://github.com/apache/incubator-fury/tree/main/docs/guide) and 
[specification](https://github.com/apache/incubator-fury/tree/main/docs/specification)
 will be synced from [docs in fury 
repo](https://github.com/apache/incubator-fury/tree/main/docs) to this site 
repo automatically.
 
-If you want to update those pages, please submit a PR to 
https://github.com/apache/fury.
+If you want to update those pages, please submit a PR to 
https://github.com/apache/incubator-fury.
 
 ## Write a blog
 
-If you want write a blog, or update other contents about the website, please 
submit PR to [this site repo](https://github.com/apache/fury-site).
+If you want write a blog, or update other contents about the website, please 
submit PR to [this site repo](https://github.com/apache/incubator-fury-site).
diff --git 
a/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
 
b/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
index 75db553..ebdc99c 100644
--- 
a/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
+++ 
b/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
@@ -9,7 +9,7 @@ Apache Fury (incubating) is a multi-language serialization 
framework powered by
 
 
 
-The GitHub address of fury repository is: https://github.com/apache/fury
+The GitHub address of fury repository is: 
https://github.com/apache/incubator-fury
 
 
 
@@ -21,7 +21,7 @@ Static serialization frameworks like 
[Protobuf](https://github.com/protocolbuffe
 
 Dynamic serialization frameworks such as JDK serialization, Kryo, Fst, 
Hessian, Pickle provide ease-of-use and dynamics, but **don't support 
cross-language** and suffer significant **performance issues**, which is 
unsuitable for high throughput, low latency, and large-scale

(incubator-fury-site) branch main updated: add contribution guide (#132)

2024-06-12 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new f80ec64  add contribution guide (#132)
f80ec64 is described below

commit f80ec64dad7d908989512e4d0654699b5ac5a2da
Author: Shawn Yang 
AuthorDate: Thu Jun 13 11:55:10 2024 +0800

add contribution guide (#132)

#130
---
 CONTRIBUTING.md | 28 
 README.md   |  4 
 2 files changed, 32 insertions(+)

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 000..6a6e594
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,28 @@
+# How to contribute to Fury
+
+## Finding good first issues
+
+See [Good First Issues](https://github.com/apache/fury/contribute).
+
+## How to create an issue for Fury
+
+Create an issue with [this 
form](https://github.com/apache/fury/issues/new/choose).
+
+# Fury Website
+
+Fury's website consists of static pages hosted at 
https://github.com/apache/fury-site.
+
+
+## How to create an issue for Fury Website
+
+Create an issue with [this 
form](https://github.com/apache/fury-site/issues/new/choose).
+
+## How to update doc
+
+All updates about docs for 
[guide](https://github.com/apache/fury/tree/main/docs/guide) and 
[specification](https://github.com/apache/fury/tree/main/docs/specification) 
will be synced from [docs in fury 
repo](https://github.com/apache/fury/tree/main/docs) to this site repo 
automatically.
+
+If you want to update those pages, please submit a PR to 
https://github.com/apache/fury.
+
+## Write a blog
+
+If you want write a blog, or update other contents about the website, please 
submit PR to [this site repo](https://github.com/apache/fury-site).
diff --git a/README.md b/README.md
index 9cb0c43..a352280 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,10 @@ $ yarn build
 
 This command generates static content into the `build` directory and can be 
served using any static contents hosting service.
 
+## How to Contribute
+
+Please read the [CONTRIBUTING](CONTRIBUTING.md) guide for instructions on how 
to contribute.
+
 ## LICENSE
 
 [Apache License 2.0](./LICENSE).


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: add community page (#133)

2024-06-12 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new e847210  add community page (#133)
e847210 is described below

commit e8472103c6d2c1cbec1373c55041b9640c3a45c4
Author: Shawn Yang 
AuthorDate: Thu Jun 13 11:54:58 2024 +0800

add community page (#133)

Add community page:



![image](https://github.com/apache/incubator-fury-site/assets/12445254/30d542c8-8eff-4785-9371-11d420b7c2ec)

The content is derived from apache kvrocks community page:
https://kvrocks.apache.org/community/

Closes #131
---
 docs/community/community.md | 90 +
 1 file changed, 90 insertions(+)

diff --git a/docs/community/community.md b/docs/community/community.md
new file mode 100644
index 000..6d26c71
--- /dev/null
+++ b/docs/community/community.md
@@ -0,0 +1,90 @@
+---
+title: Community
+sidebar_position: 0
+id: community
+---
+
+
+Apache Fury is a volunteer project and it thrives on the contributions of its 
community.
+We invite you to participate as much or as little as you wish. Here are 
several ways to contribute:
+
+- Use our project and share feedback.
+- Provide use-cases for the project.
+- Report bugs and contribute fixes.
+- Contribute code and documentation improvements.
+
+## Mailing list
+
+| Name| Desc| 
Subscribe | Unsubscribe 
  | Post   | 
Archive   |
+|-|-|---|---||---|
+| d...@fury.apache.org | Development related discussions | 
[Subscribe](mailto:dev-subscr...@fury.apache.org) | 
[Unsubscribe](mailto:dev-unsubscr...@fury.apache.org) | 
[Post](mailto:d...@fury.apache.org) | 
[Archive](https://lists.apache.org/list.html?d...@fury.apache.org) |
+| commits@fury.apache.org | All commits to our repositories | 
[Subscribe](mailto:commits-subscr...@fury.apache.org) | 
[Unsubscribe](mailto:commits-unsubscr...@fury.apache.org) | Read only list  
   | 
[Archive](https://lists.apache.org/list.html?commits@fury.apache.org) |
+
+Please make sure subscribe to any list before attempting to post.
+
+If you are not subscribed to the mailing list, your message will either be 
rejected or you won't receive the response.
+
+### How to subscribe to a mailing list
+
+To post messages, subscribe first by:
+
+1. Sending an email to listname-subscr...@fury.apache.org with `listname` 
replaced accordingly.
+2. Replying to the confirmation email you'll receive, keeping the subject line 
intact.
+3. You'll then get a welcome email, and the subscription succeeds.
+
+When discussing code snippets in emails, ensure:
+
+* You do not link to files in external services, as such files can change, get 
deleted or the link might break and thus
+  make an archived email thread useless.
+* You paste text instead of screenshots of text.
+* You keep formatting when pasting code in order to keep the code readable.
+* There are enough import statements to avoid ambiguities.
+
+## Slack
+
+You can join
+the [Apache Fury™ community on 
Slack](https://join.slack.com/t/fury-project/shared_invite/zt-1u8soj4qc-ieYEu7ciHOqA2mo47llS8A).
+
+There are a couple of community rules:
+
+* Be respectful and nice.
+* All important decisions and conclusions must be reflected back to the 
mailing lists. "If it didn't happen on a mailing
+  list, it didn't happen." - The [Apache 
Mottos](https://theapacheway.com/on-list/).
+* Use Slack threads to keep parallel conversations from overwhelming a channel.
+* Please do not direct message people for troubleshooting, issue assigning and 
PR review. These should be picked-up
+  voluntarily.
+
+## Issue tracker
+
+We use GitHub Issues to track all issues: 
+- code related issues: https://github.com/apache/fury/issues
+- website related issues: https://github.com/apache/fury-site/issues
+
+You need to have a [GitHub account](https://github.com/signup) in order to 
create issues.
+If you don't have a [GitHub account](https://github.com/signup), you can post 
an email to d...@fury.apache.org.
+
+### Bug reports
+
+To report a bug:
+
+* Verify that the bug does in fact exist.
+* Search the [issue tracker](https://github.com/apache/fury/issues) to verify 
there is no existing issue reporting the bug you've found.
+* Create a [bug 
report](https://github.com/apache

(incubator-fury-site) branch main updated: add missing DISCLAIMER file (#129)

2024-06-11 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 000830e  add missing DISCLAIMER file (#129)
000830e is described below

commit 000830ea016074fa97479500cebf56a4aa57757a
Author: Shawn Yang 
AuthorDate: Wed Jun 12 00:42:52 2024 +0800

add missing DISCLAIMER file (#129)

Closing https://github.com/apache/incubator-fury/issues/1682
---
 DISCLAIMER | 10 ++
 1 file changed, 10 insertions(+)

diff --git a/DISCLAIMER b/DISCLAIMER
new file mode 100644
index 000..d303855
--- /dev/null
+++ b/DISCLAIMER
@@ -0,0 +1,10 @@
+Apache Fury (incubating) is an effort undergoing incubation at the Apache
+Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+
+Incubation is required of all newly accepted projects until a further review
+indicates that the infrastructure, communications, and decision making process
+have stabilized in a manner consistent with other successful ASF projects.
+
+While incubation status is not necessarily a reflection of the completeness
+or stability of the code, it does indicate that the project has yet to be
+fully endorsed by the ASF.
\ No newline at end of file


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: Allow issues (#128)

2024-06-11 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new f843cc1  Allow issues (#128)
f843cc1 is described below

commit f843cc1e93b3ce384fa89f4eb5244816aea5d867
Author: Sebb 
AuthorDate: Tue Jun 11 17:37:11 2024 +0100

Allow issues (#128)

It's currently really awkward to report issues in this repo.
---
 .asf.yaml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.asf.yaml b/.asf.yaml
index 67cf929..e8bf3f1 100644
--- a/.asf.yaml
+++ b/.asf.yaml
@@ -19,7 +19,7 @@ github:
   description: "Apache Fury Website"
   homepage: https://fury.apache.org/
   features:
-issues: false
+issues: true
 projects: false
 wiki: false
   labels:


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: Remove incubating prefix for repo (#127)

2024-06-11 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 5167221  Remove incubating prefix for repo (#127)
5167221 is described below

commit 5167221fb2201d8da1dd2d858e0641033599599a
Author: Shawn Yang 
AuthorDate: Wed Jun 12 00:15:35 2024 +0800

Remove incubating prefix for repo (#127)
---
 README.md  |  5 ++
 ...st_multiple_language_serialization_framework.md |  6 +-
 blog/2024-05-03-fury_0_5_0_release.md  | 32 -
 ...tastring-space-efficient_encoding_for_string.md |  6 +-
 blog/2024-05-28-fury_0_5_1_release.md  | 76 +++---
 docs/community/how_to_release.md   | 30 -
 docs/guide/DEVELOPMENT.md  |  2 +-
 docs/guide/graalvm_guide.md|  2 +-
 docs/guide/scala_guide.md  |  6 +-
 docs/guide/xlang_serialization_guide.md|  8 +--
 docs/introduction/benchmark.md |  4 +-
 docs/introduction/introduction.md  |  4 +-
 docs/specification/java_serialization_spec.md  |  2 +-
 docs/specification/xlang_serialization_spec.md |  4 +-
 docs/start/usage.md|  2 +-
 docusaurus.config.ts   |  6 +-
 src/pages/download.md  |  2 +-
 src/pages/index.tsx|  6 +-
 18 files changed, 104 insertions(+), 99 deletions(-)

diff --git a/README.md b/README.md
index 2026596..9cb0c43 100644
--- a/README.md
+++ b/README.md
@@ -1,6 +1,11 @@
 # Apache Fury (incubating) Website
 The source repository of static website for Apache Fury (incubating).
 
+> [!IMPORTANT]
+> Apache Fury (incubating) is an effort undergoing incubation at the Apache
+> Software Foundation (ASF), sponsored by the Apache Incubator PMC.
+>
+> Please read the [DISCLAIMER](DISCLAIMER) and a full explanation of 
["incubating"](https://incubator.apache.org/policy/incubation.html).
 
 ### Installation
 
diff --git 
a/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
 
b/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
index ebdc99c..75db553 100644
--- 
a/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
+++ 
b/blog/2024-04-25-fury_blazing_fast_multiple_language_serialization_framework.md
@@ -9,7 +9,7 @@ Apache Fury (incubating) is a multi-language serialization 
framework powered by
 
 
 
-The GitHub address of fury repository is: 
https://github.com/apache/incubator-fury
+The GitHub address of fury repository is: https://github.com/apache/fury
 
 
 
@@ -21,7 +21,7 @@ Static serialization frameworks like 
[Protobuf](https://github.com/protocolbuffe
 
 Dynamic serialization frameworks such as JDK serialization, Kryo, Fst, 
Hessian, Pickle provide ease-of-use and dynamics, but **don't support 
cross-language** and suffer significant **performance issues**, which is 
unsuitable for high throughput, low latency, and large-scale data transfer 
scenarios.
 
-Therefore, we developed a new multi-language serialization framework **Apache 
Fury**, which is open-sourced on https://github.com/apache/incubator-fury. 
Through **highly optimized serialization primitives, JIT dynamic compilation 
and zero-copy** technologies, Fury is both fast and easy-to-use. It can 
**cross-language serialize any object automatically** and provides **ultimate 
performance** at the same time.
+Therefore, we developed a new multi-language serialization framework **Apache 
Fury**, which is open-sourced on https://github.com/apache/fury. Through 
**highly optimized serialization primitives, JIT dynamic compilation and 
zero-copy** technologies, Fury is both fast and easy-to-use. It can 
**cross-language serialize any object automatically** and provides **ultimate 
performance** at the same time.
 
 
 
@@ -212,7 +212,7 @@ For fairness, Fury disabled the zero-copy feature for all 
tests.
 
 We are committed to building Apache Fury into an open and neutral community 
project that pursues passion and innovation. The development and discussion are 
open-sourced and transparent in the community. Any form of participation is 
welcome, including but not limited to questions, code contributions, technical 
discussions, etc. We are looking forward to receiving your ideas and feedback, 
participating in the project together, pushing the project forward and creating 
a better serialization [...]
 
-The GitHub address of the fury repository is: 
https://github.com/apache/incubator-fury
+The GitHub address of the fury repository is: https://github.com/apache/fury
 
 Official website: https://fury.apache.org
 
diff --git a/blog/2024-05-03-fury_0_5_0_rele

(incubator-fury) branch main updated: chore(doc): add incubating DISCLAIMER (#1681)

2024-06-11 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 0251df04 chore(doc): add incubating DISCLAIMER (#1681)
0251df04 is described below

commit 0251df047ee9bb7ad9593f019409413fa8cc0948
Author: Shawn Yang 
AuthorDate: Wed Jun 12 00:00:02 2024 +0800

chore(doc): add incubating DISCLAIMER (#1681)

## What does this PR do?

add incubating DISCLAIMER

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .github/ISSUE_TEMPLATE/bug_report.yml  | 10 -
 .github/pull_request_template.md   |  6 ++---
 .github/sync.yml   |  2 +-
 .github/workflows/release.yaml |  4 ++--
 CONTRIBUTING.md| 10 -
 README.md  | 20 +++--
 ci/format.sh   |  2 +-
 docs/guide/DEVELOPMENT.md  |  2 +-
 docs/guide/graalvm_guide.md| 26 +++---
 docs/guide/scala_guide.md  |  6 ++---
 docs/guide/xlang_serialization_guide.md|  8 +++
 docs/specification/java_serialization_spec.md  |  2 +-
 docs/specification/xlang_serialization_spec.md |  4 ++--
 go/fury/fury_xlang_test.go |  2 +-
 go/fury/go.mod |  2 +-
 .../org/apache/fury/benchmark/state/JsonTest.java  |  2 +-
 .../java/org/apache/fury/reflect/TypeRefTest.java  |  4 ++--
 .../fury/serializer/CodegenSerializerTest.java |  2 +-
 .../serializer/collection/MapSerializersTest.java  |  2 +-
 java/pom.xml   |  8 +++
 javascript/package.json|  2 +-
 javascript/packages/fury/package.json  |  2 +-
 rust/Cargo.toml|  2 +-
 .../org/apache/fury/serializer/ScalaTest.scala |  6 ++---
 24 files changed, 71 insertions(+), 65 deletions(-)

diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml 
b/.github/ISSUE_TEMPLATE/bug_report.yml
index dc37b26b..2ce165de 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.yml
+++ b/.github/ISSUE_TEMPLATE/bug_report.yml
@@ -26,16 +26,16 @@ body:
 attributes:
   label: Search before asking
   description: >
-Please make sure to search in the 
[issues](https://github.com/apache/incubator-fury/issues) first to see whether 
the same issue was reported already.
+Please make sure to search in the 
[issues](https://github.com/apache/fury/issues) first to see whether the same 
issue was reported already.
   options:
 - label: >
-I had searched in the 
[issues](https://github.com/apache/incubator-fury/issues) and found no similar 
issues.
+I had searched in the 
[issues](https://github.com/apache/fury/issues) and found no similar issues.
   required: true
   - type: textarea
 attributes:
   label: Version
   description: >
-Please provide the versions of Fury, OS, and others such as 
JDK/Python/Gcc/Clang/Go/NodeJS if they are used. 
+Please provide the versions of Fury, OS, and others such as 
JDK/Python/Gcc/Clang/Go/NodeJS if they are used.
 If Fury is the unstable version, please input commit id.
 validations:
   required: true
@@ -80,10 +80,10 @@ body:
 attributes:
   label: Are you willing to submit a PR?
   description: >
-We very much look forward to developers or users to help solve Fury 
problems together. 
+We very much look forward to developers or users to help solve Fury 
problems together.
 If you are willing to submit a PR to fix this problem, please tick it.
   options:
 - label: I'm willing to submit a PR!
   - type: markdown
 attributes:
-  value: "Thanks for completing our form!"
\ No newline at end of file
+  value: "Thanks for completing our form!"
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 6e5d4d60..fcd36c1e 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,11 +1,11 @@
 
@@ -29,7 +29,7 @@ Is there any related issue? Please attach here.
 ## Does this PR introduce any user-facing change?
 
 
 
 - [ ] Does this PR introduce any public API change?
diff --git a/.github/sync.yml b/.github/sync.yml
index 432f85c5..87e9c8f4 100644
--- a/.github/sync.yml
+++ b/.github/sync.yml
@@ -15,7 +15,7 @@
 # specific language governing perm

(incubator-fury) branch main updated: fix(java): Fix header offset issue in MetaStringBytes hashcode (#1668)

2024-06-02 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new a2515a93 fix(java): Fix header offset issue in MetaStringBytes 
hashcode (#1668)
a2515a93 is described below

commit a2515a936b439129d93eb22acc5c63a23285f23b
Author: LiangliangSui <116876207+liangliang...@users.noreply.github.com>
AuthorDate: Mon Jun 3 13:07:58 2024 +0800

fix(java): Fix header offset issue in MetaStringBytes hashcode (#1668)



## What does this PR do?


MetaStringBytes `hashcode & 0xff`, that is, header, represents the
encoding

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark



-

Signed-off-by: LiangliangSui 
---
 .../src/main/java/org/apache/fury/resolver/MetaStringBytes.java   | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/resolver/MetaStringBytes.java 
b/java/fury-core/src/main/java/org/apache/fury/resolver/MetaStringBytes.java
index 8867a9e7..f14cbce8 100644
--- a/java/fury-core/src/main/java/org/apache/fury/resolver/MetaStringBytes.java
+++ b/java/fury-core/src/main/java/org/apache/fury/resolver/MetaStringBytes.java
@@ -28,6 +28,7 @@ import org.apache.fury.util.MurmurHash3;
 @Internal
 final class MetaStringBytes {
   static final short DEFAULT_DYNAMIC_WRITE_STRING_ID = -1;
+  private static final int HEADER_MASK = 0xff;
 
   final byte[] bytes;
   final long hashCode;
@@ -55,7 +56,7 @@ final class MetaStringBytes {
   hashCode += 256; // last byte is reserved for header.
 }
 hashCode &= 0xff00L;
-int header = metaString.getEncoding().getValue();
+int header = metaString.getEncoding().getValue() & HEADER_MASK;
 this.hashCode = hashCode | header;
   }
 
@@ -64,9 +65,8 @@ final class MetaStringBytes {
   }
 
   public String decode(MetaStringDecoder decoder) {
-int header = (int) (hashCode & 0xff);
-int encodingFlags = header & 0b111;
-MetaString.Encoding encoding = MetaString.Encoding.values()[encodingFlags];
+int header = (int) (hashCode & HEADER_MASK);
+MetaString.Encoding encoding = MetaString.Encoding.values()[header];
 return decoder.decode(bytes, encoding);
   }
 


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-06-01 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 5e35f15   synced local 'docs/guide/' with remote 'docs/guide/'
5e35f15 is described below

commit 5e35f15953d0f1a942fd5b79050e6e47a3f0d514
Author: chaokunyang 
AuthorDate: Sat Jun 1 07:47:59 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/java_serialization_guide.md | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/docs/guide/java_serialization_guide.md 
b/docs/guide/java_serialization_guide.md
index 4869d83..2cca181 100644
--- a/docs/guide/java_serialization_guide.md
+++ b/docs/guide/java_serialization_guide.md
@@ -108,7 +108,9 @@ public class Example {
 | `registerGuavaTypes`| Whether to pre-register Guava types 
such as `RegularImmutableMap`/`RegularImmutableList`. These types are not 
public API, but seem pretty stable. 



   [...]
 | `requireClassRegistration`  | Disabling may allow unknown classes to 
be deserialized, potentially causing security risks.




  [...]
 | `suppressClassRegistrationWarnings` | Whether to suppress class registration 
warnings. The warnings can be used for security audit, but may be annoying, 
this suppression will be enabled by default.



  [...]
-| `shareMetaContext`  | Enables or disables meta share mode.   





  [...]
+| `metaShareEnabled`  | Enables or disables meta share mode.   





  [...]
+| `scopedMetaShareEnabled`| Scoped meta share focuses on a single 
serialization process. Metadata created or identified during this process is 
exclusive to it and is not shared with by other serializations. 



  [...]
+| `metaCompressor`| Set a compressor for meta compression. 
Note that the passed MetaCompressor should be thread-safe. By default, a 
`Deflater` based compressor `DeflaterMetaCompressor` will be used. Users can 
pass other compressor such as `zstd` for better compression rate.   


[...]
 | `deserializeNonexistentClass`   | Enables or disables 
deserialization/skipping of data for non-existent classes.  




 [...]
 | `codeGenEnabled`| Disabling may result

(incubator-fury) branch main updated: feat(java): support meta compression by Deflater (#1663)

2024-06-01 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new da5f8473 feat(java): support meta compression by Deflater (#1663)
da5f8473 is described below

commit da5f8473818bc2768b4f3b5a42c39a2c7fff8120
Author: Shawn Yang 
AuthorDate: Sat Jun 1 15:47:43 2024 +0800

feat(java): support meta compression by Deflater (#1663)

## What does this PR do?

This PR support meta compression and add Deflater as default compressor.

In our test, it can compress meta by reduce size of **243** without
introducing any performance cost:

```
before:
Fury | STRUCT | false | array | 1227 |

after
STRUCT | false | array | 984 |

```

## Related issues
#1660


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 docs/guide/java_serialization_guide.md |  4 +-
 .../main/java/org/apache/fury/config/Config.java   | 13 
 .../java/org/apache/fury/config/FuryBuilder.java   | 13 
 .../main/java/org/apache/fury/meta/ClassDef.java   |  1 +
 .../java/org/apache/fury/meta/ClassDefDecoder.java | 28 +---
 .../java/org/apache/fury/meta/ClassDefEncoder.java | 80 +-
 .../apache/fury/meta/DeflaterMetaCompressor.java   | 72 +++
 .../java/org/apache/fury/meta/MetaCompressor.java  | 53 ++
 .../apache/fury/meta/TypeEqualMetaCompressor.java  | 67 ++
 .../main/java/org/apache/fury/util/MathUtils.java  |  4 ++
 .../org/apache/fury/config/FuryBuilderTest.java| 75 
 11 files changed, 368 insertions(+), 42 deletions(-)

diff --git a/docs/guide/java_serialization_guide.md 
b/docs/guide/java_serialization_guide.md
index 4869d836..2cca181a 100644
--- a/docs/guide/java_serialization_guide.md
+++ b/docs/guide/java_serialization_guide.md
@@ -108,7 +108,9 @@ public class Example {
 | `registerGuavaTypes`| Whether to pre-register Guava types 
such as `RegularImmutableMap`/`RegularImmutableList`. These types are not 
public API, but seem pretty stable. 



   [...]
 | `requireClassRegistration`  | Disabling may allow unknown classes to 
be deserialized, potentially causing security risks.




  [...]
 | `suppressClassRegistrationWarnings` | Whether to suppress class registration 
warnings. The warnings can be used for security audit, but may be annoying, 
this suppression will be enabled by default.



  [...]
-| `shareMetaContext`  | Enables or disables meta share mode.   





  [...]
+| `metaShareEnabled`  | Enables or disables meta share mode.   





  [...]
+| `scopedMetaShareEnabled`| Scoped meta share focuses on a single 
serialization process. Metadata created or identified during this process is 
exclusive to it and is not shared with by other serializations

(incubator-fury) branch main updated: chore(doc): fix doc example code (#1666)

2024-05-31 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 062bd769 chore(doc): fix doc example code (#1666)
062bd769 is described below

commit 062bd769bed656937115318783767491d9170ca5
Author: wangjie 
AuthorDate: Fri May 31 18:12:09 2024 +0800

chore(doc): fix doc example code (#1666)

## What does this PR do?
according to comments,  should set `requireClassRegistration` to false


## Related issues


## Does this PR introduce any user-facing change?


- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 README.md  |  4 
 docs/guide/java_serialization_guide.md | 13 ++---
 2 files changed, 6 insertions(+), 11 deletions(-)

diff --git a/README.md b/README.md
index b619eeb4..ae35f375 100644
--- a/README.md
+++ b/README.md
@@ -159,8 +159,6 @@ public class Example {
 // multiple serializations of different objects.
 {
   Fury fury = Fury.builder().withLanguage(Language.JAVA)
-// Allow to deserialize objects unknown types, more flexible
-// but may be insecure if the classes contains malicious code.
 .requireClassRegistration(true)
 .build();
   // Registering types can reduce class name serialization overhead, but 
not mandatory.
@@ -171,8 +169,6 @@ public class Example {
 }
 {
   ThreadSafeFury fury = Fury.builder().withLanguage(Language.JAVA)
-// Allow to deserialize objects unknown types, more flexible
-// but may be insecure if the classes contains malicious code.
 .requireClassRegistration(true)
 .buildThreadSafeFury();
   // Registering types can reduce class name serialization overhead, but 
not mandatory.
diff --git a/docs/guide/java_serialization_guide.md 
b/docs/guide/java_serialization_guide.md
index ec9fdf38..4869d836 100644
--- a/docs/guide/java_serialization_guide.md
+++ b/docs/guide/java_serialization_guide.md
@@ -30,8 +30,6 @@ public class Example {
 // Note that Fury instances should be reused between
 // multiple serializations of different objects.
 Fury fury = Fury.builder().withLanguage(Language.JAVA)
-  // Allow to deserialize objects unknown types, more flexible
-  // but may be insecure if the classes contains malicious code.
   .requireClassRegistration(true)
   .build();
 // Registering types can reduce class name serialization overhead, but not 
mandatory.
@@ -80,11 +78,12 @@ import org.apache.fury.config.*;
 
 public class Example {
   // reuse fury.
-  private static final ThreadSafeFury fury = Fury.builder()
-// Allow to deserialize objects unknown types, more flexible
-// but may be insecure if the classes contains malicious code.
-.requireClassRegistration(true)
-.buildThreadSafeFury();
+  private static final ThreadSafeFury fury = new ThreadLocalFury(classLoader 
-> {
+  Fury f = Fury.builder().withLanguage(Language.JAVA)
+  .withClassLoader(classLoader).build();
+  f.register(SomeClass.class);
+  return f;
+  });
 
   public static void main(String[] args) {
 SomeClass object = new SomeClass();


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-05-31 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 3bfd223   synced local 'docs/guide/' with remote 'docs/guide/'
3bfd223 is described below

commit 3bfd2238fb5d65577889cd6ecdef538f8246e4b3
Author: chaokunyang 
AuthorDate: Fri May 31 10:12:26 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/java_serialization_guide.md | 13 ++---
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/docs/guide/java_serialization_guide.md 
b/docs/guide/java_serialization_guide.md
index ec9fdf3..4869d83 100644
--- a/docs/guide/java_serialization_guide.md
+++ b/docs/guide/java_serialization_guide.md
@@ -30,8 +30,6 @@ public class Example {
 // Note that Fury instances should be reused between
 // multiple serializations of different objects.
 Fury fury = Fury.builder().withLanguage(Language.JAVA)
-  // Allow to deserialize objects unknown types, more flexible
-  // but may be insecure if the classes contains malicious code.
   .requireClassRegistration(true)
   .build();
 // Registering types can reduce class name serialization overhead, but not 
mandatory.
@@ -80,11 +78,12 @@ import org.apache.fury.config.*;
 
 public class Example {
   // reuse fury.
-  private static final ThreadSafeFury fury = Fury.builder()
-// Allow to deserialize objects unknown types, more flexible
-// but may be insecure if the classes contains malicious code.
-.requireClassRegistration(true)
-.buildThreadSafeFury();
+  private static final ThreadSafeFury fury = new ThreadLocalFury(classLoader 
-> {
+  Fury f = Fury.builder().withLanguage(Language.JAVA)
+  .withClassLoader(classLoader).build();
+  f.register(SomeClass.class);
+  return f;
+  });
 
   public static void main(String[] args) {
 SomeClass object = new SomeClass();


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: chore(rust): resolve deprecate warnings (#1662)

2024-05-30 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 7ac2c6eb chore(rust): resolve deprecate warnings (#1662)
7ac2c6eb is described below

commit 7ac2c6eb50d08c112d7a599169aa48766de221dc
Author: Ruihang Xia 
AuthorDate: Thu May 30 23:38:35 2024 +0800

chore(rust): resolve deprecate warnings (#1662)



## What does this PR do?



- Resolve deprecate warnings from `chrono` dep
- Remove patch version in Cargo.toml

## Related issues



N/A

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

No

## Benchmark



Signed-off-by: Ruihang Xia 
---
 rust/fury-derive/Cargo.toml | 13 +
 rust/fury/Cargo.toml| 16 
 rust/fury/src/deserializer.rs   |  2 +-
 rust/fury/src/row/row.rs|  6 +++---
 rust/fury/src/serializer.rs |  4 +++-
 rust/tests/Cargo.toml   |  4 ++--
 rust/tests/tests/test_complex_struct.rs |  4 ++--
 7 files changed, 28 insertions(+), 21 deletions(-)

diff --git a/rust/fury-derive/Cargo.toml b/rust/fury-derive/Cargo.toml
index 1034fe26..ced37343 100644
--- a/rust/fury-derive/Cargo.toml
+++ b/rust/fury-derive/Cargo.toml
@@ -25,7 +25,12 @@ rust-version.workspace = true
 proc-macro = true
 
 [dependencies]
-proc-macro2 = { default-features = false, version = "1.0.66" }
-syn = { default-features = false, version = "2.0.26", features = ["parsing", 
"proc-macro", "derive", "printing"] }
-quote = { default-features = false, version = "1.0.31" }
-thiserror = { default-features = false, version = "1.0.43" }
+proc-macro2 = { default-features = false, version = "1.0" }
+syn = { default-features = false, version = "2.0", features = [
+"parsing",
+"proc-macro",
+"derive",
+"printing",
+] }
+quote = { default-features = false, version = "1.0" }
+thiserror = { default-features = false, version = "1.0" }
diff --git a/rust/fury/Cargo.toml b/rust/fury/Cargo.toml
index ed24f0cd..d39d5375 100644
--- a/rust/fury/Cargo.toml
+++ b/rust/fury/Cargo.toml
@@ -22,11 +22,11 @@ edition.workspace = true
 rust-version.workspace = true
 
 [dependencies]
-proc-macro2 = { default-features = false, version = "1.0.66" }
-syn = { default-features = false, version = "2.0.26", features = ["full", 
"fold"] }
-quote = { default-features = false, version = "1.0.31" }
-fury-derive = { path="../fury-derive"}
-lazy_static = { version = "1.4.0" }
-byteorder = { version = "1.4.3" }
-chrono = "0.4.26"
-thiserror = { default-features = false, version = "1.0.43" }
\ No newline at end of file
+proc-macro2 = { default-features = false, version = "1.0" }
+syn = { default-features = false, version = "2.0", features = ["full", "fold"] 
}
+quote = { default-features = false, version = "1.0" }
+fury-derive = { path = "../fury-derive" }
+lazy_static = { version = "1.4" }
+byteorder = { version = "1.4" }
+chrono = "0.4"
+thiserror = { default-features = false, version = "1.0" }
diff --git a/rust/fury/src/deserializer.rs b/rust/fury/src/deserializer.rs
index ac443ea3..764f5595 100644
--- a/rust/fury/src/deserializer.rs
+++ b/rust/fury/src/deserializer.rs
@@ -166,7 +166,7 @@ impl Deserialize for 
HashSet {
 impl Deserialize for NaiveDateTime {
 fn read(deserializer:  DeserializerState) -> Result {
 let timestamp = deserializer.reader.u64();
-let ret = NaiveDateTime::from_timestamp_millis(timestamp as i64);
+let ret = DateTime::from_timestamp_millis(timestamp as i64).map(|dt| 
dt.naive_utc());
 match ret {
 Some(r) => Ok(r),
 None => Err(Error::NaiveDateTime),
diff --git a/rust/fury/src/row/row.rs b/rust/fury/src/row/row.rs
index 28c32e6b..be0f6591 100644
--- a/rust/fury/src/row/row.rs
+++ b/rust/fury/src/row/row.rs
@@ -17,7 +17,7 @@
 
 use crate::{buffer::Writer, Error};
 use byteorder::{ByteOrder, LittleEndian};
-use chrono::{Days, NaiveDate, NaiveDateTime};
+use chrono::{DateTime, Days, NaiveDate, NaiveDateTime};
 use std::collections::BTreeMap;
 use std::marker::PhantomData;
 
@@ -109,12 +109,12 @@ impl<'a> Row<'a> for NaiveDateTime {
 type ReadResult = Result;
 
 fn write(v: , writer:  Writer) {
-writer.i64(v.timestamp_millis());
+ 

(incubator-fury) branch main updated: chore: Add IssueNavigationLink and icon for IDEA (#1665)

2024-05-30 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new cdcb3b25 chore: Add IssueNavigationLink and icon for IDEA (#1665)
cdcb3b25 is described below

commit cdcb3b2558cf04951dad2e83a9909f45f2897a12
Author: lvshaokang 
AuthorDate: Thu May 30 18:52:24 2024 +0800

chore: Add IssueNavigationLink and icon for IDEA (#1665)



## What does this PR do?


Add IssueNavigationLink and icon[1] for IDEA

[1] https://fury.apache.org/img/navbar-logo.svg
## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark



Co-authored-by: red 
---
 .idea/icon.png | Bin 0 -> 54513 bytes
 .idea/vcs.xml  |  16 
 2 files changed, 16 insertions(+)

diff --git a/.idea/icon.png b/.idea/icon.png
new file mode 100644
index ..e843ef42
Binary files /dev/null and b/.idea/icon.png differ
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index ..a70151c7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,16 @@
+
+
+  
+
+  
+
+  
+  https://github.com/apache/incubator-fury/pull/$1; />
+
+  
+
+  
+  
+
+  
+
\ No newline at end of file


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: feat(java): scoped meta share mode for type forward/backward compaibility (#1660)

2024-05-30 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new a0a6d7b7 feat(java): scoped meta share mode for type forward/backward 
compaibility (#1660)
a0a6d7b7 is described below

commit a0a6d7b7f494f167ac46592dfc8b2a8c4706c5f2
Author: Shawn Yang 
AuthorDate: Thu May 30 14:19:29 2024 +0800

feat(java): scoped meta share mode for type forward/backward compaibility 
(#1660)

## What does this PR do?

This PR implements scoped meta share mode for type forward/backward
compaibility

## Related issues

#202


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark
Perf increased from `1900102.586` to `2430410.064`
```
Before:

Benchmark   
(bufferType)   (objectType)  (references)   Mode  CntScoreError 
 Units
fury_deserialize  array  MEDIA_CONTENT 
false  thrpt   10  2734151.212 ± 253921.628  ops/s
fury_deserialize_compatible   array  MEDIA_CONTENT 
false  thrpt   10  1900102.586 ±  62176.872  ops/s
furymetashared_deserialize_compatible array  MEDIA_CONTENT 
false  thrpt   10  3011439.327 ± 260518.752  ops/s

After:

Benchmark   
(bufferType)   (objectType)  (references)   Mode  CntScoreError 
 Units
fury_deserialize  array  MEDIA_CONTENT 
false  thrpt   10  2661186.814 ± 279377.198  ops/s
fury_deserialize_compatible   array  MEDIA_CONTENT 
false  thrpt   10  2430410.064 ± 164165.865  ops/s
furymetashared_deserialize_compatible array  MEDIA_CONTENT 
false  thrpt   10  3098083.064 ± 259391.053  ops/s
```

Size decreased from **732 to 577**:
```
Before
2024-05-30 01:00:49 INFO  FuryState:157 
[fury_deserialize_compatible-jmh-worker-1] - ==> Fury | MEDIA_CONTENT | 
false | array | 732 |

After
2024-05-30 12:57:00 INFO  FuryState:157 
[fury_deserialize_compatible-jmh-worker-1] - ==> Fury | MEDIA_CONTENT | 
false | array | 577 |
```

The
---
 .../integration_tests/RecordSerializersTest.java   |   8 +-
 java/benchmark/pom.xml |   6 ++
 .../fury/benchmark/UserTypeDeserializeSuite.java   |   8 +-
 .../fury/benchmark/UserTypeSerializeSuite.java |   6 +-
 .../org/apache/fury/benchmark/state/FuryState.java |   8 +-
 .../org/apache/fury/benchmark/state/KryoState.java |   4 +
 .../src/main/java/org/apache/fury/Fury.java|  20 ++--
 .../fury/builder/MetaSharedCodecBuilder.java   |   2 +-
 .../apache/fury/builder/ObjectCodecBuilder.java|   2 +-
 .../main/java/org/apache/fury/config/Config.java   |  26 --
 .../java/org/apache/fury/config/FuryBuilder.java   |  19 +++-
 .../main/java/org/apache/fury/meta/ClassDef.java   |  48 +-
 .../java/org/apache/fury/meta/ClassDefDecoder.java |  28 ++
 .../java/org/apache/fury/meta/ClassDefEncoder.java |  53 ++-
 .../main/java/org/apache/fury/meta/ClassSpec.java  |  54 +++
 .../main/java/org/apache/fury/meta/Encoders.java   |  66 +
 .../org/apache/fury/reflect/ReflectionUtils.java   |   5 +-
 .../java/org/apache/fury/resolver/ClassInfo.java   |  29 +-
 .../org/apache/fury/resolver/ClassResolver.java| 103 -
 .../apache/fury/resolver/SerializationContext.java |  46 -
 .../apache/fury/serializer/ArraySerializers.java   |   4 +
 .../fury/serializer/MetaSharedSerializer.java  |   5 +-
 .../apache/fury/serializer/NonexistentClass.java   |  17 +++-
 .../serializer/NonexistentClassSerializers.java|   4 +-
 .../apache/fury/serializer/ObjectSerializer.java   |  14 +--
 .../collection/AbstractCollectionSerializer.java   |   4 +-
 .../src/test/java/org/apache/fury/CyclicTest.java  |   2 +-
 .../test/java/org/apache/fury/FuryInitPerf.java|   6 +-
 .../java/org/apache/fury/ThreadSafeFuryTest.java   |   3 +-
 .../org/apache/fury/meta/ClassDefEncoderTest.java  |   7 +-
 .../java/org/apache/fury/meta/ClassDefTest.java|   6 +-
 .../apache/fury/reflect/ReflectionUtilsTest.java   |  31 +++
 .../org/apache/fury/resolver/MetaContextTest.java  |   6 +-
 .../fury/resolver/SerializationContextTest.java|   6 +-
 .../fury/serializer/MetaSharedCompatibleTest.java  |  34 +++
 .../NonexistentClassSerializersTest.java   |  46 +
 .../serializer/ProtocolInteroperabilityTest.java   |   4 +-
 .../collection/ChildContainerSerializersTest.java 

(incubator-fury-site) branch main updated: [Community] add fury release documentation (#109)

2024-05-29 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new d7dcd04  [Community] add fury release documentation (#109)
d7dcd04 is described below

commit d7dcd04d7831e3e669435526c34981a8c9d71000
Author: Shawn Yang 
AuthorDate: Thu May 30 10:45:19 2024 +0800

[Community] add fury release documentation (#109)

# What this PR do?

This release doc is referenced from opendal and streampark, thanks for
their great work.

The website screencut:



![image](https://github.com/apache/incubator-fury-site/assets/12445254/e6117b8e-3223-4d9a-90b2-8cf587e97ea9)


![image](https://github.com/apache/incubator-fury-site/assets/12445254/30fc6ce7-f5c4-4abe-a7c5-1d97301b2e5c)

# Related issue
https://github.com/apache/incubator-fury/issues/1421
https://github.com/apache/incubator-fury/issues/1389
---
 docs/community/how_to_release.md | 508 +++
 docs/community/how_to_verify.md  | 117 +
 docusaurus.config.ts |   6 +
 sidebars.ts  |   2 +-
 4 files changed, 632 insertions(+), 1 deletion(-)

diff --git a/docs/community/how_to_release.md b/docs/community/how_to_release.md
new file mode 100644
index 000..0db88b4
--- /dev/null
+++ b/docs/community/how_to_release.md
@@ -0,0 +1,508 @@
+---
+title: How to release
+sidebar_position: 0
+id: how_to_release
+---
+
+This document mainly introduces how the release manager releases a new version 
of Apache Fury.
+
+## Introduction
+
+Source Release is the most important part which Apache values.
+
+Please pay more attention to license and signing issues.
+Publishing software is a serious thing and has legal consequences. 
+
+## First-time as a release manager
+
+### Environmental requirements
+This release process is operated in the Ubuntu OS, and the following tools are 
required:
+
+- JDK 1.8
+- Apache Maven 3.x
+- Python 3.8
+- GnuPG 2.x
+- Git
+- SVN (apache uses svn to host project releases)
+- Pay attention to setting environment variables: if you configure gpg keys 
under a different directory, please `export GNUPGHOME=$(xxx)`
+
+### Prepare GPG Key
+If you are the first to become a release manager, you need to prepare a gpg 
key. 
+
+Following is a quick setup, you can refer to [Apache openpgp 
doc](https://infra.apache.org/openpgp.html) for further details.
+
+ Install GPG
+```bash
+sudo apt install gnupg2
+```
+
+ Generate GPG Key
+Please use your apache name and email for generate key
+```bash
+$ gpg --full-gen-key
+gpg (GnuPG) 2.2.20; Copyright (C) 2020 Free Software Foundation, Inc.
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+Please select what kind of key you want:
+   (1) RSA and RSA (default)
+   (2) DSA and Elgamal
+   (3) DSA (sign only)
+   (4) RSA (sign only)
+  (14) Existing key from card
+Your selection? 1 # input 1
+RSA keys may be between 1024 and 4096 bits long.
+What keysize do you want? (2048) 4096 # input 4096
+Requested keysize is 4096 bits
+Please specify how long the key should be valid.
+ 0 = key does not expire
+= key expires in n days
+  w = key expires in n weeks
+  m = key expires in n months
+  y = key expires in n years
+Key is valid for? (0) 0 # input 0
+Key does not expire at all
+Is this correct? (y/N) y # input y
+
+GnuPG needs to construct a user ID to identify your key.
+
+Real name: Chaokun Yang   # input your name
+Email address: chaokuny...@apache.org # input your email
+Comment: CODE SIGNING KEY # input some annotations, optional
+You selected this USER-ID:
+"Chaokun "
+
+Change (N)ame, (C)omment, (E)mail or (O)kay/(Q)uit? O # input O
+We need to generate a lot of random bytes. It is a good idea to perform
+some other action (type on the keyboard, move the mouse, utilize the
+disks) during the prime generation; this gives the random number
+generator a better chance to gain enough entropy.
+We need to generate a lot of random bytes. It is a good idea to perform
+some other action (type on the keyboard, move the mouse, utilize the
+disks) during the prime generation; this gives the random number
+generator a better chance to gain enough entropy.
+
+# Input the security key
+┌──┐
+│ Please enter this passphrase │
+│  │
+│ Passphrase: ___  │
+│  │
+│  │
+└──┘
+# key generation will be done after your inputting the key with the

(incubator-fury) branch main updated: fix(java): fix scala object type codegen (#1659)

2024-05-29 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 3f5cf314 fix(java): fix scala object type codegen (#1659)
3f5cf314 is described below

commit 3f5cf31461cfed1f2c1d0f5b620529fe4abb6f40
Author: Shawn Yang 
AuthorDate: Wed May 29 21:13:23 2024 +0800

fix(java): fix scala object type codegen (#1659)

## What does this PR do?

fix scala object type codegen

## Related issues

Closes #1658

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/codegen/CodegenContext.java|  9 +++---
 .../java/org/apache/fury/codegen/Expression.java   |  2 +-
 .../org/apache/fury/reflect/ReflectionUtils.java   |  9 --
 .../main/java/org/apache/fury/type/TypeUtils.java  |  4 +--
 java/fury-testsuite/pom.xml|  6 
 .../java/org/apache/fury/test/SparkTypeTest.java   | 34 +-
 .../serializer/SingleObjectSerializerTest.scala|  2 +-
 7 files changed, 34 insertions(+), 32 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/codegen/CodegenContext.java 
b/java/fury-core/src/main/java/org/apache/fury/codegen/CodegenContext.java
index 624e55e9..4a324f14 100644
--- a/java/fury-core/src/main/java/org/apache/fury/codegen/CodegenContext.java
+++ b/java/fury-core/src/main/java/org/apache/fury/codegen/CodegenContext.java
@@ -252,8 +252,7 @@ public class CodegenContext {
 if (clz.isArray()) {
   return "arr";
 } else {
-  String canonicalName = clz.getCanonicalName();
-  String type = canonicalName != null ? type(clz) : "Object";
+  String type = clz.getCanonicalName() != null ? type(clz) : "Object";
   int index = type.lastIndexOf(".");
   String name;
   if (index >= 0) {
@@ -283,7 +282,7 @@ public class CodegenContext {
 if (clz.isArray()) {
   return getArrayType(clz);
 }
-String type = ReflectionUtils.getCanonicalName(clz);
+String type = ReflectionUtils.getLiteralName(clz);
 if (type.startsWith("java.lang")) {
   if (!type.substring("java.lang.".length()).contains(".")) {
 String simpleName = clz.getSimpleName();
@@ -360,7 +359,7 @@ public class CodegenContext {
*/
   public void addImports(Class... classes) {
 for (Class clz : classes) {
-  imports.add(ReflectionUtils.getCanonicalName(clz));
+  imports.add(ReflectionUtils.getLiteralName(clz));
 }
   }
 
@@ -382,7 +381,7 @@ public class CodegenContext {
* @param cls class to be imported
*/
   public void addImport(Class cls) {
-this.imports.add(ReflectionUtils.getCanonicalName(cls));
+this.imports.add(ReflectionUtils.getLiteralName(cls));
   }
 
   /**
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java 
b/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java
index d2572f77..36cdeb44 100644
--- a/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java
+++ b/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java
@@ -343,7 +343,7 @@ public interface Expression {
   if (valueClass.isArray()) {
 v = String.format("%s.class", TypeUtils.getArrayType((Class) 
value));
   } else {
-v = String.format("%s.class", 
ReflectionUtils.getCanonicalName((Class) (value)));
+v = String.format("%s.class", 
ReflectionUtils.getLiteralName((Class) (value)));
   }
   return new ExprCode(FalseLiteral, new LiteralValue(javaType, v));
 } else {
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/reflect/ReflectionUtils.java 
b/java/fury-core/src/main/java/org/apache/fury/reflect/ReflectionUtils.java
index d837896c..f641f14a 100644
--- a/java/fury-core/src/main/java/org/apache/fury/reflect/ReflectionUtils.java
+++ b/java/fury-core/src/main/java/org/apache/fury/reflect/ReflectionUtils.java
@@ -554,17 +554,22 @@ public class ReflectionUtils {
   }
 
   /**
-   * Returns the canonical name of the underlying class as defined by 
The Java Language
+   * Returns the literal name of the underlying class as defined by The 
Java Language
* Specification. Throw {@link IllegalArgumentException} if the 
underlying class does not
* have a canonical name(i.e., if it is a local or anonymous class or an 
array whose component
* type does not have a canonical name).
*
* @throws IllegalArgumentException if the canonical name of the underlying 
class doesn't exist.
*/
-  public static String getCanonicalName(Class cls)

(incubator-fury-site) branch main updated: 0.5.1 releae blog (#126)

2024-05-28 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new e6dd117  0.5.1 releae blog (#126)
e6dd117 is described below

commit e6dd1175cf337eb7808c0640ac84c59a68958620
Author: Shawn Yang 
AuthorDate: Wed May 29 11:28:05 2024 +0800

0.5.1 releae blog (#126)


![image](https://github.com/apache/incubator-fury-site/assets/12445254/dd139f50-e704-477e-a1ec-134dee74c6a8)
---
 blog/2024-05-28-fury_0_5_1_release.md | 54 +++
 1 file changed, 54 insertions(+)

diff --git a/blog/2024-05-28-fury_0_5_1_release.md 
b/blog/2024-05-28-fury_0_5_1_release.md
new file mode 100644
index 000..b868062
--- /dev/null
+++ b/blog/2024-05-28-fury_0_5_1_release.md
@@ -0,0 +1,54 @@
+---
+slug: fury_0_5_1_release
+title: Fury 0.5.1 Released
+authors: [chaokunyang]
+tags: [fury]
+---
+
+The Apache Fury team is pleased to announce the 0.5.1 release. This is a minor 
release that includes [36 
PR](https://github.com/apache/incubator-fury/compare/v0.5.0...v0.5.1) from 7 
distinct contributors. See the Install Page to learn how to get the libraries 
for your platform.
+
+## Feature
+* feat(spec): remove list/map header from type meta spec by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1590
+* perf(java): Reduce performance regression caused by deleteCharAt by 
@LiangliangSui in https://github.com/apache/incubator-fury/pull/1591
+* feat(java): type meta encoding for java by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1556 and 
https://github.com/apache/incubator-fury/pull/1601
+* feat(sepc): update type meta field info spec by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1603
+* feat(javascript): add data to description util by @bytemain in 
https://github.com/apache/incubator-fury/pull/1609
+* feat(java): Support CopyOnWriteArrayListSerializer by @MrChang0 in 
https://github.com/apache/incubator-fury/pull/1613
+* feat(java): add blocked stream utils by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1617
+* feat(go/java): Add ASCII check before meta string encoding by @jasonmokk in 
https://github.com/apache/incubator-fury/pull/1620
+* feat(java): register old version guava collect by @MrChang0 in 
https://github.com/apache/incubator-fury/pull/1622
+* feat(java): support deserialization ignoreEnumDeserializeError by @157152688 
in https://github.com/apache/incubator-fury/pull/1623
+* feat(java): add set serializer for concurrent set by @MrChang0 in 
https://github.com/apache/incubator-fury/pull/1616
+* feat(java): add custom serializer register in case of special serializer ctr 
by @MrChang0 in https://github.com/apache/incubator-fury/pull/1625
+* feat(java): remove soft/weak ref values from thread safe fury by 
@chaokunyang in https://github.com/apache/incubator-fury/pull/1639
+* refactor(java): Remove Guava's Collection usages by @Munoon in 
https://github.com/apache/incubator-fury/pull/1611 and 
https://github.com/apache/incubator-fury/pull/1614
+* refactor(java): replace Guava's string utility methods with own 
implementation by @Munoon in https://github.com/apache/incubator-fury/pull/1624
+
+## Bug Fix
+* fix(java): compatible low version guava by @MrChang0 in 
https://github.com/apache/incubator-fury/pull/1593 and 
https://github.com/apache/incubator-fury/pull/1594
+* fix(java): fix getClassDef thead safety by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1597
+* fix(java): remove maven groupId change by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1602
+* fix(java): make slf4j provided by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1605
+* fix(java): clear serializer for collection/map by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1606
+* fix(java): fix TypeRef getSubType by @chaokunyang in 
https://github.com/apache/incubator-fury/pull/1608
+* fix(java): fix fastutil Object2ObjectOpenHashMap serialization by 
@chaokunyang in https://github.com/apache/incubator-fury/pull/1618
+* fix(java): subclass without fields will encode superclass by @MrChang0 in 
https://github.com/apache/incubator-fury/pull/1626
+* fix(java): fix wildcard capturer capture NullPointerException by 
@chaokunyang in https://github.com/apache/incubator-fury/pull/1637
+* fix(java): fix abstract collection elems same type serialization by 
@chaokunyang in https://github.com/apache/incubator-fury/pull/1641
+* fix(java): ThreadPoolFury#factoryCallback don't work when create new 
classLoaderFuryPooled by @MrChang0 in 
https://github.com/apache/incubator-fury/pull/1628
+* fix(go/java): Enhance ASCII check in meta string encoding by @jasonmokk in 
https://github.com/apache/incubator-fury/pull/1631
+
+## Misc
+* chore(java): move tests to meta/reflect pkg by @chaokunyang

(incubator-fury) branch main updated: chore: bump release version to 0.5.1 (#1652)

2024-05-28 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 489439d7 chore: bump release version to 0.5.1 (#1652)
489439d7 is described below

commit 489439d74c99cb20d7c40198ff10c0e390f96703
Author: Shawn Yang 
AuthorDate: Tue May 28 19:01:43 2024 +0800

chore: bump release version to 0.5.1 (#1652)

## What does this PR do?

This PR bumps release version to 0.5.1 since fury 0.5.1 has been
released

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 README.md | 6 +++---
 ci/release.py | 2 +-
 docs/guide/scala_guide.md | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/README.md b/README.md
index 01cb76dc..11ec450f 100644
--- a/README.md
+++ b/README.md
@@ -111,19 +111,19 @@ Release version:
 
   org.apache.fury
   fury-core
-  0.5.0
+  0.5.1
 
 
 
 ```
 
 ### Scala
 ```sbt
-libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
+libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.1"
 ```
 
 ### Python
diff --git a/ci/release.py b/ci/release.py
index 19ab919f..be2c8a4a 100644
--- a/ci/release.py
+++ b/ci/release.py
@@ -47,7 +47,7 @@ def prepare(v: str):
 
 
 def build(v: str):
-"""version format: 0.5.0"""
+"""version format: 0.5.1"""
 logger.info("Start to prepare release artifacts for version %s", v)
 _check_release_version(v)
 os.chdir(PROJECT_ROOT_DIR)
diff --git a/docs/guide/scala_guide.md b/docs/guide/scala_guide.md
index 7527029c..f83a41cd 100644
--- a/docs/guide/scala_guide.md
+++ b/docs/guide/scala_guide.md
@@ -16,7 +16,7 @@ Scala 2 and 3 are both supported.
 
 ## Install
 ```sbt
-libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
+libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.1"
 ```
 
 ## Fury creation


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-05-28 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 43a659e   synced local 'docs/guide/' with remote 'docs/guide/'
43a659e is described below

commit 43a659ef725c8ce6dee313ce32b3d8f1ec27532c
Author: chaokunyang 
AuthorDate: Tue May 28 11:01:57 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/scala_guide.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/guide/scala_guide.md b/docs/guide/scala_guide.md
index 7527029..f83a41c 100644
--- a/docs/guide/scala_guide.md
+++ b/docs/guide/scala_guide.md
@@ -16,7 +16,7 @@ Scala 2 and 3 are both supported.
 
 ## Install
 ```sbt
-libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
+libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.1"
 ```
 
 ## Fury creation


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: upgrade install version to 0.5.1 (#125)

2024-05-28 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 9a8a1da  upgrade install version to 0.5.1 (#125)
9a8a1da is described below

commit 9a8a1da62b9ee6e4f6179799707b39f35e3ab20f
Author: Shawn Yang 
AuthorDate: Tue May 28 18:55:34 2024 +0800

upgrade install version to 0.5.1 (#125)
---
 docs/start/install.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/start/install.md b/docs/start/install.md
index 84d4002..f7f63e0 100644
--- a/docs/start/install.md
+++ b/docs/start/install.md
@@ -15,12 +15,12 @@ To add a dependency on Fury using Maven, use the following:
 
   org.apache.fury
   fury-core
-  0.5.0
+  0.5.1
 
 
 
 ```


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) tag v0.5.1 created (now 0455ff73)

2024-05-28 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to tag v0.5.1
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 0455ff73 (commit)
No new revisions were added by this update.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



svn commit: r69421 - /dev/incubator/fury/0.5.1-rc2/ /release/incubator/fury/0.5.1/

2024-05-28 Thread chaokunyang
Author: chaokunyang
Date: Tue May 28 10:42:31 2024
New Revision: 69421

Log:
Release fury 0.5.1

Added:
release/incubator/fury/0.5.1/
  - copied from r69420, dev/incubator/fury/0.5.1-rc2/
Removed:
dev/incubator/fury/0.5.1-rc2/


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-05-26 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 48e075d   synced local 'docs/guide/' with remote 'docs/guide/'
48e075d is described below

commit 48e075d11e33968ebcfe4e714ff94e5c1e30fe1b
Author: chaokunyang 
AuthorDate: Mon May 27 02:30:25 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/java_serialization_guide.md | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/guide/java_serialization_guide.md 
b/docs/guide/java_serialization_guide.md
index a86c39e..ec9fdf3 100644
--- a/docs/guide/java_serialization_guide.md
+++ b/docs/guide/java_serialization_guide.md
@@ -110,7 +110,7 @@ public class Example {
 | `requireClassRegistration`  | Disabling may allow unknown classes to 
be deserialized, potentially causing security risks.




  [...]
 | `suppressClassRegistrationWarnings` | Whether to suppress class registration 
warnings. The warnings can be used for security audit, but may be annoying, 
this suppression will be enabled by default.



  [...]
 | `shareMetaContext`  | Enables or disables meta share mode.   





  [...]
-| `deserializeUnexistedClass` | Enables or disables 
deserialization/skipping of data for non-existent classes.  




 [...]
+| `deserializeNonexistentClass`   | Enables or disables 
deserialization/skipping of data for non-existent classes.  




 [...]
 | `codeGenEnabled`| Disabling may result in faster initial 
serialization but slower subsequent serializations. 




  [...]
 | `asyncCompilationEnabled`   | If enabled, serialization uses 
interpreter mode first and switches to JIT serialization after async serializer 
JIT for a class is finished.



  [...]
 | `scalaOptimizationEnabled`  | Enables or disables Scala-specific 
serialization optimization. 




  [...]
@@ -363,13 +363,13 @@ MetaContext context=xxx

(incubator-fury) branch main updated: feat(java): support nonexistent class deserialization in meta share mode (#1646)

2024-05-26 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 3a0e410c feat(java): support nonexistent class deserialization in meta 
share mode (#1646)
3a0e410c is described below

commit 3a0e410cb83756d3b139a9fbed01a9a64dbb2970
Author: Shawn Yang 
AuthorDate: Mon May 27 10:30:06 2024 +0800

feat(java): support nonexistent class deserialization in meta share mode 
(#1646)

## What does this PR do?

support nonexistent class deserialization in meta share mode

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 docs/guide/java_serialization_guide.md |   6 +-
 .../main/java/org/apache/fury/config/Config.java   |  14 +-
 .../java/org/apache/fury/config/FuryBuilder.java   |  16 +-
 .../main/java/org/apache/fury/meta/ClassDef.java   | 197 +++--
 .../java/org/apache/fury/meta/ClassDefEncoder.java |  25 +--
 .../org/apache/fury/resolver/ClassResolver.java|  91 +-
 .../apache/fury/serializer/ArraySerializers.java   |  59 +++---
 .../apache/fury/serializer/NonexistentClass.java   | 167 +
 ...izers.java => NonexistentClassSerializers.java} |  86 -
 .../main/java/org/apache/fury/type/Descriptor.java |   5 +-
 .../main/java/org/apache/fury/type/TypeUtils.java  |  14 ++
 ...t.java => NonexistentClassSerializersTest.java} |  54 +++---
 .../collection/ChildContainerSerializersTest.java  |   2 +-
 .../fury-testsuite/src/test/java/org/test/Org.java |   2 +-
 14 files changed, 496 insertions(+), 242 deletions(-)

diff --git a/docs/guide/java_serialization_guide.md 
b/docs/guide/java_serialization_guide.md
index a86c39e4..ec9fdf38 100644
--- a/docs/guide/java_serialization_guide.md
+++ b/docs/guide/java_serialization_guide.md
@@ -110,7 +110,7 @@ public class Example {
 | `requireClassRegistration`  | Disabling may allow unknown classes to 
be deserialized, potentially causing security risks.




  [...]
 | `suppressClassRegistrationWarnings` | Whether to suppress class registration 
warnings. The warnings can be used for security audit, but may be annoying, 
this suppression will be enabled by default.



  [...]
 | `shareMetaContext`  | Enables or disables meta share mode.   





  [...]
-| `deserializeUnexistedClass` | Enables or disables 
deserialization/skipping of data for non-existent classes.  




 [...]
+| `deserializeNonexistentClass`   | Enables or disables 
deserialization/skipping of data for non-existent classes.  




 [...]
 | `codeGenEnabled`| Disabling may result in faster initial 
serialization but slower subsequent serializ

svn commit: r69290 - in /dev/incubator/fury/0.5.1-rc2: ./ apache-fury-0.5.1-incubating-src.tar.gz apache-fury-0.5.1-incubating-src.tar.gz.asc apache-fury-0.5.1-incubating-src.tar.gz.sha512

2024-05-20 Thread chaokunyang
Author: chaokunyang
Date: Mon May 20 09:55:44 2024
New Revision: 69290

Log:
Prepare for fury 0.5.1-rc2

Added:
dev/incubator/fury/0.5.1-rc2/
dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz   
(with props)
dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.asc
dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.sha512

Added: dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz
==
Binary file - no diff available.

Propchange: dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.asc
==
--- dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.asc 
(added)
+++ dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.asc 
Mon May 20 09:55:44 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEEHiza5MCK19aU0csTnXvo5F5YC6QFAmZLHKcACgkQnXvo5F5Y
+C6RKuQ/+K+n5cACQTEeP7HXizsqsUYtKJIjWwMH/2+/g5MzZRekWSeXdVqNx4u3f
+dHWKv6Hic7PNkEm1IErFAHH2GAsOJy/Mj7ANLUUFvPQEGqvB2b5MkSAzGtOD7NDR
+Gsn7+C350iUkaVKXeqY0hunS7Ynd9+zGW2MgUREczOdmCfDV+7+1kiVZTkcmFYX8
+RBZnNdy6X/GE1oXx0xGzkOfdeS0UZUwlmdZZOA/W3qOBKcqXsK0cGT8NIYB8XLwh
+lxTN35irQ+KQyu8mwtUfmJXPbxTWcJpYg2KUW1t3qcitnUsjJa03UrlGroI49WgM
+Tuwcwsdw+Ncqmg4rb0QVw0P63SxBo4nXOcG3o23i+txGjlXpAXrYzzJNParxCb+2
+v4zAIVInGd1EPZ/kQqRUr7uxjt0t7f/2LBS12dpdmCrlEtUSGHBjTjGn8C2U/ROr
+LMdhF9uISWhEzFu9z70vRyJPxcP84D+TBsc9nAQykHI7tyzvCoNoNIlPzklzElSI
+b4mXleQPxLCECFrThbFQlqLUo60goMFppjZO/b9UWGw6bjiIQ3zBvbKzzMBHqlbF
+YmMUbL91ez1yJaBYfxsk57QnSzukQQ/0uCb0ijCzXZH8TQyqZICeoVDDV2soeOwK
+Rshj663aE+kJcSgatwmSEECppPk7gBMJDOymchfJcz7h3Lx62m0=
+=J1wL
+-END PGP SIGNATURE-

Added: 
dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.sha512
==
--- dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.sha512 
(added)
+++ dev/incubator/fury/0.5.1-rc2/apache-fury-0.5.1-incubating-src.tar.gz.sha512 
Mon May 20 09:55:44 2024
@@ -0,0 +1 @@
+593bb6c9fadfe84f6ace02157563bad671398507d9faa999aed1de7938522440f4bf1a65ee0db489fb894f9a25c7dab82fa5dceac0b9b583bc7150f86a8e85fe
  apache-fury-0.5.1-incubating-src.tar.gz



-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) tag v0.5.1-rc2 created (now 0455ff73)

2024-05-20 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to tag v0.5.1-rc2
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 0455ff73 (commit)
This tag includes the following new commits:

 new 0455ff73 prepare release for 0.5.1

The 1 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.



-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) 01/01: prepare release for 0.5.1

2024-05-20 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to tag v0.5.1-rc2
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git

commit 0455ff732b9217785193f8e45f3a013eb5539e46
Author: chaokunyang 
AuthorDate: Mon May 20 17:45:30 2024 +0800

prepare release for 0.5.1
---
 .github/workflows/release.yaml| 4 ++--
 integration_tests/graalvm_tests/pom.xml   | 2 +-
 integration_tests/jdk_compatibility_tests/pom.xml | 2 +-
 integration_tests/jpms_tests/pom.xml  | 2 +-
 integration_tests/latest_jdk_tests/pom.xml| 2 +-
 java/benchmark/pom.xml| 2 +-
 java/fury-core/pom.xml| 2 +-
 java/fury-format/pom.xml  | 2 +-
 java/fury-test-core/pom.xml   | 2 +-
 java/fury-testsuite/pom.xml   | 2 +-
 java/pom.xml  | 2 +-
 javascript/packages/fury/package.json | 2 +-
 javascript/packages/hps/package.json  | 2 +-
 rust/Cargo.toml   | 2 +-
 scala/build.sbt   | 2 +-
 15 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index b1d5fd81..117922cc 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -20,7 +20,7 @@ name: Publish Fury
 on:
   push:
 tags:
-  - 'v*'
+  - 'disabled*'
 
 jobs:
   release-python:
@@ -43,7 +43,7 @@ jobs:
 run: ./ci/run_ci.sh install_bazel
   - name: Update version in setup.py
 run: |
-  echo "GITHUB_REF: $GITHUB_REF" 
+  echo "GITHUB_REF: $GITHUB_REF"
   tag=$(echo $GITHUB_REF | cut -d / -f 3)
   echo "tag: $tag"
   version=${tag:1}
diff --git a/integration_tests/graalvm_tests/pom.xml 
b/integration_tests/graalvm_tests/pom.xml
index d3f952c2..44e8cd61 100644
--- a/integration_tests/graalvm_tests/pom.xml
+++ b/integration_tests/graalvm_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/jdk_compatibility_tests/pom.xml 
b/integration_tests/jdk_compatibility_tests/pom.xml
index f6af0074..238fc7cc 100644
--- a/integration_tests/jdk_compatibility_tests/pom.xml
+++ b/integration_tests/jdk_compatibility_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/jpms_tests/pom.xml 
b/integration_tests/jpms_tests/pom.xml
index fca2007f..3744a267 100644
--- a/integration_tests/jpms_tests/pom.xml
+++ b/integration_tests/jpms_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/latest_jdk_tests/pom.xml 
b/integration_tests/latest_jdk_tests/pom.xml
index 015633ec..a7852650 100644
--- a/integration_tests/latest_jdk_tests/pom.xml
+++ b/integration_tests/latest_jdk_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/java/benchmark/pom.xml b/java/benchmark/pom.xml
index 89a2cb6a..e7ab6b47 100644
--- a/java/benchmark/pom.xml
+++ b/java/benchmark/pom.xml
@@ -26,7 +26,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
 
   benchmark
diff --git a/java/fury-core/pom.xml b/java/fury-core/pom.xml
index dcf87204..c2aad443 100644
--- a/java/fury-core/pom.xml
+++ b/java/fury-core/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-format/pom.xml b/java/fury-format/pom.xml
index 6c4c6cb6..33500a81 100644
--- a/java/fury-format/pom.xml
+++ b/java/fury-format/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-test-core/pom.xml b/java/fury-test-core/pom.xml
index b129d1ca..191e348c 100644
--- a/java/fury-test-core/pom.xml
+++ b/java/fury-test-core/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-testsuite/pom.xml b/java/fury-testsuite/pom.xml
index 165e17db..516a90a5 100644
--- a/java/fury-testsuite/pom.xml
+++ b/java/fury-testsuite/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/pom.xml b/java/pom.xml
index 9fec9525..0cdd2346 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -33,7 +33,7 @@
   org.apache.fury
   fury-parent
   pom
-  0.6.0-SNAPSHOT
+  0.5.1
   Fury Project Parent POM
   
 Apache Fury™ is a blazingly fast multi-language serialization framework 
powered by jit and zero-copy.
diff --

(incubator-fury) tag v0.5.1-rc2 deleted (was 179f9e6e)

2024-05-20 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to tag v0.5.1-rc2
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


*** WARNING: tag v0.5.1-rc2 was deleted! ***

 was 179f9e6e bump version to 0.5.1

The revisions that were on this tag are still contained in
other references; therefore, this change does not discard any commits
from the repository.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) tag v0.5.1-rc2 created (now 179f9e6e)

2024-05-20 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to tag v0.5.1-rc2
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 179f9e6e (commit)
No new revisions were added by this update.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch releases-0.5 created (now 03dba113)

2024-05-20 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to branch releases-0.5
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 03dba113 feat(java): remove soft/weak ref values from thread safe fury 
(#1639)

No new revisions were added by this update.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: feat(java): remove soft/weak ref values from thread safe fury (#1639)

2024-05-20 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 03dba113 feat(java): remove soft/weak ref values from thread safe fury 
(#1639)
03dba113 is described below

commit 03dba1130cfcbf153a9c40795a412e113bf558f7
Author: Shawn Yang 
AuthorDate: Mon May 20 14:55:55 2024 +0800

feat(java): remove soft/weak ref values from thread safe fury (#1639)

## What does this PR do?

remove soft/weak ref values from thread safe fury

## Related issues

Closes #1632


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../main/java/org/apache/fury/ThreadLocalFury.java |  2 +-
 .../apache/fury/pool/FuryPooledObjectFactory.java  |  6 +---
 .../java/org/apache/fury/util/LoaderBinding.java   |  6 ++--
 .../java/org/apache/fury/ThreadSafeFuryTest.java   | 32 ++
 4 files changed, 25 insertions(+), 21 deletions(-)

diff --git a/java/fury-core/src/main/java/org/apache/fury/ThreadLocalFury.java 
b/java/fury-core/src/main/java/org/apache/fury/ThreadLocalFury.java
index 67928cae..dd980278 100644
--- a/java/fury-core/src/main/java/org/apache/fury/ThreadLocalFury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/ThreadLocalFury.java
@@ -247,7 +247,7 @@ public class ThreadLocalFury extends AbstractThreadSafeFury 
{
 
   @Override
   public void setClassLoader(ClassLoader classLoader) {
-setClassLoader(classLoader, StagingType.SOFT_STAGING);
+setClassLoader(classLoader, StagingType.STRONG_STAGING);
   }
 
   @Override
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
 
b/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
index 1bc03403..872fd459 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
@@ -78,11 +78,7 @@ public class FuryPooledObjectFactory {
 this.furyFactory = furyFactory;
 this.factoryCallback = factoryCallback;
 classLoaderFuryPooledCache =
-CacheBuilder.newBuilder()
-.weakKeys()
-.softValues()
-.expireAfterAccess(expireTime, timeUnit)
-.build();
+CacheBuilder.newBuilder().expireAfterAccess(expireTime, 
timeUnit).build();
   }
 
   public Fury getFury() {
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/util/LoaderBinding.java 
b/java/fury-core/src/main/java/org/apache/fury/util/LoaderBinding.java
index 79a1b611..3b747d22 100644
--- a/java/fury-core/src/main/java/org/apache/fury/util/LoaderBinding.java
+++ b/java/fury-core/src/main/java/org/apache/fury/util/LoaderBinding.java
@@ -92,7 +92,7 @@ public final class LoaderBinding {
* {@link #setClassLoader(ClassLoader, StagingType)} and {@link 
#clearClassLoader} should be used.
*/
   public void setClassLoader(ClassLoader classLoader) {
-setClassLoader(classLoader, StagingType.SOFT_STAGING);
+setClassLoader(classLoader, StagingType.STRONG_STAGING);
   }
 
   /**
@@ -127,8 +127,8 @@ public final class LoaderBinding {
   fury = furyFactory.apply(classLoader);
   bindingCallback.accept(fury);
   furySoftMap.put(classLoader, new SoftReference<>(fury));
-  this.fury = fury;
 }
+this.fury = fury;
 break;
   }
 case STRONG_STAGING:
@@ -138,8 +138,8 @@ public final class LoaderBinding {
   fury = furyFactory.apply(classLoader);
   bindingCallback.accept(fury);
   furyMap.put(classLoader, fury);
-  this.fury = fury;
 }
+this.fury = fury;
 break;
   }
 default:
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java 
b/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java
index 29458572..e604bb74 100644
--- a/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java
+++ b/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java
@@ -279,18 +279,24 @@ public class ThreadSafeFuryTest extends FuryTestBase {
   }
 
   private WeakHashMap, Boolean> generateClassForGC() {
-ThreadSafeFury fury = 
Fury.builder().requireClassRegistration(false).buildThreadSafeFury();
+ThreadSafeFury fury1 = 
Fury.builder().requireClassRegistration(false).buildThreadSafeFury();
+ThreadSafeFury fury2 =
+
Fury.builder().requireClassRegistration(false).buildThreadSafeFuryPool(1, 2);
 String className = "DuplicateStruct";
 WeakHashMap, Boolean>

(incubator-fury) branch main updated: fix(java): fix abstract collection elems same type serialization (#1641)

2024-05-20 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new cf13c997 fix(java): fix abstract collection elems same type 
serialization (#1641)
cf13c997 is described below

commit cf13c99710b5e6360f8dac9a6d88f954119d599d
Author: Shawn Yang 
AuthorDate: Mon May 20 14:49:29 2024 +0800

fix(java): fix abstract collection elems same type serialization (#1641)

## What does this PR do?
This PR fix inlineable expression codegen and reduce class load cost in
generated code.

With those changes, it fixed abstract collection elems same type
serialization in #1640

## Related issues
Closes #1640


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../fury/builder/BaseObjectCodecBuilder.java   |  8 +--
 .../java/org/apache/fury/builder/CodecBuilder.java | 16 +
 .../java/org/apache/fury/codegen/Expression.java   | 28 ++
 .../collection/CollectionSerializersTest.java  | 27 +
 4 files changed, 62 insertions(+), 17 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
index 34bb51ba..cc825a69 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
@@ -73,7 +73,6 @@ import org.apache.fury.codegen.Expression.ListExpression;
 import org.apache.fury.codegen.Expression.Literal;
 import org.apache.fury.codegen.Expression.Reference;
 import org.apache.fury.codegen.Expression.Return;
-import org.apache.fury.codegen.Expression.StaticInvoke;
 import org.apache.fury.codegen.ExpressionUtils;
 import org.apache.fury.codegen.ExpressionVisitor.ExprHolder;
 import org.apache.fury.collection.Tuple2;
@@ -521,12 +520,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 if (sourcePublicAccessible(cls)) {
   return Literal.ofClass(cls);
 } else {
-  return new StaticInvoke(
-  ReflectionUtils.class,
-  "loadClass",
-  CLASS_TYPE,
-  beanClassExpr(),
-  Literal.ofString(cls.getName()));
+  return staticClassFieldExpr(cls, "__class__" + 
cls.getName().replace(".", "_"));
 }
   }
 
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/CodecBuilder.java 
b/java/fury-core/src/main/java/org/apache/fury/builder/CodecBuilder.java
index b9c54218..d0f88062 100644
--- a/java/fury-core/src/main/java/org/apache/fury/builder/CodecBuilder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/builder/CodecBuilder.java
@@ -519,16 +519,22 @@ public abstract class CodecBuilder {
   }
 
   protected Expression staticBeanClassExpr() {
+if (sourcePublicAccessible(beanClass)) {
+  return Literal.ofClass(beanClass);
+}
+return staticClassFieldExpr(beanClass, "__class__");
+  }
+
+  protected Expression staticClassFieldExpr(Class cls, String fieldName) {
+Preconditions.checkArgument(
+!sourcePublicAccessible(cls), "Public class %s should use class 
literal instead", cls);
 return getOrCreateField(
 true,
 Class.class,
-"__class__",
+fieldName,
 () ->
 new StaticInvoke(
-ReflectionUtils.class,
-"loadClass",
-CLASS_TYPE,
-Literal.ofString(beanClass.getName()))
+ReflectionUtils.class, "loadClass", CLASS_TYPE, 
Literal.ofString(cls.getName()))
 .inline());
   }
 
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java 
b/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java
index 71c0f29f..d2572f77 100644
--- a/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java
+++ b/java/fury-core/src/main/java/org/apache/fury/codegen/Expression.java
@@ -102,6 +102,15 @@ public interface Expression {
 } else {
   ExprCode genCode = doGenCode(ctx);
   ctx.exprState.put(this, new ExprState(new ExprCode(genCode.isNull(), 
genCode.value(;
+  if (this instanceof Inlineable) {
+if (!((Inlineable) this).inlineCall) {
+  Preconditions.checkArgument(
+  StringUtils.isNotBlank(genCode.code()),
+  "Expression %s has empty code %s",
+  this,
+  genCode);
+}
+  }
   return genCo

(incubator-fury) branch main updated: fix(java): fix wildcard capturer capture NullPointerException (#1637)

2024-05-16 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 262c578b fix(java): fix wildcard capturer capture NullPointerException 
(#1637)
262c578b is described below

commit 262c578bd29be4d86c5740b8f95768724357188e
Author: Shawn Yang 
AuthorDate: Thu May 16 21:41:49 2024 +0800

fix(java): fix wildcard capturer capture NullPointerException (#1637)

## What does this PR do?

 fix wildcard capturer capture NullPointerException

## Related issues
Closes #1633

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../main/java/org/apache/fury/reflect/TypeRef.java | 14 +++
 .../main/java/org/apache/fury/reflect/Types.java   | 22 ++
 .../java/org/apache/fury/reflect/TypeRefTest.java  | 47 +-
 3 files changed, 74 insertions(+), 9 deletions(-)

diff --git a/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java 
b/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
index b984bb32..3707f15a 100644
--- a/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
+++ b/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
@@ -900,16 +900,30 @@ public class TypeRef {
 for (; i < upperBoundsLength; i++) {
   combinedUpperBounds[i] = upperBounds[i];
 }
+int skipCount = 0;
 rootFor:
 for (; i < combinedUpperBounds.length; i++) {
   Type typeParamBound = typeParamBounds[i - upperBoundsLength];
   for (Type upperBound : upperBounds) {
 if (upperBound.equals(typeParamBound)) {
+  skipCount++;
   continue rootFor;
 }
   }
   combinedUpperBounds[i] = typeParamBound;
 }
+if (skipCount > 0) {
+  i = upperBoundsLength;
+  while (combinedUpperBounds[i] == null) {
+if (i == combinedUpperBounds.length - 1) {
+  break;
+} else {
+  combinedUpperBounds[i] = combinedUpperBounds[i++];
+}
+  }
+  combinedUpperBounds =
+  Arrays.copyOf(combinedUpperBounds, 
combinedUpperBounds.length - skipCount);
+}
   }
   return super.captureAsTypeVariable(combinedUpperBounds);
 }
diff --git a/java/fury-core/src/main/java/org/apache/fury/reflect/Types.java 
b/java/fury-core/src/main/java/org/apache/fury/reflect/Types.java
index cbfc7cdb..5bedac0e 100644
--- a/java/fury-core/src/main/java/org/apache/fury/reflect/Types.java
+++ b/java/fury-core/src/main/java/org/apache/fury/reflect/Types.java
@@ -131,17 +131,23 @@ class Types {
 
 @Override
 public String toString() {
-  return "ParameterizedTypeImpl{"
-  + "actualTypeArguments="
-  + Arrays.toString(actualTypeArguments)
-  + ", rawType="
-  + rawType
-  + ", ownerType="
-  + ownerType
-  + '}';
+  StringBuilder builder = new StringBuilder();
+  builder.append(typeName(rawType)).append('<');
+  int i = 0;
+  for (Type typeArgument : actualTypeArguments) {
+if (i++ != 0) {
+  builder.append(", ");
+}
+builder.append(typeName(typeArgument));
+  }
+  return builder.append('>').toString();
 }
   }
 
+  static String typeName(Type type) {
+return (type instanceof Class) ? ((Class) type).getName() : 
type.toString();
+  }
+
   public static class GenericArrayTypeImpl implements GenericArrayType {
 private final Type genericComponentType;
 
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/reflect/TypeRefTest.java 
b/java/fury-core/src/test/java/org/apache/fury/reflect/TypeRefTest.java
index a0cc6cf5..6e791342 100644
--- a/java/fury-core/src/test/java/org/apache/fury/reflect/TypeRefTest.java
+++ b/java/fury-core/src/test/java/org/apache/fury/reflect/TypeRefTest.java
@@ -23,10 +23,17 @@ import static org.testng.Assert.*;
 
 import java.util.LinkedHashMap;
 import java.util.Map;
+import java.util.TreeMap;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.apache.fury.Fury;
+import org.apache.fury.FuryTestBase;
+import org.apache.fury.collection.Tuple2;
 import org.apache.fury.type.TypeUtils;
+import org.testng.Assert;
 import org.testng.annotations.Test;
 
-public class TypeRefTest {
+public class TypeRefTest extends FuryTestBase {
   static class MapObject extends LinkedHashMap {}
 
   @Test
@@ -39,4 +46,42

(incubator-fury) branch main updated: chore(java): remove gpg pinentry-mode (#1636)

2024-05-16 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 4c19890a chore(java): remove gpg pinentry-mode (#1636)
4c19890a is described below

commit 4c19890a15b87e36dd6a5db9a954066658f310bd
Author: Shawn Yang 
AuthorDate: Thu May 16 21:41:39 2024 +0800

chore(java): remove gpg pinentry-mode (#1636)

## What does this PR do?

remove gpg pinentry-mode

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 java/pom.xml | 7 ---
 1 file changed, 7 deletions(-)

diff --git a/java/pom.xml b/java/pom.xml
index 3f7f7b5f..9fec9525 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -197,13 +197,6 @@
   
 sign
   
-  
-
-
-  --pinentry-mode
-  loopback
-
-  
 
   
 


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: chore(java): rename deserializeUnexistentEnumValueAsNull to deserializeNonexistentAsNull (#1634)

2024-05-15 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 33e5dadf chore(java): rename deserializeUnexistentEnumValueAsNull to 
deserializeNonexistentAsNull (#1634)
33e5dadf is described below

commit 33e5dadfd42ff5cabca1495343342cf4fc3a9725
Author: Shawn Yang 
AuthorDate: Wed May 15 15:18:40 2024 +0800

chore(java): rename deserializeUnexistentEnumValueAsNull to 
deserializeNonexistentAsNull (#1634)

## What does this PR do?

rename deserializeUnexistentEnumValueAsNull to
deserializeNonexistentAsNull

## Related issues


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../src/main/java/org/apache/fury/config/Config.java   |  8 
 .../src/main/java/org/apache/fury/config/FuryBuilder.java  |  8 
 .../java/org/apache/fury/serializer/EnumSerializer.java| 14 --
 .../org/apache/fury/serializer/EnumSerializerTest.java |  2 +-
 4 files changed, 21 insertions(+), 11 deletions(-)

diff --git a/java/fury-core/src/main/java/org/apache/fury/config/Config.java 
b/java/fury-core/src/main/java/org/apache/fury/config/Config.java
index 5fc79e93..2e7deb60 100644
--- a/java/fury-core/src/main/java/org/apache/fury/config/Config.java
+++ b/java/fury-core/src/main/java/org/apache/fury/config/Config.java
@@ -54,7 +54,7 @@ public class Config implements Serializable {
   private final boolean deserializeUnexistedClass;
   private final boolean scalaOptimizationEnabled;
   private transient int configHash;
-  private final boolean deserializeUnexistentEnumValueAsNull;
+  private final boolean deserializeNonexistentEnumValueAsNull;
 
   public Config(FuryBuilder builder) {
 language = builder.language;
@@ -83,7 +83,7 @@ public class Config implements Serializable {
 }
 asyncCompilationEnabled = builder.asyncCompilationEnabled;
 scalaOptimizationEnabled = builder.scalaOptimizationEnabled;
-deserializeUnexistentEnumValueAsNull = 
builder.deserializeUnexistentEnumValueAsNull;
+deserializeNonexistentEnumValueAsNull = 
builder.deserializeNonexistentEnumValueAsNull;
   }
 
   public Language getLanguage() {
@@ -103,8 +103,8 @@ public class Config implements Serializable {
   }
 
   /** ignore Enum Deserialize array out of bounds return null. */
-  public boolean deserializeUnexistentEnumValueAsNull() {
-return deserializeUnexistentEnumValueAsNull;
+  public boolean deserializeNonexistentEnumValueAsNull() {
+return deserializeNonexistentEnumValueAsNull;
   }
 
   /**
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java 
b/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java
index 3fe85695..9df183a9 100644
--- a/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java
@@ -75,7 +75,7 @@ public final class FuryBuilder {
   boolean registerGuavaTypes = true;
   boolean scalaOptimizationEnabled = false;
   boolean suppressClassRegistrationWarnings = true;
-  boolean deserializeUnexistentEnumValueAsNull = false;
+  boolean deserializeNonexistentEnumValueAsNull = false;
 
   public FuryBuilder() {}
 
@@ -107,9 +107,9 @@ public final class FuryBuilder {
   }
 
   /** ignore Enum Deserialize array out of bounds. */
-  public FuryBuilder deserializeUnexistentEnumValueAsNull(
-  boolean deserializeUnexistentEnumValueAsNull) {
-this.deserializeUnexistentEnumValueAsNull = 
deserializeUnexistentEnumValueAsNull;
+  public FuryBuilder deserializeNonexistentEnumValueAsNull(
+  boolean deserializeNonexistentEnumValueAsNull) {
+this.deserializeNonexistentEnumValueAsNull = 
deserializeNonexistentEnumValueAsNull;
 return this;
   }
 
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java 
b/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
index 24bbcdfb..f03db52f 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
@@ -19,6 +19,7 @@
 
 package org.apache.fury.serializer;
 
+import java.util.Arrays;
 import org.apache.fury.Fury;
 import org.apache.fury.memory.MemoryBuffer;
 import org.apache.fury.util.Preconditions;
@@ -49,9 +50,18 @@ public final class EnumSerializer extends Serializer {
   @Override
   public Enum read(MemoryBuffer buffer) {
 int value = buffer.readVarUint32Small7();
-if (fury.getConfig().deserializeUnexistentEnumValueAsNull() && value >= 
enumConstants.length) {
-  return null;
+  

(incubator-fury) branch main updated: fix(java): ThreadPoolFury#factoryCallback don't work when create new classLoaderFuryPooled (#1628)

2024-05-13 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new f7446403 fix(java): ThreadPoolFury#factoryCallback don't work when 
create new classLoaderFuryPooled (#1628)
f7446403 is described below

commit f74464030313ca61e81d324024f4b6b55c143f4c
Author: Shuchang Li 
AuthorDate: Tue May 14 00:01:53 2024 +0800

fix(java): ThreadPoolFury#factoryCallback don't work when create new 
classLoaderFuryPooled (#1628)



## What does this PR do?



ThreadPoolFury#factoryCallback don't work when create new
classLoaderFuryPooled.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../apache/fury/pool/FuryPooledObjectFactory.java  |  9 -
 .../java/org/apache/fury/pool/ThreadPoolFury.java  |  9 -
 .../java/org/apache/fury/ThreadSafeFuryTest.java   | 46 ++
 3 files changed, 61 insertions(+), 3 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
 
b/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
index 9efc584a..1bc03403 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java
@@ -22,6 +22,7 @@ package org.apache.fury.pool;
 import com.google.common.cache.Cache;
 import com.google.common.cache.CacheBuilder;
 import java.util.concurrent.TimeUnit;
+import java.util.function.Consumer;
 import java.util.function.Function;
 import org.apache.fury.Fury;
 import org.apache.fury.logging.Logger;
@@ -62,15 +63,20 @@ public class FuryPooledObjectFactory {
*/
   private final int maxPoolSize;
 
+  /** factoryCallback will be set in every new classLoaderFuryPooled so that 
can deal every fury. */
+  private final Consumer factoryCallback;
+
   public FuryPooledObjectFactory(
   Function furyFactory,
   int minPoolSize,
   int maxPoolSize,
   long expireTime,
-  TimeUnit timeUnit) {
+  TimeUnit timeUnit,
+  Consumer factoryCallback) {
 this.minPoolSize = minPoolSize;
 this.maxPoolSize = maxPoolSize;
 this.furyFactory = furyFactory;
+this.factoryCallback = factoryCallback;
 classLoaderFuryPooledCache =
 CacheBuilder.newBuilder()
 .weakKeys()
@@ -138,6 +144,7 @@ public class FuryPooledObjectFactory {
 if (classLoaderFuryPooled == null) {
   classLoaderFuryPooled =
   new ClassLoaderFuryPooled(classLoader, furyFactory, minPoolSize, 
maxPoolSize);
+  classLoaderFuryPooled.setFactoryCallback(factoryCallback);
   classLoaderFuryPooledCache.put(classLoader, classLoaderFuryPooled);
 }
 return classLoaderFuryPooled;
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java 
b/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java
index e9367dcf..f1c4bd6b 100644
--- a/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java
@@ -47,7 +47,13 @@ public class ThreadPoolFury extends AbstractThreadSafeFury {
   long expireTime,
   TimeUnit timeUnit) {
 this.furyPooledObjectFactory =
-new FuryPooledObjectFactory(furyFactory, minPoolSize, maxPoolSize, 
expireTime, timeUnit);
+new FuryPooledObjectFactory(
+furyFactory,
+minPoolSize,
+maxPoolSize,
+expireTime,
+timeUnit,
+fury -> factoryCallback.accept(fury));
   }
 
   @Override
@@ -56,7 +62,6 @@ public class ThreadPoolFury extends AbstractThreadSafeFury {
 for (ClassLoaderFuryPooled furyPooled :
 furyPooledObjectFactory.classLoaderFuryPooledCache.asMap().values()) {
   furyPooled.allFury.keySet().forEach(callback);
-  furyPooled.setFactoryCallback(factoryCallback);
 }
   }
 
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java 
b/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java
index 464ea6f5..29458572 100644
--- a/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java
+++ b/java/fury-core/src/test/java/org/apache/fury/ThreadSafeFuryTest.java
@@ -30,12 +30,14 @@ import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
+import lombok.Data;
 import org.apache.fury.config.Language;
 import org.apache.fury.memory.MemoryBuffer;
 import org.apache.fury.resolver.MetaCont

(incubator-fury) branch main updated: refactor(java): replace Guava's string utility methods with own implementation (#1624)

2024-05-13 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 98975744 refactor(java): replace Guava's string utility methods with 
own implementation (#1624)
98975744 is described below

commit 9897574487d8cf968b84b8b6ede4598125fc99f4
Author: Nikita Ivchenko 
AuthorDate: Mon May 13 13:35:33 2024 +0300

refactor(java): replace Guava's string utility methods with own 
implementation (#1624)

## What does this PR do?




## Related issues


#1113

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?
---
 .../java/org/apache/fury/util/StringUtils.java | 61 +-
 .../java/org/apache/fury/util/StringUtilsTest.java | 25 +
 .../fury/format/encoder/RowEncoderBuilder.java |  3 +-
 .../org/apache/fury/format/type/TypeInference.java |  6 +--
 4 files changed, 87 insertions(+), 8 deletions(-)

diff --git a/java/fury-core/src/main/java/org/apache/fury/util/StringUtils.java 
b/java/fury-core/src/main/java/org/apache/fury/util/StringUtils.java
index 26031448..338073fc 100644
--- a/java/fury-core/src/main/java/org/apache/fury/util/StringUtils.java
+++ b/java/fury-core/src/main/java/org/apache/fury/util/StringUtils.java
@@ -19,16 +19,22 @@
 
 package org.apache.fury.util;
 
-import com.google.common.io.BaseEncoding;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Random;
 
 public class StringUtils {
+  private static final char[] BASE16_CHARS2 = {
+'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 
'f'
+  };
 
   /** Converts a bytes array into a hexadecimal string. */
   public static String encodeHexString(final byte[] data) {
-return BaseEncoding.base16().lowerCase().encode(data);
+StringBuilder result = new StringBuilder(data.length * 2);
+for (byte b : data) {
+  result.append(BASE16_CHARS2[(b >>> 4) & 0xF]).append(BASE16_CHARS2[b & 
0xF]);
+}
+return result.toString();
   }
 
   /** Format a string template by replacing all `${xxx}` into provided values. 
*/
@@ -192,4 +198,55 @@ public class StringUtils {
 }
 return builder.toString();
   }
+
+  // example: "variable_name" -> "variableName"
+  public static String lowerUnderscoreToLowerCamelCase(String lowerUnderscore) 
{
+StringBuilder builder = new StringBuilder();
+int length = lowerUnderscore.length();
+
+int index;
+int fromIndex = 0;
+while ((index = lowerUnderscore.indexOf('_', fromIndex)) != -1) {
+  builder.append(lowerUnderscore, fromIndex, index);
+
+  if (length >= index + 1) {
+char symbol = lowerUnderscore.charAt(index + 1);
+if (symbol >= 'a' && symbol <= 'z') {
+  builder.append(Character.toUpperCase(symbol));
+  fromIndex = index + 2;
+  continue;
+}
+  }
+
+  fromIndex = index + 1;
+}
+
+if (fromIndex < length) {
+  builder.append(lowerUnderscore, fromIndex, length);
+}
+
+return builder.toString();
+  }
+
+  // example: "variableName" -> "variable_name"
+  public static String lowerCamelToLowerUnderscore(String lowerCamel) {
+StringBuilder builder = new StringBuilder();
+int length = lowerCamel.length();
+
+int fromIndex = 0;
+
+for (int i = 0; i < length; i++) {
+  char symbol = lowerCamel.charAt(i);
+  if (symbol >= 'A' && symbol <= 'Z') {
+builder.append(lowerCamel, fromIndex, 
i).append('_').append(Character.toLowerCase(symbol));
+fromIndex = i + 1;
+  }
+}
+
+if (fromIndex < length) {
+  builder.append(lowerCamel, fromIndex, length);
+}
+
+return builder.toString();
+  }
 }
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/util/StringUtilsTest.java 
b/java/fury-core/src/test/java/org/apache/fury/util/StringUtilsTest.java
index 440522f1..dea41788 100644
--- a/java/fury-core/src/test/java/org/apache/fury/util/StringUtilsTest.java
+++ b/java/fury-core/src/test/java/org/apache/fury/util/StringUtilsTest.java
@@ -62,4 +62,29 @@ public class StringUtilsTest {
 assertTrue(StringUtils.isBlank("   "));
 assertTrue(StringUtils.isBlank(null));
   }
+
+  @Test
+  public void testLowerUnderscoreToLowerCamelCase() {
+assertEquals(StringUtils.lowerUnderscoreToLowerCamelCase("some_variable"), 
"someVariable");
+assertEquals(
+StringUtils.lowerUnderscoreToLowerCamelCase("some_long_variable"), 
"someLongVariable");
+assertEquals(
+StringUtils.lowerUnderscoreToLowerCamelCase("some_123variab

(incubator-fury) branch main updated: fix(java): subclass without fields will encode superclass (#1626)

2024-05-13 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 7c1b9f7a fix(java): subclass without fields will encode superclass 
(#1626)
7c1b9f7a is described below

commit 7c1b9f7ab6964dd17dd430e5534710b8c7d3ea9a
Author: Shuchang Li 
AuthorDate: Mon May 13 17:24:00 2024 +0800

fix(java): subclass without fields will encode superclass (#1626)


## What does this PR do?



when subclass without fields.
`org.apache.fury.meta.ClassDefEncoder#getClassFields` will skip subclass
so className will be superclass. however we should save class even
fields is empty.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../java/org/apache/fury/meta/ClassDefEncoder.java |  2 ++
 .../org/apache/fury/meta/ClassDefEncoderTest.java  | 20 
 .../fury/serializer/MetaSharedCompatibleTest.java  | 37 ++
 3 files changed, 59 insertions(+)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/meta/ClassDefEncoder.java 
b/java/fury-core/src/main/java/org/apache/fury/meta/ClassDefEncoder.java
index f154aa5a..1d0c2e4a 100644
--- a/java/fury-core/src/main/java/org/apache/fury/meta/ClassDefEncoder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/meta/ClassDefEncoder.java
@@ -199,6 +199,8 @@ class ClassDefEncoder {
   List fieldInfos = classFields.get(clz.getName());
   if (fieldInfos != null) {
 sortedClassFields.put(clz.getName(), fieldInfos);
+  } else if (type.getName().equals(clz.getName())) {
+sortedClassFields.put(clz.getName(), new ArrayList<>());
   }
 }
 classFields = sortedClassFields;
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/meta/ClassDefEncoderTest.java 
b/java/fury-core/src/test/java/org/apache/fury/meta/ClassDefEncoderTest.java
index 6baa2149..918916d6 100644
--- a/java/fury-core/src/test/java/org/apache/fury/meta/ClassDefEncoderTest.java
+++ b/java/fury-core/src/test/java/org/apache/fury/meta/ClassDefEncoderTest.java
@@ -24,7 +24,9 @@ import static 
org.apache.fury.meta.ClassDefEncoder.getClassFields;
 
 import java.util.HashMap;
 import java.util.List;
+import lombok.Data;
 import org.apache.fury.Fury;
+import org.apache.fury.config.Language;
 import org.apache.fury.memory.MemoryBuffer;
 import org.apache.fury.test.bean.BeanA;
 import org.apache.fury.test.bean.MapFields;
@@ -62,4 +64,22 @@ public class ClassDefEncoderTest {
   Assert.assertEquals(classDef1, classDef);
 }
   }
+
+  @Data
+  public static class Foo1 {
+private int f1;
+  }
+
+  public static class Foo2 extends Foo1 {}
+
+  @Test
+  public void testEmptySubClassSerializer() {
+Fury fury = 
Fury.builder().withLanguage(Language.JAVA).requireClassRegistration(true).build();
+ClassDef classDef = ClassDef.buildClassDef(fury, Foo2.class);
+ClassDef classDef1 =
+ClassDef.readClassDef(
+fury.getClassResolver(), 
MemoryBuffer.fromByteArray(classDef.getEncoded()));
+
+Assert.assertEquals(classDef, classDef1);
+  }
 }
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/serializer/MetaSharedCompatibleTest.java
 
b/java/fury-core/src/test/java/org/apache/fury/serializer/MetaSharedCompatibleTest.java
index 3f5cf8ee..d68ca016 100644
--- 
a/java/fury-core/src/test/java/org/apache/fury/serializer/MetaSharedCompatibleTest.java
+++ 
b/java/fury-core/src/test/java/org/apache/fury/serializer/MetaSharedCompatibleTest.java
@@ -673,4 +673,41 @@ public class MetaSharedCompatibleTest extends FuryTestBase 
{
   }
 }
   }
+
+  @Test(dataProvider = "config1")
+  void testEmptySubClass(boolean referenceTracking, boolean compressNumber, 
boolean enableCodegen)
+  throws Exception {
+String pkg = DuplicateFieldsClass1.class.getPackage().getName();
+Class cls1 =
+loadClass(
+pkg,
+"DuplicateFieldsClass2",
+""
++ "package "
++ pkg
++ ";\n"
++ "import java.util.*;\n"
++ "import java.math.*;\n"
++ "public class DuplicateFieldsClass2 extends 
MetaSharedCompatibleTest.DuplicateFieldsClass1 {\n"
++ "}");
+Fury fury =
+Fury.builder()
+.withLanguage(Language.JAVA)
+.withRefTracking(referenceTracking)
+.withNumberCompressed(compressNumber)
+.withCodegen(enableCodegen)
+.withMetaContextShare(true)
+   

(incubator-fury) branch main updated: feat(java): add custom serializer register in case of special serializer ctr (#1625)

2024-05-13 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 3a85ccc0 feat(java): add custom serializer register in case of special 
serializer ctr (#1625)
3a85ccc0 is described below

commit 3a85ccc0652ccb307ecab8c6774b144ca17e4429
Author: Shuchang Li 
AuthorDate: Mon May 13 15:24:35 2024 +0800

feat(java): add custom serializer register in case of special serializer 
ctr (#1625)



## What does this PR do?



it has a problem when we use `ThreadSafeFury` and custom Serializer
which special constructor, so we need a method provider `Fury` to create
Serializer and add it.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/AbstractThreadSafeFury.java|  6 +++
 .../src/main/java/org/apache/fury/BaseFury.java|  9 +
 .../src/main/java/org/apache/fury/Fury.java|  6 +++
 .../apache/fury/resolver/ClassResolverTest.java| 45 ++
 4 files changed, 66 insertions(+)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/AbstractThreadSafeFury.java 
b/java/fury-core/src/main/java/org/apache/fury/AbstractThreadSafeFury.java
index 4085e7d9..752a4dc2 100644
--- a/java/fury-core/src/main/java/org/apache/fury/AbstractThreadSafeFury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/AbstractThreadSafeFury.java
@@ -20,6 +20,7 @@
 package org.apache.fury;
 
 import java.util.function.Consumer;
+import java.util.function.Function;
 import org.apache.fury.serializer.Serializer;
 import org.apache.fury.serializer.SerializerFactory;
 
@@ -54,6 +55,11 @@ public abstract class AbstractThreadSafeFury implements 
ThreadSafeFury {
 processCallback(fury -> fury.registerSerializer(type, serializer));
   }
 
+  @Override
+  public void registerSerializer(Class type, Function> 
serializerCreator) {
+processCallback(fury -> fury.registerSerializer(type, 
serializerCreator.apply(fury)));
+  }
+
   @Override
   public void setSerializerFactory(SerializerFactory serializerFactory) {
 processCallback(fury -> fury.setSerializerFactory(serializerFactory));
diff --git a/java/fury-core/src/main/java/org/apache/fury/BaseFury.java 
b/java/fury-core/src/main/java/org/apache/fury/BaseFury.java
index 98821df1..1ee1aec8 100644
--- a/java/fury-core/src/main/java/org/apache/fury/BaseFury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/BaseFury.java
@@ -20,6 +20,7 @@
 package org.apache.fury;
 
 import java.io.OutputStream;
+import java.util.function.Function;
 import org.apache.fury.io.FuryInputStream;
 import org.apache.fury.io.FuryReadableChannel;
 import org.apache.fury.memory.MemoryBuffer;
@@ -71,6 +72,14 @@ public interface BaseFury {
 
   void registerSerializer(Class type, Serializer serializer);
 
+  /**
+   * Register a Serializer created by serializerCreator when fury created.
+   *
+   * @param type class needed to be serialized/deserialized.
+   * @param serializerCreator serializer creator with param {@link Fury}
+   */
+  void registerSerializer(Class type, Function> 
serializerCreator);
+
   void setSerializerFactory(SerializerFactory serializerFactory);
 
   /** Return serialized obj as a byte array. */
diff --git a/java/fury-core/src/main/java/org/apache/fury/Fury.java 
b/java/fury-core/src/main/java/org/apache/fury/Fury.java
index ee3ed4c8..8115ed5a 100644
--- a/java/fury-core/src/main/java/org/apache/fury/Fury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/Fury.java
@@ -27,6 +27,7 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import java.util.function.Consumer;
+import java.util.function.Function;
 import javax.annotation.concurrent.NotThreadSafe;
 import org.apache.fury.builder.JITContext;
 import org.apache.fury.config.CompatibleMode;
@@ -175,6 +176,11 @@ public final class Fury implements BaseFury {
 classResolver.registerSerializer(type, serializer);
   }
 
+  @Override
+  public void registerSerializer(Class type, Function> 
serializerCreator) {
+classResolver.registerSerializer(type, serializerCreator.apply(this));
+  }
+
   @Override
   public void setSerializerFactory(SerializerFactory serializerFactory) {
 classResolver.setSerializerFactory(serializerFactory);
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/resolver/ClassResolverTest.java 
b/java/fury-core/src/test/java/org/apache/fury/resolver/ClassResolverTest.java
index 231d11a6..ecb35305 100644
--- 
a/java/fury-core/src/test/java/org/apache/fury/resolver/ClassResolverTest.java
+++ 
b/java/fury-core/src/test/java/org/ap

svn commit: r69105 - in /dev/incubator/fury/0.5.1-rc1: ./ apache-fury-0.5.1-incubating-src.tar.gz apache-fury-0.5.1-incubating-src.tar.gz.asc apache-fury-0.5.1-incubating-src.tar.gz.sha512

2024-05-11 Thread chaokunyang
Author: chaokunyang
Date: Sat May 11 15:52:02 2024
New Revision: 69105

Log:
Prepare for fury 0.5.1-rc1

Added:
dev/incubator/fury/0.5.1-rc1/
dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz   
(with props)
dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.asc
dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.sha512

Added: dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz
==
Binary file - no diff available.

Propchange: dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz
--
svn:mime-type = application/octet-stream

Added: dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.asc
==
--- dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.asc 
(added)
+++ dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.asc 
Sat May 11 15:52:02 2024
@@ -0,0 +1,16 @@
+-BEGIN PGP SIGNATURE-
+
+iQIzBAABCAAdFiEEHiza5MCK19aU0csTnXvo5F5YC6QFAmY/kzYACgkQnXvo5F5Y
+C6QmAxAAzc+Oxvtv+A6+V6Uy8I3JpYPP2MdpTJvmVyO4aptOXecVSIdabz3qoXMf
+lu44QQ0Un1wQXZn8jp1b3GJFUNgrVeipjCutHlueIsumCzTd2+Lg5yw9KCtE/4vz
+AzN+ZFE1v9nViGxBLhD8cLMsOa6MS4n4jnfs+SLw0UR+BJGm74y1+oEpVhyuWXxp
+VhZR3l04l8nzmq+5Wdwor7lc1wROKUdzCNyXjYGAciTzUhFKcVpJL6bQWe1g9WIr
+e6heCBLFnaA+9Zr/6yWKG8/Gdlr94Bh8mXNR6ReNTrc3EfA9/tv+8l4Uc9yHTmVG
+oaDbJ43OQwAMtqfK8mkuNMeP2l74l++rL5JzPjG3LA07l35ZJhV4+LuA7xHl/MSQ
+TldH4SnOTHyVFeI+b8MxdhMFbCeGpdG5RoD3wUI43doFsefeRt4pp1ONxxpRAist
+eMs2Ero1bI5rjf9VEH8oFV2y4W6LJXeiCF0UXOmiXiMSncMDbO1muAUxFu8EHvVz
+IsKduo0glmOjKu7XEW9WoQvlnAMMrKUJuqzAPzPrpNuZ4GpOR4JhUNSQkZji/8GA
+5FtW1v/O+JsKI3w6VAZKqV8Ou3Gf5K7HJllDHd4RJcw0gYtno0dtexz23Fb2/PFu
+AE3LuxO6fCjTdpVkrsOW0sxO+S1okSrGdd4k1RfgyB43wDBZRUY=
+=aJ4s
+-END PGP SIGNATURE-

Added: 
dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.sha512
==
--- dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.sha512 
(added)
+++ dev/incubator/fury/0.5.1-rc1/apache-fury-0.5.1-incubating-src.tar.gz.sha512 
Sat May 11 15:52:02 2024
@@ -0,0 +1 @@
+656ecfce92dd2668da60eb134c1fa4bfd0afc58a43d8e4cdf6be55e239f7a32e2da5b6c2e70745f3d078b3e02ff5e4d47f5fd9d396e85d85b98bd0f81536732e
  apache-fury-0.5.1-incubating-src.tar.gz



-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) tag v0.5.1-rc1 created (now 179f9e6e)

2024-05-11 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to tag v0.5.1-rc1
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 179f9e6e (commit)
This tag includes the following new commits:

 new 179f9e6e bump version to 0.5.1

The 1 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.



-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) 01/01: bump version to 0.5.1

2024-05-11 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to tag v0.5.1-rc1
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git

commit 179f9e6ec82f67f909e915d96744767344cba034
Author: chaokunyang 
AuthorDate: Sat May 11 23:45:39 2024 +0800

bump version to 0.5.1
---
 integration_tests/graalvm_tests/pom.xml   | 2 +-
 integration_tests/jdk_compatibility_tests/pom.xml | 2 +-
 integration_tests/jpms_tests/pom.xml  | 2 +-
 integration_tests/latest_jdk_tests/pom.xml| 2 +-
 java/benchmark/pom.xml| 2 +-
 java/fury-core/pom.xml| 2 +-
 java/fury-format/pom.xml  | 2 +-
 java/fury-test-core/pom.xml   | 2 +-
 java/fury-testsuite/pom.xml   | 2 +-
 java/pom.xml  | 2 +-
 javascript/packages/fury/package.json | 2 +-
 javascript/packages/hps/package.json  | 2 +-
 rust/Cargo.toml   | 2 +-
 scala/build.sbt   | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/integration_tests/graalvm_tests/pom.xml 
b/integration_tests/graalvm_tests/pom.xml
index d3f952c2..44e8cd61 100644
--- a/integration_tests/graalvm_tests/pom.xml
+++ b/integration_tests/graalvm_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/jdk_compatibility_tests/pom.xml 
b/integration_tests/jdk_compatibility_tests/pom.xml
index f6af0074..238fc7cc 100644
--- a/integration_tests/jdk_compatibility_tests/pom.xml
+++ b/integration_tests/jdk_compatibility_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/jpms_tests/pom.xml 
b/integration_tests/jpms_tests/pom.xml
index fca2007f..3744a267 100644
--- a/integration_tests/jpms_tests/pom.xml
+++ b/integration_tests/jpms_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/latest_jdk_tests/pom.xml 
b/integration_tests/latest_jdk_tests/pom.xml
index 015633ec..a7852650 100644
--- a/integration_tests/latest_jdk_tests/pom.xml
+++ b/integration_tests/latest_jdk_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/java/benchmark/pom.xml b/java/benchmark/pom.xml
index 89a2cb6a..e7ab6b47 100644
--- a/java/benchmark/pom.xml
+++ b/java/benchmark/pom.xml
@@ -26,7 +26,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
 
   benchmark
diff --git a/java/fury-core/pom.xml b/java/fury-core/pom.xml
index dcf87204..c2aad443 100644
--- a/java/fury-core/pom.xml
+++ b/java/fury-core/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-format/pom.xml b/java/fury-format/pom.xml
index 6c4c6cb6..33500a81 100644
--- a/java/fury-format/pom.xml
+++ b/java/fury-format/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-test-core/pom.xml b/java/fury-test-core/pom.xml
index b129d1ca..191e348c 100644
--- a/java/fury-test-core/pom.xml
+++ b/java/fury-test-core/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-testsuite/pom.xml b/java/fury-testsuite/pom.xml
index 165e17db..516a90a5 100644
--- a/java/fury-testsuite/pom.xml
+++ b/java/fury-testsuite/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/pom.xml b/java/pom.xml
index 3f7f7b5f..b01550ce 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -33,7 +33,7 @@
   org.apache.fury
   fury-parent
   pom
-  0.6.0-SNAPSHOT
+  0.5.1
   Fury Project Parent POM
   
 Apache Fury™ is a blazingly fast multi-language serialization framework 
powered by jit and zero-copy.
diff --git a/javascript/packages/fury/package.json 
b/javascript/packages/fury/package.json
index 2aff4210..984c6fca 100644
--- a/javascript/packages/fury/package.json
+++ b/javascript/packages/fury/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@furyjs/fury",
-  "version": "0.6.0.dev",
+  "version": "0.5.1",
   "description": "Apache Fury™(incubating) is a blazingly fast multi-language 
serialization framework powered by jit and zero-copy",
   "main": "dist/index.js",
   "scripts": {
diff --git a/javascript/packages/hps/package.json 
b/javascript/packages/hps/package.json
index 2bf5aea2..1211257b 100644
---

(incubator-fury) branch main updated: feat(java): add set serializer for concurrent set (#1616)

2024-05-10 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 94411916 feat(java): add set serializer for concurrent set (#1616)
94411916 is described below

commit 94411916efcefa2a4bbdabd6a285d95c33c790f0
Author: 李舒畅 
AuthorDate: Sat May 11 13:36:36 2024 +0800

feat(java): add set serializer for concurrent set (#1616)



## What does this PR do?



we use `Sets.newConcurrentHashSet()` to create set, with lastest guava
version it use `ConcurrentHashMapKeySetView` and old version it use
`Collections.newSetFromMap(map)`.

remove `CopyOnWriteArrayListSerializer` from native-image.properties.
#1614 forget delete.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/graalvm/CollectionExample.java | 58 +++
 .../main/java/org/apache/fury/graalvm/Main.java|  1 +
 .../apache/fury/serializer/ArraySerializers.java   |  9 +++
 .../collection/CollectionSerializers.java  | 67 ++
 .../fury-core/native-image.properties  |  3 +-
 .../collection/CollectionSerializersTest.java  | 32 +++
 6 files changed, 169 insertions(+), 1 deletion(-)

diff --git 
a/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/CollectionExample.java
 
b/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/CollectionExample.java
new file mode 100644
index ..3a53d5f5
--- /dev/null
+++ 
b/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/CollectionExample.java
@@ -0,0 +1,58 @@
+/*
+ * 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.
+ */
+
+package org.apache.fury.graalvm;
+
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+import org.apache.fury.Fury;
+import org.apache.fury.util.Preconditions;
+
+public class CollectionExample {
+  static Fury fury;
+
+  static {
+fury = Fury.builder().requireClassRegistration(true).build();
+  }
+
+  static void test(Fury fury) {
+final Map unmodifiableMap = Map.of("k1", "v1", "k2", "v2");
+Preconditions.checkArgument(
+
unmodifiableMap.equals(fury.deserialize(fury.serialize(unmodifiableMap;
+System.out.println(unmodifiableMap);
+final List arrayasList = Arrays.asList(1, 2, 3);
+
Preconditions.checkArgument(arrayasList.equals(fury.deserialize(fury.serialize(arrayasList;
+System.out.println(arrayasList);
+final Set setFromMap = Collections.newSetFromMap(new 
ConcurrentHashMap<>());
+setFromMap.add("a");
+setFromMap.add("b");
+setFromMap.add("c");
+
Preconditions.checkArgument(setFromMap.equals(fury.deserialize(fury.serialize(setFromMap;
+System.out.println(setFromMap);
+  }
+
+  public static void main(String[] args) {
+test(fury);
+System.out.println("Collection succeed");
+  }
+}
diff --git 
a/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/Main.java
 
b/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/Main.java
index 50f6f25f..5563b914 100644
--- 
a/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/Main.java
+++ 
b/integration_tests/graalvm_tests/src/main/java/org/apache/fury/graalvm/Main.java
@@ -34,5 +34,6 @@ public class Main {
 CompatibleThreadSafeExample.main(args);
 ProxyExample.main(args);
 Benchmark.main(args);
+CollectionExample.main(args);
   }
 }
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/ArraySerializers.java 
b/java/fury-core/src/main/java/org/apache/fury/serializer/ArraySerializers.java
index f91af71e..1

(incubator-fury) branch main updated: feat(java): support deserialization ignoreEnumDeserializeError (#1623)

2024-05-10 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 4de16239 feat(java): support deserialization 
ignoreEnumDeserializeError (#1623)
4de16239 is described below

commit 4de162393bc604ea915139117c6d27569820f498
Author: 157152688 <157152...@qq.com>
AuthorDate: Sat May 11 13:35:56 2024 +0800

feat(java): support deserialization ignoreEnumDeserializeError (#1623)



## What does this PR do?




## Related issues




## Does this PR introduce any user-facing change?



- [x] Does this PR introduce any public API change?
- [x] Does this PR introduce any binary protocol compatibility change?


## Benchmark



-

Co-authored-by: weijiang.wj 
---
 .../main/java/org/apache/fury/config/Config.java   |  7 ++
 .../java/org/apache/fury/config/FuryBuilder.java   |  8 +++
 .../org/apache/fury/serializer/EnumSerializer.java |  6 -
 .../apache/fury/serializer/EnumSerializerTest.java | 27 ++
 4 files changed, 47 insertions(+), 1 deletion(-)

diff --git a/java/fury-core/src/main/java/org/apache/fury/config/Config.java 
b/java/fury-core/src/main/java/org/apache/fury/config/Config.java
index 476f7512..5fc79e93 100644
--- a/java/fury-core/src/main/java/org/apache/fury/config/Config.java
+++ b/java/fury-core/src/main/java/org/apache/fury/config/Config.java
@@ -54,6 +54,7 @@ public class Config implements Serializable {
   private final boolean deserializeUnexistedClass;
   private final boolean scalaOptimizationEnabled;
   private transient int configHash;
+  private final boolean deserializeUnexistentEnumValueAsNull;
 
   public Config(FuryBuilder builder) {
 language = builder.language;
@@ -82,6 +83,7 @@ public class Config implements Serializable {
 }
 asyncCompilationEnabled = builder.asyncCompilationEnabled;
 scalaOptimizationEnabled = builder.scalaOptimizationEnabled;
+deserializeUnexistentEnumValueAsNull = 
builder.deserializeUnexistentEnumValueAsNull;
   }
 
   public Language getLanguage() {
@@ -100,6 +102,11 @@ public class Config implements Serializable {
 return stringRefIgnored;
   }
 
+  /** ignore Enum Deserialize array out of bounds return null. */
+  public boolean deserializeUnexistentEnumValueAsNull() {
+return deserializeUnexistentEnumValueAsNull;
+  }
+
   /**
* Whether ignore reference tracking of all time types registered in {@link 
TimeSerializers} and
* subclasses of those types when ref tracking is enabled.
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java 
b/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java
index 753f6613..3fe85695 100644
--- a/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java
@@ -75,6 +75,7 @@ public final class FuryBuilder {
   boolean registerGuavaTypes = true;
   boolean scalaOptimizationEnabled = false;
   boolean suppressClassRegistrationWarnings = true;
+  boolean deserializeUnexistentEnumValueAsNull = false;
 
   public FuryBuilder() {}
 
@@ -105,6 +106,13 @@ public final class FuryBuilder {
 return this;
   }
 
+  /** ignore Enum Deserialize array out of bounds. */
+  public FuryBuilder deserializeUnexistentEnumValueAsNull(
+  boolean deserializeUnexistentEnumValueAsNull) {
+this.deserializeUnexistentEnumValueAsNull = 
deserializeUnexistentEnumValueAsNull;
+return this;
+  }
+
   /**
* Whether ignore reference tracking of all time types registered in {@link 
TimeSerializers} when
* ref tracking is enabled.
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java 
b/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
index 634fffbe..24bbcdfb 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
@@ -48,6 +48,10 @@ public final class EnumSerializer extends Serializer {
 
   @Override
   public Enum read(MemoryBuffer buffer) {
-return enumConstants[buffer.readVarUint32Small7()];
+int value = buffer.readVarUint32Small7();
+if (fury.getConfig().deserializeUnexistentEnumValueAsNull() && value >= 
enumConstants.length) {
+  return null;
+}
+return enumConstants[value];
   }
 }
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/serializer/EnumSerializerTest.java
 
b/java/fury-core/src/test/java/org/apache/fury/serializer/EnumSerializerTest.java
index 2fc2768f..63ceef1f 100644
--- 
a/java/fury-core/src/test/java/org/apache/fury/serializer/EnumSerializerTest.java
+++ 
b/java/fury-core/src/test/java/org/apach

(incubator-fury) branch main updated: feat(java): register old version guava collect (#1622)

2024-05-10 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 3dd67f9c feat(java): register old version guava collect (#1622)
3dd67f9c is described below

commit 3dd67f9cd511925b2d29e672531730d49859d1a0
Author: 李舒畅 
AuthorDate: Fri May 10 21:24:04 2024 +0800

feat(java): register old version guava collect (#1622)


## What does this PR do?



before guava 19.0, of() return

EmptyImmutableSet/EmptyImmutableBiMap/EmptyImmutableSortedMap/EmptyImmutableSortedSet.
check class and register serializer for them.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../collection/GuavaCollectionSerializers.java | 57 --
 1 file changed, 54 insertions(+), 3 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
index b05b378c..44aa025d 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
@@ -373,6 +373,7 @@ public class GuavaCollectionSerializers {
   // guava/TreeMultimapSerializer - serializer for guava-libraries' 
TreeMultimap
   // guava/UnmodifiableNavigableSetSerializer - serializer for guava-libraries'
   // UnmodifiableNavigableSet
+
   public static void registerDefaultSerializers(Fury fury) {
 // Note: Guava common types are not public API, don't register by 
`ImmutableXXX.of()`,
 // since different guava version may return different type objects, which 
make class
@@ -380,17 +381,18 @@ public class GuavaCollectionSerializers {
 // inconsistent if peers load different version of guava.
 // For example: guava 20 return ImmutableBiMap for ImmutableMap.of(), but 
guava 27 return
 // ImmutableMap.
-Class cls = loadClass(pkg + ".RegularImmutableBiMap", 
ImmutableBiMap.of().getClass());
+Class cls =
+loadClass(pkg + ".RegularImmutableBiMap", ImmutableBiMap.of("k1", 1, 
"k2", 4).getClass());
 fury.registerSerializer(cls, new ImmutableBiMapSerializer(fury, cls));
 cls = loadClass(pkg + ".SingletonImmutableBiMap", ImmutableBiMap.of(1, 
2).getClass());
 fury.registerSerializer(cls, new ImmutableBiMapSerializer(fury, cls));
-cls = loadClass(pkg + ".RegularImmutableMap", 
ImmutableMap.of().getClass());
+cls = loadClass(pkg + ".RegularImmutableMap", ImmutableMap.of("k1", 1, 
"k2", 2).getClass());
 fury.registerSerializer(cls, new ImmutableMapSerializer(fury, cls));
 cls = loadClass(pkg + ".RegularImmutableList", 
ImmutableList.of().getClass());
 fury.registerSerializer(cls, new RegularImmutableListSerializer(fury, 
cls));
 cls = loadClass(pkg + ".SingletonImmutableList", 
ImmutableList.of(1).getClass());
 fury.registerSerializer(cls, new ImmutableListSerializer(fury, cls));
-cls = loadClass(pkg + ".RegularImmutableSet", 
ImmutableSet.of().getClass());
+cls = loadClass(pkg + ".RegularImmutableSet", ImmutableSet.of(1, 
2).getClass());
 fury.registerSerializer(cls, new ImmutableSetSerializer(fury, cls));
 cls = loadClass(pkg + ".SingletonImmutableSet", 
ImmutableSet.of(1).getClass());
 fury.registerSerializer(cls, new ImmutableSetSerializer(fury, cls));
@@ -399,6 +401,46 @@ public class GuavaCollectionSerializers {
 fury.registerSerializer(cls, new ImmutableSortedSetSerializer<>(fury, 
cls));
 cls = loadClass(pkg + ".ImmutableSortedMap", ImmutableSortedMap.of(1, 
2).getClass());
 fury.registerSerializer(cls, new ImmutableSortedMapSerializer<>(fury, 
cls));
+
+// Guava version before 19.0, of() return
+// 
EmptyImmutableSet/EmptyImmutableBiMap/EmptyImmutableSortedMap/EmptyImmutableSortedSet
+// we register if class exist or register empty to deserialize.
+if (checkClassExist(pkg + ".EmptyImmutableSet")) {
+  cls = loadClass(pkg + ".EmptyImmutableSet", 
ImmutableSet.of().getClass());
+  fury.registerSerializer(cls, new ImmutableSetSerializer(fury, cls));
+} else {
+  class GuavaEmptySet {}
+
+  cls = GuavaEmptySet.class;
+  fury.registerSerializer(cls, new ImmutableSetSerializer(fury, cls));
+}
+if (checkClassExist(pkg + ".EmptyImmutableBiMap"))

(incubator-fury) branch main updated: feat(go/java): Add ASCII check before meta string encoding (#1620)

2024-05-10 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 911f0536 feat(go/java): Add ASCII check before meta string encoding 
(#1620)
911f0536 is described below

commit 911f0536f5fd5355a77f47cbfcc166a9c9fcc319
Author: Jason Mok <106209849+jasonm...@users.noreply.github.com>
AuthorDate: Fri May 10 02:43:36 2024 -0500

feat(go/java): Add ASCII check before meta string encoding (#1620)



## What does this PR do?


This PR introduces a validation method to ensure that all input strings
to the `MetaString` encoder are ASCII.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark



-

Signed-off-by: Jason Mok 
---
 go/fury/meta/meta_string_encoder.go  | 12 
 .../main/java/org/apache/fury/meta/MetaStringEncoder.java|  4 
 2 files changed, 16 insertions(+)

diff --git a/go/fury/meta/meta_string_encoder.go 
b/go/fury/meta/meta_string_encoder.go
index f88e2c1b..6d3b89bf 100644
--- a/go/fury/meta/meta_string_encoder.go
+++ b/go/fury/meta/meta_string_encoder.go
@@ -42,6 +42,9 @@ func (e *Encoder) Encode(input string) (MetaString, error) {
 
 // EncodeWithEncoding Encodes the input string to MetaString using specified 
encoding.
 func (e *Encoder) EncodeWithEncoding(input string, encoding Encoding) 
(MetaString, error) {
+   if encoding != UTF_8 && !isASCII(input) {
+   return MetaString{}, errors.New("non-ASCII characters in meta 
string are not allowed")
+   }
if len(input) > 32767 {
return MetaString{}, errors.New("long meta string than 32767 is 
not allowed")
}
@@ -167,6 +170,15 @@ func (e *Encoder) ComputeEncoding(input string) Encoding {
return UTF_8
 }
 
+func isASCII(input string) bool {
+for _, r := range input {
+if r > 127 {
+   return false
+}
+}
+return true
+}
+
 type stringStatistics struct {
digitCount   int
upperCount   int
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java 
b/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java
index 43b48329..619a441c 100644
--- a/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java
@@ -23,6 +23,7 @@ import java.nio.charset.StandardCharsets;
 import java.util.HashSet;
 import org.apache.fury.collection.Collections;
 import org.apache.fury.meta.MetaString.Encoding;
+import org.apache.fury.serializer.StringSerializer;
 import org.apache.fury.util.Preconditions;
 
 /** Encodes plain text strings into MetaString objects with specified encoding 
mechanisms. */
@@ -70,6 +71,9 @@ public class MetaStringEncoder {
   public MetaString encode(String input, Encoding encoding) {
 Preconditions.checkArgument(
 input.length() < Short.MAX_VALUE, "Long meta string than 32767 is not 
allowed");
+if (encoding != Encoding.UTF_8 && 
!StringSerializer.isLatin(input.toCharArray())) {
+  throw new IllegalArgumentException("Non-ASCII characters in meta string 
are not allowed");
+}
 if (input.isEmpty()) {
   return new MetaString(input, Encoding.UTF_8, specialChar1, specialChar2, 
new byte[0]);
 }


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: feat(java): add blocked stream utils (#1617)

2024-05-09 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 58bdf3e6 feat(java): add blocked stream utils (#1617)
58bdf3e6 is described below

commit 58bdf3e6c5a19c3204d0f3462db3e06126347dfc
Author: Shawn Yang 
AuthorDate: Thu May 9 22:49:26 2024 +0800

feat(java): add blocked stream utils (#1617)

## What does this PR do?

Native stream is not feasible for every cases, this PR add blocked
stream utils to adapt to streaming API.

This is s serialization helper as the fallback of streaming
serialization/deserialization in FuryInputStream/FuryReadableChannel.

FuryInputStream/FuryReadableChannel will buffer and read more data,
which makes the original passed stream when constructing FuryInputStream
not usable. If this is not possible, use this BlockedStreamUtils instead
for streaming serialization and deserialization.

Note that this mode will disable streaming in essence. It's just a
helper for make the usage in streaming interface more easily. The
deserialization will read whole bytes before do the actual
deserialization, which don't have any streaming behaviour under the
hood.

## Related issues
#1451


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../src/main/java/org/apache/fury/Fury.java|  34 ++--
 .../org/apache/fury/io/BlockedStreamUtils.java | 188 +
 .../java/org/apache/fury/util/ExceptionUtils.java  |  19 +++
 .../src/test/java/org/apache/fury/CyclicTest.java  |  31 ++--
 .../org/apache/fury/io/BlockedStreamUtilsTest.java |  59 +++
 5 files changed, 291 insertions(+), 40 deletions(-)

diff --git a/java/fury-core/src/main/java/org/apache/fury/Fury.java 
b/java/fury-core/src/main/java/org/apache/fury/Fury.java
index b03527de..ee3ed4c8 100644
--- a/java/fury-core/src/main/java/org/apache/fury/Fury.java
+++ b/java/fury-core/src/main/java/org/apache/fury/Fury.java
@@ -24,26 +24,22 @@ import java.io.IOException;
 import java.io.OutputStream;
 import java.nio.ByteOrder;
 import java.util.ArrayList;
-import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
 import java.util.function.Consumer;
 import javax.annotation.concurrent.NotThreadSafe;
 import org.apache.fury.builder.JITContext;
-import org.apache.fury.collection.ObjectArray;
 import org.apache.fury.config.CompatibleMode;
 import org.apache.fury.config.Config;
 import org.apache.fury.config.FuryBuilder;
 import org.apache.fury.config.Language;
 import org.apache.fury.config.LongEncoding;
-import org.apache.fury.exception.DeserializationException;
 import org.apache.fury.io.FuryInputStream;
 import org.apache.fury.io.FuryReadableChannel;
 import org.apache.fury.logging.Logger;
 import org.apache.fury.logging.LoggerFactory;
 import org.apache.fury.memory.MemoryBuffer;
 import org.apache.fury.memory.MemoryUtils;
-import org.apache.fury.memory.Platform;
 import org.apache.fury.resolver.ClassInfo;
 import org.apache.fury.resolver.ClassInfoHolder;
 import org.apache.fury.resolver.ClassResolver;
@@ -286,7 +282,7 @@ public final class Fury implements BaseFury {
 throw e;
   }
 
-  private MemoryBuffer getBuffer() {
+  public MemoryBuffer getBuffer() {
 MemoryBuffer buf = buffer;
 if (buf == null) {
   buf = buffer = MemoryBuffer.newHeapBuffer(64);
@@ -294,7 +290,7 @@ public final class Fury implements BaseFury {
 return buf;
   }
 
-  private void resetBuffer() {
+  public void resetBuffer() {
 MemoryBuffer buf = buffer;
 if (buf != null && buf.size() > BUFFER_SIZE_LIMIT) {
   buffer = MemoryBuffer.newHeapBuffer(BUFFER_SIZE_LIMIT);
@@ -759,7 +755,7 @@ public final class Fury implements BaseFury {
   }
   return obj;
 } catch (Throwable t) {
-  throw handleReadFailed(t);
+  throw ExceptionUtils.handleReadFailed(this, t);
 } finally {
   resetRead();
   jitContext.unlock();
@@ -792,18 +788,6 @@ public final class Fury implements BaseFury {
 return deserialize(buf, outOfBandBuffers);
   }
 
-  private RuntimeException handleReadFailed(Throwable t) {
-if (refResolver instanceof MapRefResolver) {
-  ObjectArray readObjects = ((MapRefResolver) 
refResolver).getReadObjects();
-  // carry with read objects for better trouble shooting.
-  List objects = Arrays.asList(readObjects.objects).subList(0, 
readObjects.size);
-  throw new DeserializationException(objects, t);
-} else {
-  Platform.throwException(t);
-  throw new IllegalStateException("unreachable");
-}
-  }
-
   private Object xdeserialize

(incubator-fury) branch main updated: fix(java): fix fastutil Object2ObjectOpenHashMap serialization (#1618)

2024-05-09 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 06a74a10 fix(java): fix fastutil Object2ObjectOpenHashMap 
serialization (#1618)
06a74a10 is described below

commit 06a74a102c9191f40d4c78247b4e6f8c2e4e23cc
Author: Shawn Yang 
AuthorDate: Thu May 9 22:49:17 2024 +0800

fix(java): fix fastutil Object2ObjectOpenHashMap serialization (#1618)

## What does this PR do?

fix fastutil Object2ObjectOpenHashMap serialization

## Related issues

Closes #1615


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/resolver/FieldResolver.java| 22 
 .../fury/serializer/CompatibleSerializer.java  | 13 +++--
 java/fury-testsuite/pom.xml|  6 ++
 .../src/test/java/org/apache/fury/TestBase.java| 65 ++
 .../fury/test/Object2ObjectOpenHashMapTest.java| 46 +++
 5 files changed, 136 insertions(+), 16 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java 
b/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java
index 047a2af1..17d6b2e8 100644
--- a/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java
+++ b/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java
@@ -50,8 +50,8 @@ import org.apache.fury.reflect.FieldAccessor;
 import org.apache.fury.reflect.ReflectionUtils;
 import org.apache.fury.reflect.TypeRef;
 import org.apache.fury.serializer.PrimitiveSerializers;
-import org.apache.fury.serializer.collection.CollectionSerializer;
-import org.apache.fury.serializer.collection.MapSerializer;
+import org.apache.fury.serializer.collection.AbstractCollectionSerializer;
+import org.apache.fury.serializer.collection.AbstractMapSerializer;
 import org.apache.fury.type.Descriptor;
 import org.apache.fury.type.TypeUtils;
 import org.apache.fury.util.MurmurHash3;
@@ -567,7 +567,8 @@ public class FieldResolver {
 if (fieldType == FieldTypes.COLLECTION_ELEMENT_FINAL) {
   ClassInfo elementClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
-  CollectionSerializer collectionSerializer = (CollectionSerializer) 
classInfo.getSerializer();
+  AbstractCollectionSerializer collectionSerializer =
+  (AbstractCollectionSerializer) classInfo.getSerializer();
   try {
 
collectionSerializer.setElementSerializer(elementClassInfo.getSerializer());
 o = collectionSerializer.read(buffer);
@@ -580,7 +581,7 @@ public class FieldResolver {
   ClassInfo keyClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo valueClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
-  MapSerializer mapSerializer = (MapSerializer) classInfo.getSerializer();
+  AbstractMapSerializer mapSerializer = (AbstractMapSerializer) 
classInfo.getSerializer();
   try {
 mapSerializer.setKeySerializer(keyClassInfo.getSerializer());
 mapSerializer.setValueSerializer(valueClassInfo.getSerializer());
@@ -594,7 +595,7 @@ public class FieldResolver {
 } else if (fieldType == FieldTypes.MAP_KEY_FINAL) {
   ClassInfo keyClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
-  MapSerializer mapSerializer = (MapSerializer) classInfo.getSerializer();
+  AbstractMapSerializer mapSerializer = (AbstractMapSerializer) 
classInfo.getSerializer();
   try {
 mapSerializer.setKeySerializer(keyClassInfo.getSerializer());
 o = mapSerializer.read(buffer);
@@ -607,7 +608,7 @@ public class FieldResolver {
   Preconditions.checkArgument(fieldType == FieldTypes.MAP_VALUE_FINAL);
   ClassInfo valueClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
-  MapSerializer mapSerializer = (MapSerializer) classInfo.getSerializer();
+  AbstractMapSerializer mapSerializer = (AbstractMapSerializer) 
classInfo.getSerializer();
   try {
 mapSerializer.setValueSerializer(valueClassInfo.getSerializer());
 o = mapSerializer.read(buffer);
@@ -625,7 +626,8 @@ public class FieldResolver {
 if (fieldType == FieldTypes.COLLECTION_ELEMENT_FINAL) {
   ClassInfo elementClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder

(incubator-fury) branch main updated: refactor(java): Remove Guava's Concurrency utils usages (#1614)

2024-05-08 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new b2fdd68f refactor(java): Remove Guava's Concurrency utils usages 
(#1614)
b2fdd68f is described below

commit b2fdd68fbfdc785f2bbad088224295a768ff9bcc
Author: Nikita Ivchenko 
AuthorDate: Wed May 8 19:59:47 2024 +0300

refactor(java): Remove Guava's Concurrency utils usages (#1614)



## What does this PR do?

Removes Guava's Concurrency utils usages

## Related issues

#1113


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?





---
 LICENSE|  1 +
 .../java/org/apache/fury/builder/JITContext.java   | 26 ++
 .../org/apache/fury/codegen/CodeGenerator.java | 53 ++--
 .../util/concurrency/DirectExecutorService.java| 98 ++
 .../concurrency/FuryJitCompilerThreadFactory.java  | 36 
 java/fury-core/src/main/resources/META-INF/LICENSE |  1 +
 licenserc.toml |  1 +
 7 files changed, 172 insertions(+), 44 deletions(-)

diff --git a/LICENSE b/LICENSE
index d0549103..a5d943ce 100644
--- a/LICENSE
+++ b/LICENSE
@@ -220,6 +220,7 @@ The text of each license is the standard Apache 2.0 license.
   java/fury-core/src/main/java/org/apache/fury/reflect/TypeParameter.java
   java/fury-core/src/main/java/org/apache/fury/reflect/Types.java
   java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
+  
java/fury-core/src/main/java/org/apache/fury/util/concurrency/DirectExecutorService.java
 
 * spark (https://github.com/apache/spark)
 Files:
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/JITContext.java 
b/java/fury-core/src/main/java/org/apache/fury/builder/JITContext.java
index b06775b6..a19efd4a 100644
--- a/java/fury-core/src/main/java/org/apache/fury/builder/JITContext.java
+++ b/java/fury-core/src/main/java/org/apache/fury/builder/JITContext.java
@@ -19,15 +19,12 @@
 
 package org.apache.fury.builder;
 
-import com.google.common.util.concurrent.FutureCallback;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListeningExecutorService;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
 import java.util.concurrent.locks.ReentrantLock;
 import java.util.function.Function;
 import org.apache.fury.Fury;
@@ -85,16 +82,13 @@ public class JITContext {
 if (fury.getConfig().isAsyncCompilationEnabled() && 
!isAsyncVisitingFury()) {
   // TODO(chaokunyang) stash callbacks and submit jit task if the 
serialization speed
   // is really needed.
-  ListeningExecutorService compilationService = 
CodeGenerator.getCompilationService();
-  ListenableFuture future;
+  ExecutorService compilationService = 
CodeGenerator.getCompilationService();
   hasJITResult.put(callback.id(), new ArrayList<>());
   numRunningTask++;
-  future = compilationService.submit(jitAction);
-  Futures.addCallback(
-  future,
-  new FutureCallback() {
-@Override
-public void onSuccess(T result) {
+  compilationService.execute(
+  () -> {
+try {
+  T result = jitAction.call();
   try {
 lock();
 callback.onSuccess(result);
@@ -108,10 +102,7 @@ public class JITContext {
 }
 unlock();
   }
-}
-
-@Override
-public void onFailure(Throwable t) {
+} catch (Throwable t) {
   try {
 lock();
 callback.onFailure(t);
@@ -124,8 +115,7 @@ public class JITContext {
 unlock();
   }
 }
-  },
-  compilationService);
+  });
   return interpreterModeAction.call();
 } else {
   return jitAction.call();
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 2d03b5d7..776df27d 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
@@ -19,10 +1

(incubator-fury-site) branch main updated:  synced local 'docs/specification/' with remote 'docs/specification/'

2024-05-08 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 0d5b278   synced local 'docs/specification/' with remote 
'docs/specification/'
0d5b278 is described below

commit 0d5b2789145c5ee0f2b517dfcb0d834b94f9f335
Author: chaokunyang 
AuthorDate: Wed May 8 15:51:13 2024 +

 synced local 'docs/specification/' with remote 'docs/specification/'
---
 docs/specification/xlang_serialization_spec.md | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/docs/specification/xlang_serialization_spec.md 
b/docs/specification/xlang_serialization_spec.md
index 7b46b55..806ee91 100644
--- a/docs/specification/xlang_serialization_spec.md
+++ b/docs/specification/xlang_serialization_spec.md
@@ -139,9 +139,9 @@ Fury will write the byte order for that object into the 
data instead of converti
 Fury header consists starts one byte:
 
 ```
-|2 bytes   | 4 bits| 1 bit | 1 bit | 1 bit  | 1 bit |  
optional 4 bytes  |
-+--+---+---+---++---++
-| magic number | reserved bits |  oob  | xlang | endian | null  | unsigned int 
for meta start offset |
+|2 bytes   | 4 bits| 1 bit | 1 bit | 1 bit  | 1 bit |   1 byte   | 
 optional 4 bytes  |
++--+---+---+---++---+++
+| magic number | reserved bits |  oob  | xlang | endian | null  |  language  | 
unsigned int for meta start offset |
 ```
 
 - magic number: used to identify fury serialization protocol, current version 
use `0x62d4`.
@@ -149,6 +149,7 @@ Fury header consists starts one byte:
 - endian flag: 1 when data is encoded by little endian, 0 for big endian.
 - xlang flag: 1 when serialization uses xlang format, 0 when serialization 
uses Fury java format.
 - oob flag: 1 when passed `BufferCallback` is not null, 0 otherwise.
+- language: the language when serializing objects, such as JAVA, PYTHON, GO, 
etc. Fury can use this flag to determine whether spend more time on 
serialization to make the deserialization faster for dynamic languages.
 
 If meta share mode is enabled, an uncompressed unsigned int is appended to 
indicate the start offset of metadata.
 


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: chore: Fury header add language field (#1612)

2024-05-08 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new da848b5b chore: Fury header add language field (#1612)
da848b5b is described below

commit da848b5bd81c8c0a1c1745211d62d65e41e9050a
Author: LiangliangSui <116876207+liangliang...@users.noreply.github.com>
AuthorDate: Wed May 8 23:50:57 2024 +0800

chore: Fury header add language field (#1612)

## What does this PR do?
Add serialization language field for Fury Header in xlang_spec.

## Related issues

https://github.com/apache/incubator-fury/issues/1607


## Does this PR introduce any user-facing change?


- [ ] Does this PR introduce any public API change?
- [x] Does this PR introduce any binary protocol compatibility change?


## Benchmark



-

Signed-off-by: LiangliangSui 
---
 docs/specification/xlang_serialization_spec.md| 7 ---
 go/fury/fury.go   | 3 +++
 java/fury-core/src/main/java/org/apache/fury/config/Language.java | 2 ++
 javascript/packages/fury/lib/fury.ts  | 2 +-
 javascript/packages/fury/lib/type.ts  | 2 ++
 python/pyfury/_fury.py| 2 ++
 rust/fury/src/deserializer.rs | 5 +
 rust/fury/src/serializer.rs   | 2 +-
 8 files changed, 16 insertions(+), 9 deletions(-)

diff --git a/docs/specification/xlang_serialization_spec.md 
b/docs/specification/xlang_serialization_spec.md
index 7b46b556..806ee918 100644
--- a/docs/specification/xlang_serialization_spec.md
+++ b/docs/specification/xlang_serialization_spec.md
@@ -139,9 +139,9 @@ Fury will write the byte order for that object into the 
data instead of converti
 Fury header consists starts one byte:
 
 ```
-|2 bytes   | 4 bits| 1 bit | 1 bit | 1 bit  | 1 bit |  
optional 4 bytes  |
-+--+---+---+---++---++
-| magic number | reserved bits |  oob  | xlang | endian | null  | unsigned int 
for meta start offset |
+|2 bytes   | 4 bits| 1 bit | 1 bit | 1 bit  | 1 bit |   1 byte   | 
 optional 4 bytes  |
++--+---+---+---++---+++
+| magic number | reserved bits |  oob  | xlang | endian | null  |  language  | 
unsigned int for meta start offset |
 ```
 
 - magic number: used to identify fury serialization protocol, current version 
use `0x62d4`.
@@ -149,6 +149,7 @@ Fury header consists starts one byte:
 - endian flag: 1 when data is encoded by little endian, 0 for big endian.
 - xlang flag: 1 when serialization uses xlang format, 0 when serialization 
uses Fury java format.
 - oob flag: 1 when passed `BufferCallback` is not null, 0 otherwise.
+- language: the language when serializing objects, such as JAVA, PYTHON, GO, 
etc. Fury can use this flag to determine whether spend more time on 
serialization to make the deserialization faster for dynamic languages.
 
 If meta share mode is enabled, an uncompressed unsigned int is appended to 
indicate the start offset of metadata.
 
diff --git a/go/fury/fury.go b/go/fury/fury.go
index 5d1e401d..099dcd99 100644
--- a/go/fury/fury.go
+++ b/go/fury/fury.go
@@ -80,7 +80,10 @@ const (
XLANG Language = iota
JAVA
PYTHON
+   CPP
GO
+   JAVASCRIPT
+   RUST
 )
 
 const (
diff --git a/java/fury-core/src/main/java/org/apache/fury/config/Language.java 
b/java/fury-core/src/main/java/org/apache/fury/config/Language.java
index 61f7bb53..661df39d 100644
--- a/java/fury-core/src/main/java/org/apache/fury/config/Language.java
+++ b/java/fury-core/src/main/java/org/apache/fury/config/Language.java
@@ -26,4 +26,6 @@ public enum Language {
   PYTHON,
   CPP,
   GO,
+  JAVASCRIPT,
+  RUST,
 }
diff --git a/javascript/packages/fury/lib/fury.ts 
b/javascript/packages/fury/lib/fury.ts
index a7055aaf..4587f7ff 100644
--- a/javascript/packages/fury/lib/fury.ts
+++ b/javascript/packages/fury/lib/fury.ts
@@ -111,7 +111,7 @@ export default class {
 bitmap |= ConfigFlags.isCrossLanguageFlag;
 this.binaryWriter.int16(MAGIC_NUMBER);
 this.binaryWriter.uint8(bitmap);
-this.binaryWriter.uint8(Language.XLANG);
+this.binaryWriter.uint8(Language.JAVASCRIPT);
 const cursor = this.binaryWriter.getCursor();
 this.binaryWriter.skip(4); // preserve 4-byte for nativeObjects start 
offsets.
 this.binaryWriter.uint32(0); // nativeObjects length.
diff --git a/javascript/packages/fury/lib/type.ts 
b/javascript/packages/fury/lib/type.ts
index d7746d55..9f

(incubator-fury) branch main updated: feat(java): Support CopyOnWriteArrayListSerializer (#1613)

2024-05-08 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 9687fd8e feat(java): Support CopyOnWriteArrayListSerializer (#1613)
9687fd8e is described below

commit 9687fd8e97938d07cedff2197ebdc4bcbff15c75
Author: 李舒畅 
AuthorDate: Wed May 8 23:21:58 2024 +0800

feat(java): Support CopyOnWriteArrayListSerializer (#1613)



## What does this PR do?



Support CopyOnWriteArrayListSerializer

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../collection/CollectionSerializers.java  | 25 ++
 .../fury-core/native-image.properties  |  1 +
 .../collection/CollectionSerializersTest.java  | 11 ++
 3 files changed, 37 insertions(+)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java
 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java
index 744eddfa..7e149508 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializers.java
@@ -39,6 +39,7 @@ import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.Vector;
 import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayList;
 import org.apache.fury.Fury;
 import org.apache.fury.config.Language;
 import org.apache.fury.exception.FuryException;
@@ -255,6 +256,27 @@ public class CollectionSerializers {
 }
   }
 
+  public static class CopyOnWriteArrayListSerializer
+  extends CollectionSerializer {
+
+public CopyOnWriteArrayListSerializer(Fury fury, 
Class type) {
+  super(fury, type);
+}
+
+@Override
+public Collection newCollection(MemoryBuffer buffer) {
+  int numElements = buffer.readVarUint32Small7();
+  setNumElements(numElements);
+  return new CollectionContainer<>(numElements);
+}
+
+@Override
+public CopyOnWriteArrayList onCollectionRead(Collection collection) {
+  Object[] elements = ((CollectionContainer) collection).elements;
+  return new CopyOnWriteArrayList(elements);
+}
+  }
+
   public static final class EmptySetSerializer extends 
CollectionSerializer> {
 
 public EmptySetSerializer(Fury fury, Class> cls) {
@@ -624,5 +646,8 @@ public class CollectionSerializers {
 fury.registerSerializer(BitSet.class, new BitSetSerializer(fury, 
BitSet.class));
 fury.registerSerializer(
 PriorityQueue.class, new PriorityQueueSerializer(fury, 
PriorityQueue.class));
+fury.registerSerializer(
+CopyOnWriteArrayList.class,
+new CopyOnWriteArrayListSerializer(fury, CopyOnWriteArrayList.class));
   }
 }
diff --git 
a/java/fury-core/src/main/resources/META-INF/native-image/org.apache.fury/fury-core/native-image.properties
 
b/java/fury-core/src/main/resources/META-INF/native-image/org.apache.fury/fury-core/native-image.properties
index 8a14afa9..2733515f 100644
--- 
a/java/fury-core/src/main/resources/META-INF/native-image/org.apache.fury/fury-core/native-image.properties
+++ 
b/java/fury-core/src/main/resources/META-INF/native-image/org.apache.fury/fury-core/native-image.properties
@@ -22,6 +22,7 @@ 
Args=--initialize-at-build-time=org.apache.fury.memory.MemoryBuffer,\
 org.apache.fury.serializer.collection.UnmodifiableSerializers$Offset,\
 org.apache.fury.serializer.collection.SynchronizedSerializers$Offset,\
 
org.apache.fury.serializer.collection.CollectionSerializers$ArraysAsListSerializer,\
+
org.apache.fury.serializer.collection.CollectionSerializers$CopyOnWriteArrayListSerializer,\
 org.apache.fury.serializer.collection.MapSerializers$EnumMapSerializer,\
 org.apache.fury.serializer.JdkProxySerializer,\
 org.apache.fury.serializer.StringSerializer$Offset,\
diff --git 
a/java/fury-core/src/test/java/org/apache/fury/serializer/collection/CollectionSerializersTest.java
 
b/java/fury-core/src/test/java/org/apache/fury/serializer/collection/CollectionSerializersTest.java
index d7cd2944..83bbfcd8 100644
--- 
a/java/fury-core/src/test/java/org/apache/fury/serializer/collection/CollectionSerializersTest.java
+++ 
b/java/fury-core/src/test/java/org/apache/fury/serializer/collection/CollectionSerializersTest.java
@@ -52,6 +52,7 @@ import java.util.TreeSet;
 import java.util.Vector;
 import java.util.concurrent.ArrayBlockingQueue;
 import java.util.concurrent.ConcurrentSkipListSet;
+import java.util.concurrent.CopyOnWriteArrayL

(incubator-fury) branch main updated: refactor(java): Remove Guava's Collection usages (#1611)

2024-05-08 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new a87b9025 refactor(java): Remove Guava's Collection usages (#1611)
a87b9025 is described below

commit a87b90252dfb84f8bc48924fcf7f6d2e6a8da6fa
Author: Nikita Ivchenko 
AuthorDate: Wed May 8 17:21:57 2024 +0300

refactor(java): Remove Guava's Collection usages (#1611)


## What does this PR do?

Remove Guava's Collection usages

## Related issues


#1113

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?

Lazy map become slightly more lazy =)


---
 .../fury/builder/BaseObjectCodecBuilder.java   |  15 +-
 .../apache/fury/builder/ObjectCodecBuilder.java|  75 ---
 .../org/apache/fury/codegen/CodegenContext.java|   4 +-
 .../java/org/apache/fury/collection/LazyMap.java   | 217 +++--
 .../collection/ChildContainerSerializers.java  |   7 +-
 5 files changed, 261 insertions(+), 57 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
index 5cce3228..34bb51ba 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
@@ -48,7 +48,6 @@ import static org.apache.fury.type.TypeUtils.isBoxed;
 import static org.apache.fury.type.TypeUtils.isPrimitive;
 import static org.apache.fury.util.Preconditions.checkArgument;
 
-import com.google.common.collect.ImmutableSet;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
@@ -450,11 +449,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 buffer,
 inputObject));
 return invokeGenerated(
-ctx,
-ImmutableSet.of(buffer, inputObject),
-writeClassAndObject,
-"writeClassAndObject",
-false);
+ctx, ofHashSet(buffer, inputObject), writeClassAndObject, 
"writeClassAndObject", false);
   }
 
   /**
@@ -666,7 +661,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 serializer =
 invokeGenerated(
 ctx,
-ImmutableSet.of(buffer, collection),
+ofHashSet(buffer, collection),
 writeClassAction,
 "writeCollectionClassInfo",
 false);
@@ -685,7 +680,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 actions.add(write);
 if (generateNewMethod) {
   return invokeGenerated(
-  ctx, ImmutableSet.of(buffer, collection, serializer), actions, 
"writeCollection", false);
+  ctx, ofHashSet(buffer, collection, serializer), actions, 
"writeCollection", false);
 }
 return actions;
   }
@@ -970,7 +965,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 // Spit this into a separate method to avoid method too big to inline.
 serializer =
 invokeGenerated(
-ctx, ImmutableSet.of(buffer, map), writeClassAction, 
"writeMapClassInfo", false);
+ctx, ofHashSet(buffer, map), writeClassAction, 
"writeMapClassInfo", false);
   }
 } else if 
(!AbstractMapSerializer.class.isAssignableFrom(serializer.type().getRawType())) 
{
   serializer = new Cast(serializer, 
TypeRef.of(AbstractMapSerializer.class), "mapSerializer");
@@ -981,7 +976,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 jitWriteMap(buffer, map, serializer, typeRef),
 new Invoke(serializer, "write", buffer, map));
 if (generateNewMethod) {
-  return invokeGenerated(ctx, ImmutableSet.of(buffer, map), write, 
"writeMap", false);
+  return invokeGenerated(ctx, ofHashSet(buffer, map), write, "writeMap", 
false);
 }
 return write;
   }
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/ObjectCodecBuilder.java 
b/java/fury-core/src/main/java/org/apache/fury/builder/ObjectCodecBuilder.java
index 2e2df420..d1d8bc57 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/ObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/ObjectCodecBuilder.java
@@ -22,6 +22,7 @@ package org.apache.fury.builder;
 import static org.apache.fury.codegen.Code.LiteralValue.FalseLiteral;
 import static org.apache.fury.codegen.Expression.Invoke.inlineInvoke;
 import static org.apa

(incubator-fury) branch main updated: feat(javascript): add data to description util (#1609)

2024-05-07 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 8b3fe0ed feat(javascript): add data to description util (#1609)
8b3fe0ed is described below

commit 8b3fe0ed6de30526d6dcfaa884b1212b3029a2c5
Author: 野声 
AuthorDate: Wed May 8 09:33:21 2024 +0800

feat(javascript): add data to description util (#1609)



## What does this PR do?



Add a new util called `data2Description`, which can reduce the amount of
code

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 javascript/benchmark/index.js|   4 +-
 javascript/packages/fury/lib/util.ts |  90 ++
 javascript/test/util.js  | 104 ---
 3 files changed, 92 insertions(+), 106 deletions(-)

diff --git a/javascript/benchmark/index.js b/javascript/benchmark/index.js
index 016b7710..52d0b267 100644
--- a/javascript/benchmark/index.js
+++ b/javascript/benchmark/index.js
@@ -18,7 +18,7 @@
  */
 
 const Fury = require("@furyjs/fury");
-const utils = require("../test/util");
+const utils = require("@furyjs/fury/dist/lib/util");
 const hps = require('@furyjs/hps');
 const fury = new Fury.default({ hps, refTracking: false, useSliceString: true 
});
 const Benchmark = require("benchmark");
@@ -108,7 +108,7 @@ const sample = {
 };
 
 
-const description = utils.mockData2Description(sample, "fury.test.foo");
+const description = utils.data2Description(sample, "fury.test.foo");
 const { serialize, deserialize, serializeVolatile } = 
fury.registerSerializer(description);
 
 const furyAb = serialize(sample);
diff --git a/javascript/packages/fury/lib/util.ts 
b/javascript/packages/fury/lib/util.ts
index b7e45a12..39042704 100644
--- a/javascript/packages/fury/lib/util.ts
+++ b/javascript/packages/fury/lib/util.ts
@@ -17,6 +17,9 @@
  * under the License.
  */
 
+import { ObjectTypeDescription, Type, TypeDescription } from "./description";
+import { InternalSerializerType } from "./type";
+
 export const isNodeEnv: boolean
   = typeof process !== "undefined"
   && process.versions != null
@@ -24,3 +27,90 @@ export const isNodeEnv: boolean
   && process.versions.node != null;
 
 export const hasBuffer = isNodeEnv && typeof Buffer !== "undefined";
+
+export function isUint8Array(obj: any): obj is Uint8Array {
+  return obj instanceof Uint8Array || Object.prototype.toString.call(obj) === 
"[object Uint8Array]";
+}
+
+export const data2Description = (
+  data: any,
+  tag: string,
+): TypeDescription | null => {
+  if (data === null || data === undefined) {
+return null;
+  }
+  if (Array.isArray(data)) {
+const item = data2Description(data[0], tag);
+if (!item) {
+  throw new Error("empty array can't convert");
+}
+return {
+  ...Type.array(item),
+  label: "array",
+};
+  }
+  if (data instanceof Date) {
+return {
+  ...Type.timestamp(),
+  label: "timestamp",
+};
+  }
+  if (typeof data === "string") {
+return {
+  ...Type.string(),
+  label: "string",
+};
+  }
+  if (data instanceof Set) {
+return {
+  ...Type.set(data2Description([...data.values()][0], tag)!),
+  label: "set",
+};
+  }
+  if (data instanceof Map) {
+return {
+  ...Type.map(
+data2Description([...data.keys()][0], tag)!,
+data2Description([...data.values()][0], tag)!,
+  ),
+  label: "map",
+};
+  }
+  if (typeof data === "boolean") {
+return {
+  ...Type.bool(),
+  label: "boolean",
+};
+  }
+  if (typeof data === "number") {
+if (data > Number.MAX_SAFE_INTEGER || data < Number.MIN_SAFE_INTEGER) {
+  return {
+...Type.int64(),
+label: "int64",
+  };
+}
+return {
+  ...Type.int32(),
+  label: "int32",
+};
+  }
+
+  if (typeof data === "object") {
+if (isUint8Array(data)) {
+  return Type.binary();
+}
+
+return Type.object(
+  tag,
+  Object.fromEntries(
+Object.entries(data)
+  .map(([key, value]) => {
+return [key, data2Description(value, `${tag}.${key}`)];
+  })
+  .filter(([_, v]) => Boolean(v)),
+  ),
+);
+  }
+
+  throw new Error(`unkonw data type ${typeof data}`);
+};
diff --git a/javascript/test/util.js b/javascript/test/uti

(incubator-fury) 01/01: bump version to 0.5.1

2024-05-07 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch releases-0.5.1
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git

commit c68389213680bc392e287411f84dbbaa1da98da5
Author: chaokunyang 
AuthorDate: Tue May 7 17:38:01 2024 +0800

bump version to 0.5.1
---
 integration_tests/graalvm_tests/pom.xml   | 2 +-
 integration_tests/jdk_compatibility_tests/pom.xml | 2 +-
 integration_tests/jpms_tests/pom.xml  | 2 +-
 integration_tests/latest_jdk_tests/pom.xml| 2 +-
 java/benchmark/pom.xml| 2 +-
 java/fury-core/pom.xml| 2 +-
 java/fury-format/pom.xml  | 2 +-
 java/fury-test-core/pom.xml   | 2 +-
 java/fury-testsuite/pom.xml   | 2 +-
 java/pom.xml  | 2 +-
 javascript/packages/fury/package.json | 2 +-
 javascript/packages/hps/package.json  | 2 +-
 rust/Cargo.toml   | 2 +-
 scala/build.sbt   | 2 +-
 14 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/integration_tests/graalvm_tests/pom.xml 
b/integration_tests/graalvm_tests/pom.xml
index d3f952c2..44e8cd61 100644
--- a/integration_tests/graalvm_tests/pom.xml
+++ b/integration_tests/graalvm_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/jdk_compatibility_tests/pom.xml 
b/integration_tests/jdk_compatibility_tests/pom.xml
index f6af0074..238fc7cc 100644
--- a/integration_tests/jdk_compatibility_tests/pom.xml
+++ b/integration_tests/jdk_compatibility_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/jpms_tests/pom.xml 
b/integration_tests/jpms_tests/pom.xml
index fca2007f..3744a267 100644
--- a/integration_tests/jpms_tests/pom.xml
+++ b/integration_tests/jpms_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/integration_tests/latest_jdk_tests/pom.xml 
b/integration_tests/latest_jdk_tests/pom.xml
index 015633ec..a7852650 100644
--- a/integration_tests/latest_jdk_tests/pom.xml
+++ b/integration_tests/latest_jdk_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
 ../../java
   
   4.0.0
diff --git a/java/benchmark/pom.xml b/java/benchmark/pom.xml
index 89a2cb6a..e7ab6b47 100644
--- a/java/benchmark/pom.xml
+++ b/java/benchmark/pom.xml
@@ -26,7 +26,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
 
   benchmark
diff --git a/java/fury-core/pom.xml b/java/fury-core/pom.xml
index dcf87204..c2aad443 100644
--- a/java/fury-core/pom.xml
+++ b/java/fury-core/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-format/pom.xml b/java/fury-format/pom.xml
index 6c4c6cb6..33500a81 100644
--- a/java/fury-format/pom.xml
+++ b/java/fury-format/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-test-core/pom.xml b/java/fury-test-core/pom.xml
index b129d1ca..191e348c 100644
--- a/java/fury-test-core/pom.xml
+++ b/java/fury-test-core/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/fury-testsuite/pom.xml b/java/fury-testsuite/pom.xml
index c5d91898..9ffb36a4 100644
--- a/java/fury-testsuite/pom.xml
+++ b/java/fury-testsuite/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.6.0-SNAPSHOT
+0.5.1
   
   4.0.0
 
diff --git a/java/pom.xml b/java/pom.xml
index 3f7f7b5f..b01550ce 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -33,7 +33,7 @@
   org.apache.fury
   fury-parent
   pom
-  0.6.0-SNAPSHOT
+  0.5.1
   Fury Project Parent POM
   
 Apache Fury™ is a blazingly fast multi-language serialization framework 
powered by jit and zero-copy.
diff --git a/javascript/packages/fury/package.json 
b/javascript/packages/fury/package.json
index 2aff4210..984c6fca 100644
--- a/javascript/packages/fury/package.json
+++ b/javascript/packages/fury/package.json
@@ -1,6 +1,6 @@
 {
   "name": "@furyjs/fury",
-  "version": "0.6.0.dev",
+  "version": "0.5.1",
   "description": "Apache Fury™(incubating) is a blazingly fast multi-language 
serialization framework powered by jit and zero-copy",
   "main": "dist/index.js",
   "scripts": {
diff --git a/javascript/packages/hps/package.json 
b/javascript/packages/hps/package.json
index 2bf5aea2..1211257b 100644
---

(incubator-fury) branch releases-0.5.1 created (now c6838921)

2024-05-07 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to branch releases-0.5.1
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at c6838921 bump version to 0.5.1

This branch includes the following new commits:

 new c6838921 bump version to 0.5.1

The 1 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.



-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: add metastring spec link to metastring blog (#123)

2024-05-07 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 6fd68e6  add metastring spec link to metastring blog (#123)
6fd68e6 is described below

commit 6fd68e642904e8adc6d3b8463d7c8cfb1489a104
Author: Shawn Yang 
AuthorDate: Tue May 7 17:26:43 2024 +0800

add metastring spec link to metastring blog (#123)
---
 blog/2024-05-06-metastring-space-efficient_encoding_for_string.md | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md 
b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
index 550bfdd..9afee9e 100644
--- a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
+++ b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
@@ -14,7 +14,7 @@ will take one byte for every char, which is not space 
efficient actually.
 
 If we take a deeper look, we will found that most chars are **lowercase chars, 
 `.`, `$` and `_`**, which can be expressed in a much 
 smaller range **`0~32`**. But one byte can represent range `0~255`, the 
significant bits are wasted, and this cost is not ignorable. In a dynamic 
serialization
-framework, such meta will take considerable cost compared to real data.
+framework, such meta will take considerable cost compared to actual data.
 
 So we proposed a new string encoding algorithm which we called **meta string 
encoding** in Fury. It will encode most chars using `5` bits instead of `8` 
bits in utf-8 encoding, which can bring **37.5% space cost savings** compared 
to utf-8 encoding.
 
@@ -26,6 +26,7 @@ Such a string is enumerated and limited, so the encoding 
performance is not impo
 Meta string encoding uses `5/6` bits instead of `8` bits in utf-8 encoding for 
every chars. Since it uses less bits than utf8, it can bring 
 **37.5% space cost savings** compared to utf-8 and has a smaller encoded 
binary size, which uses less storage and makes the network transfer faster.
 
+More details about meta string spec can be found in [Fury xlang serialization 
specification](https://fury.apache.org/docs/specification/fury_xlang_serialization_spec/#meta-string).
 
 ## Encoding Algorithms
 


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: fix metastring link (#122)

2024-05-06 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 80cc38d  fix metastring link (#122)
80cc38d is described below

commit 80cc38d91582c87c48f9166c89fe5713fd596fc5
Author: Shawn Yang 
AuthorDate: Tue May 7 10:32:11 2024 +0800

fix metastring link (#122)
---
 blog/2024-05-06-metastring-space-efficient_encoding_for_string.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md 
b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
index 4129247..550bfdd 100644
--- a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
+++ b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
@@ -1,5 +1,5 @@
 ---
-slug: fury
+slug: fury_meta_string_37_5_percent_space_efficient_encoding_than_utf8
 title: 'Meta String: A 37.5% space efficient string encoding than UTF-8 in 
Fury serialization'
 authors: [chaokunyang]
 tags: [fury]


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated: refine meta string blog (#121)

2024-05-06 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 4e3a34c  refine meta string blog (#121)
4e3a34c is described below

commit 4e3a34c34b4a1238e126112e0529676160f100c1
Author: Shawn Yang 
AuthorDate: Tue May 7 10:18:55 2024 +0800

refine meta string blog (#121)
---
 ...tastring-space-efficient_encoding_for_string.md | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md 
b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
index 8d75c52..4129247 100644
--- a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
+++ b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
@@ -7,16 +7,16 @@ tags: [fury]
 
 ## Background
 
-In rpc/serialization systems, we often need to send 
**`namespace/path/filename/fieldName/packageName/moduleName/className/enumValue`**
 between processes.
+In rpc/serialization systems, we often need to send 
**`namespace/path/filename/fieldName/packageName/moduleName/className/enumValue`**
 string between processes.
 
-Those strings are mostly ascii strings. In order to transfer between 
processes, we often encode such strings using utf-8 encodings. Such encoding
+Those strings are mostly ascii strings. In order to transfer between 
processes, we encode such strings using utf-8 encodings. Such encoding
 will take one byte for every char, which is not space efficient actually.
 
-If we take a deeper look, we will found that most chars are **lower chars plus 
`.`, `$` and `_`**, which can be expressed in a much 
-smaller range **`0~32`**, and one byte can represent range `0~255`, the 
significant bits are wasted. And the cost is not ignorable, in a dynamic 
serialization
+If we take a deeper look, we will found that most chars are **lowercase chars, 
 `.`, `$` and `_`**, which can be expressed in a much 
+smaller range **`0~32`**. But one byte can represent range `0~255`, the 
significant bits are wasted, and this cost is not ignorable. In a dynamic 
serialization
 framework, such meta will take considerable cost compared to real data.
 
-So we proposed a new string encoding algorithm which we called **meta string 
encoding**. It will encode most chars using less bits instead of `8` bits in 
utf-8 encoding.
+So we proposed a new string encoding algorithm which we called **meta string 
encoding** in Fury. It will encode most chars using `5` bits instead of `8` 
bits in utf-8 encoding, which can bring **37.5% space cost savings** compared 
to utf-8 encoding.
 
 ## Meta String Introduction
 
@@ -36,9 +36,10 @@ String binary encoding algorithm:
 | LOWER_SPECIAL | `a-z._$\|`| every char is written using 5 
bits, `a-z`: `0b0~0b11001`, `._$\|`: `0b11010~0b11101`, prepend one bit at 
the start to indicate whether strip last char since last byte may have 7 
redundant bits(1 indicates strip last char) 
   |
 | LOWER_UPPER_DIGIT_SPECIAL | `a-zA-Z0~9._` | every char is written using 6 
bits, `a-z`: `0b0~0b11001`, `A-Z`: `0b11010~0b110011`, `0~9`: 
`0b110100~0b01`, `._`: `0b10~0b11`,  prepend one bit at the start 
to indicate whether strip last char since last byte may have 7 redundant bits(1 
indicates strip last char) |
 | UTF-8 | any chars | UTF-8 encoding   



|
-If we use `LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL`, we must add a strip last 
char flag in encoded data. This is because every char will be encoded using 
`5/6` bits, and the last char may have `1~7` bits which are unused by encoding, 
such bits may cause an extra char read, which we must strip off.
 
-Encoding code snippet in java, see 
[`org.apache.fury.meta.MetaStringEncoder#encodeGeneric(char[], 
int)`](https://github.com/apache/incubator-fury/blob/93800888595065b2690fec093ab0cbfd6ac7dedc/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java#L235)
 for more detailed:
+If we use `LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL`, we must add a strip last 
char flag in encoded data. This is because every char will be encoded using 
`5/6` bits, and the last char may have `1~7` bits which are unused by encoding, 
such bits may cause an extra char to be read, which we must strip off.
+
+Here is encoding code snippet in java, see 
[`org.apache.fury.meta.MetaStringEncoder#encodeGeneric(char[], 
int)`](https://github.com/apache/incubator-fury/blob/93800888595065b2690fec093ab0cbfd6ac7dedc/java/fury-core/src

(incubator-fury-site) branch main updated: add meta string blog (#120)

2024-05-06 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 091fb42  add meta string blog (#120)
091fb42 is described below

commit 091fb42928a47fa73e6704310c365b9c2472321c
Author: Shawn Yang 
AuthorDate: Tue May 7 09:30:01 2024 +0800

add meta string blog (#120)
---
 ...tastring-space-efficient_encoding_for_string.md | 178 +
 1 file changed, 178 insertions(+)

diff --git a/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md 
b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
new file mode 100644
index 000..8d75c52
--- /dev/null
+++ b/blog/2024-05-06-metastring-space-efficient_encoding_for_string.md
@@ -0,0 +1,178 @@
+---
+slug: fury
+title: 'Meta String: A 37.5% space efficient string encoding than UTF-8 in 
Fury serialization'
+authors: [chaokunyang]
+tags: [fury]
+---
+
+## Background
+
+In rpc/serialization systems, we often need to send 
**`namespace/path/filename/fieldName/packageName/moduleName/className/enumValue`**
 between processes.
+
+Those strings are mostly ascii strings. In order to transfer between 
processes, we often encode such strings using utf-8 encodings. Such encoding
+will take one byte for every char, which is not space efficient actually.
+
+If we take a deeper look, we will found that most chars are **lower chars plus 
`.`, `$` and `_`**, which can be expressed in a much 
+smaller range **`0~32`**, and one byte can represent range `0~255`, the 
significant bits are wasted. And the cost is not ignorable, in a dynamic 
serialization
+framework, such meta will take considerable cost compared to real data.
+
+So we proposed a new string encoding algorithm which we called **meta string 
encoding**. It will encode most chars using less bits instead of `8` bits in 
utf-8 encoding.
+
+## Meta String Introduction
+
+Meta string encoding algorithm is mainly used to encode meta strings such as 
**field names, namespace, packageName, className, path and filename**.
+Such a string is enumerated and limited, so the encoding performance is not 
important since we can cache the encoding result.
+
+Meta string encoding uses `5/6` bits instead of `8` bits in utf-8 encoding for 
every chars. Since it uses less bits than utf8, it can bring 
+**37.5% space cost savings** compared to utf-8 and has a smaller encoded 
binary size, which uses less storage and makes the network transfer faster.
+
+
+## Encoding Algorithms
+
+String binary encoding algorithm:
+
+| Algorithm | Pattern   | Description  



|
+|---|---|--|
+| LOWER_SPECIAL | `a-z._$\|`| every char is written using 5 
bits, `a-z`: `0b0~0b11001`, `._$\|`: `0b11010~0b11101`, prepend one bit at 
the start to indicate whether strip last char since last byte may have 7 
redundant bits(1 indicates strip last char) 
   |
+| LOWER_UPPER_DIGIT_SPECIAL | `a-zA-Z0~9._` | every char is written using 6 
bits, `a-z`: `0b0~0b11001`, `A-Z`: `0b11010~0b110011`, `0~9`: 
`0b110100~0b01`, `._`: `0b10~0b11`,  prepend one bit at the start 
to indicate whether strip last char since last byte may have 7 redundant bits(1 
indicates strip last char) |
+| UTF-8 | any chars | UTF-8 encoding   



|
+If we use `LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL`, we must add a strip last 
char flag in encoded data. This is because every char will be encoded using 
`5/6` bits, and the last char may have `1~7` bits which are unused by encoding, 
such bits may cause an extra char read, which we must strip off.
+
+Encoding code snippet in java, see 
[`org.apache.fury.meta.MetaStringEncoder#encodeGeneric(char[], 
int)`](https://github.com/apache/incubator-fury/blob/93800888595065b2690fec093ab0cbfd6ac7dedc/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringEncoder.java#L235)
 for more detailed:
+```java
+private byte[] encodeGeneric(char[] chars, int

(incubator-fury) branch main updated: fix(java): fix TypeRef getSubType (#1608)

2024-05-06 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 72fdfd59 fix(java): fix TypeRef getSubType (#1608)
72fdfd59 is described below

commit 72fdfd5946b1e76a9708d25ea4d70db1433ca798
Author: Shawn Yang 
AuthorDate: Tue May 7 00:29:36 2024 +0800

fix(java): fix TypeRef getSubType (#1608)

## What does this PR do?

 fix TypeRef getSubType

## Related issues

Closes #1604

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/benchmark/state/JsonTest.java  | 57 ++
 .../main/java/org/apache/fury/reflect/TypeRef.java | 13 ++---
 .../java/org/apache/fury/reflect/TypeRefTest.java  | 42 
 3 files changed, 102 insertions(+), 10 deletions(-)

diff --git 
a/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java 
b/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java
new file mode 100644
index ..f96ea6a1
--- /dev/null
+++ b/java/benchmark/src/test/java/org/apache/fury/benchmark/state/JsonTest.java
@@ -0,0 +1,57 @@
+/*
+ * 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.
+ */
+
+package org.apache.fury.benchmark.state;
+
+import com.alibaba.fastjson2.JSONObject;
+import org.apache.fury.Fury;
+import org.apache.fury.config.CompatibleMode;
+import org.apache.fury.config.Language;
+import org.testng.Assert;
+import org.testng.annotations.Test;
+
+public class JsonTest {
+  public static class DemoResponse {
+private JSONObject json;
+
+public DemoResponse(JSONObject json) {
+  this.json = json;
+}
+  }
+
+  @Test
+  public void testSerializeJson() {
+// For issue: https://github.com/apache/incubator-fury/issues/1604
+JSONObject jsonObject = new JSONObject();
+jsonObject.put("k1", "v1");
+jsonObject.put("k2", "v2");
+DemoResponse resp = new DemoResponse(jsonObject);
+Fury fury =
+Fury.builder()
+.withLanguage(Language.JAVA)
+.requireClassRegistration(false)
+.withRefTracking(true)
+.registerGuavaTypes(false)
+.withCompatibleMode(CompatibleMode.COMPATIBLE)
+.build();
+byte[] serialized = fury.serialize(resp);
+DemoResponse o = (DemoResponse) fury.deserialize(serialized);
+Assert.assertEquals(o.json, jsonObject);
+  }
+}
diff --git a/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java 
b/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
index 9a41fa13..b984bb32 100644
--- a/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
+++ b/java/fury-core/src/main/java/org/apache/fury/reflect/TypeRef.java
@@ -498,15 +498,6 @@ public class TypeRef {
   for (int i = 0; i < fromArgs.length; i++) {
 populateTypeMappings(mappings, fromArgs[i], toArgs[i]);
   }
-} else if (supertypeWithArgsFromSubtype instanceof Class) {
-  if (toType instanceof WildcardType) {
-return; // Okay to say Foo is 
-  }
-  // Can't map from a raw class to anything other than itself or a 
wildcard.
-  // You can't say "assuming String is Integer".
-  // And we don't support "assuming String is T"; user has to say 
"assuming T is String".
-  throw new IllegalArgumentException(
-  "No type mapping from " + supertypeWithArgsFromSubtype + " to " + 
toType);
 } else if (supertypeWithArgsFromSubtype instanceof GenericArrayType) {
   if (toType instanceof WildcardType) {
 return; // Okay to say A[] is 
@@ -516,7 +507,9 @@ public class TypeRef {
   ((GenericArrayType) 
supertypeWithArgsFromSubtype).getGenericComponentType();
   populateTypeMappings(mappings, fromComponentType, componentType);
 } else {
-

(incubator-fury-site) branch main updated: fix 0.5.0 release date (#119)

2024-05-06 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 496044d  fix 0.5.0 release date (#119)
496044d is described below

commit 496044d788a0cf6e3440f5d1494dca42664a498b
Author: Shawn Yang 
AuthorDate: Mon May 6 23:42:40 2024 +0800

fix 0.5.0 release date (#119)
---
 ...{2024-05-13-fury_0_5_0_release.md => 2024-05-03-fury_0_5_0_release.md} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/blog/2024-05-13-fury_0_5_0_release.md 
b/blog/2024-05-03-fury_0_5_0_release.md
similarity index 100%
rename from blog/2024-05-13-fury_0_5_0_release.md
rename to blog/2024-05-03-fury_0_5_0_release.md


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated:  synced local 'docs/specification/' with remote 'docs/specification/'

2024-05-06 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 831f16b   synced local 'docs/specification/' with remote 
'docs/specification/'
831f16b is described below

commit 831f16b2221720b76beb938998e23c486b9b1daa
Author: chaokunyang 
AuthorDate: Mon May 6 14:56:41 2024 +

 synced local 'docs/specification/' with remote 'docs/specification/'
---
 docs/specification/xlang_serialization_spec.md | 34 ++
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/docs/specification/xlang_serialization_spec.md 
b/docs/specification/xlang_serialization_spec.md
index 0583e7e..7b46b55 100644
--- a/docs/specification/xlang_serialization_spec.md
+++ b/docs/specification/xlang_serialization_spec.md
@@ -288,23 +288,27 @@ Meta header is a 64 bits number value encoded in little 
endian order.
   fields, then use fields info in meta for deserializing compatible fields.
 - type id: the registered id for the current type, which will be written as an 
unsigned varint.
 - field info:
-- Header(8 bits):
-- Format:
-- `reserved 1 bit + 3 bits field name encoding + polymorphism flag 
+ nullability flag + ref tracking flag + tag id flag`.
-- Users can use annotation to provide that info.
-- tag id: when set to 1, the field name will be written by an 
unsigned varint tag id.
-- ref tracking: when set to 0, ref tracking will be disabled for 
this field.
-- nullability: when set to 0, this field won't be null.
-- polymorphism: when set to 1, the actual type of field will be 
the declared field type even the type if
-  not `final`.
-- 3 bits field name encoding will be set to meta string encoding 
flags when tag id is not set.
-- Type id:
+- header(8
+  bits): `3 bits size + 2 bits field name encoding + polymorphism flag + 
nullability flag + ref tracking flag`.
+  Users can use annotation to provide those info.
+- 2 bits field name encoding:
+- encoding: 
`UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL/TAG_ID`
+- If tag id is used, i.e. field name is written by an unsigned 
varint tag id. 2 bits encoding will be `11`.
+- size of field name:
+- The `3 bits size: 0~7`  will be used to indicate length `1~7`, 
the value `7` indicates to read more bytes,
+  the encoding will encode `size - 7` as a varint next.
+- If encoding is `TAG_ID`, then num_bytes of field name will be 
used to store tag id.
+- ref tracking: when set to 1, ref tracking will be enabled for this 
field.
+- nullability: when set to 1, this field can be null.
+- polymorphism: when set to 1, the actual type of field will be the 
declared field type even the type if
+  not `final`.
+- field name: If tag id is set, tag id will be used instead. Otherwise 
meta string encoding `[length]` and data will
+  be written instead.
+- type id:
 - For registered type-consistent classes, it will be the registered 
type id.
 - Otherwise it will be encoded as `OBJECT_ID` if it isn't `final` and 
`FINAL_OBJECT_ID` if it's `final`. The
   meta for such types is written separately instead of inlining here 
is to reduce meta space cost if object of
-  this type is serialized in the current object graph multiple times, 
and the field value may be null too.
-- Field name: If tag id is set, tag id will be used instead. Otherwise 
meta string encoding length and data will
-  be written instead.
+  this type is serialized in current object graph multiple times, and 
the field value may be null too.
 
 Field order are left as implementation details, which is not exposed to 
specification, the deserialization need to
 resort fields based on Fury field comparator. In this way, fury can compute 
statistics for field names or types and
@@ -473,7 +477,7 @@ which will be encoded by elements header, each use one bit:
 By default, all bits are unset, which means all elements won't track ref, all 
elements are same type, not null and
 the actual element is the declared type in the custom type field.
 
-The implementation can generate different deserialization code based read  
header, and look up the generated code from
+The implementation can generate different deserialization code based read 
header, and look up the generated code from
 a linear map/list.
 
  elements data


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: feat(sepc): update type meta field info spec (#1603)

2024-05-06 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 93800888 feat(sepc): update type meta field info spec (#1603)
93800888 is described below

commit 93800888595065b2690fec093ab0cbfd6ac7dedc
Author: Shawn Yang 
AuthorDate: Mon May 6 22:56:27 2024 +0800

feat(sepc): update type meta field info spec (#1603)

## What does this PR do?

Update type meta field info spec:
```
- field info:
- header(8
  bits): `3 bits size + 2 bits field name encoding + polymorphism flag 
+ nullability flag + ref tracking flag`.
  Users can use annotation to provide those info.
- 2 bits field name encoding:
- encoding: 
`UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL/TAG_ID`
- If tag id is used, i.e. field name is written by an unsigned 
varint tag id. 2 bits encoding will be `11`.
- size of field name:
- The `3 bits size: 0~7`  will be used to indicate length 
`1~7`, the value `7` indicates to read more bytes,
  the encoding will encode `size - 7` as a varint next.
- If encoding is `TAG_ID`, then num_bytes of field name will be 
used to store tag id.
- ref tracking: when set to 1, ref tracking will be enabled for 
this field.
- nullability: when set to 1, this field can be null.
- polymorphism: when set to 1, the actual type of field will be the 
declared field type even the type if
  not `final`.
- field name: If tag id is set, tag id will be used instead. Otherwise 
meta string encoding `[length]` and data will
  be written instead.
```

## Related issues
#1556


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 docs/specification/xlang_serialization_spec.md | 34 ++
 1 file changed, 19 insertions(+), 15 deletions(-)

diff --git a/docs/specification/xlang_serialization_spec.md 
b/docs/specification/xlang_serialization_spec.md
index 0583e7e0..7b46b556 100644
--- a/docs/specification/xlang_serialization_spec.md
+++ b/docs/specification/xlang_serialization_spec.md
@@ -288,23 +288,27 @@ Meta header is a 64 bits number value encoded in little 
endian order.
   fields, then use fields info in meta for deserializing compatible fields.
 - type id: the registered id for the current type, which will be written as an 
unsigned varint.
 - field info:
-- Header(8 bits):
-- Format:
-- `reserved 1 bit + 3 bits field name encoding + polymorphism flag 
+ nullability flag + ref tracking flag + tag id flag`.
-- Users can use annotation to provide that info.
-- tag id: when set to 1, the field name will be written by an 
unsigned varint tag id.
-- ref tracking: when set to 0, ref tracking will be disabled for 
this field.
-- nullability: when set to 0, this field won't be null.
-- polymorphism: when set to 1, the actual type of field will be 
the declared field type even the type if
-  not `final`.
-- 3 bits field name encoding will be set to meta string encoding 
flags when tag id is not set.
-- Type id:
+- header(8
+  bits): `3 bits size + 2 bits field name encoding + polymorphism flag + 
nullability flag + ref tracking flag`.
+  Users can use annotation to provide those info.
+- 2 bits field name encoding:
+- encoding: 
`UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL/TAG_ID`
+- If tag id is used, i.e. field name is written by an unsigned 
varint tag id. 2 bits encoding will be `11`.
+- size of field name:
+- The `3 bits size: 0~7`  will be used to indicate length `1~7`, 
the value `7` indicates to read more bytes,
+  the encoding will encode `size - 7` as a varint next.
+- If encoding is `TAG_ID`, then num_bytes of field name will be 
used to store tag id.
+- ref tracking: when set to 1, ref tracking will be enabled for this 
field.
+- nullability: when set to 1, this field can be null.
+- polymorphism: when set to 1, the actual type of field will be the 
declared field type even the type if
+  not `final`.
+- field name: If tag id is set, tag id will be used instead. Otherwise 
meta string encoding `[length]` and data will
+  be written instead.
+- type id:
 - For registered type-consistent classes, it will be the registered 
type id.
 - Otherwise it will be encoded as `OBJECT_ID` if it isn't `final` and 
`FINAL_OBJECT_ID

(incubator-fury) branch main updated: fix(java): clear serializer for collection/map (#1606)

2024-05-06 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 7d912ca1 fix(java): clear serializer for collection/map (#1606)
7d912ca1 is described below

commit 7d912ca161d7e8f75176ce4d25fdcf2aac61a74a
Author: Shawn Yang 
AuthorDate: Mon May 6 22:54:33 2024 +0800

fix(java): clear serializer for collection/map (#1606)

## What does this PR do?
Some collectionSerializer may overwrite write/read method, then clear
element serializer may not got invoked.

This PR clears serializer for collection/map to avoid container use
wrong serializer for nested elements.

## Related issues

#1558
https://github.com/apache/incubator-fury/issues/1455,
https://github.com/apache/incubator-fury/issues/1325 and
https://github.com/apache/incubator-fury/issues/1176.

## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../org/apache/fury/resolver/FieldResolver.java| 91 +-
 .../fury/serializer/CompatibleSerializer.java  | 43 +++---
 2 files changed, 107 insertions(+), 27 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java 
b/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java
index b7651179..047a2af1 100644
--- a/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java
+++ b/java/fury-core/src/main/java/org/apache/fury/resolver/FieldResolver.java
@@ -568,29 +568,54 @@ public class FieldResolver {
   ClassInfo elementClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   CollectionSerializer collectionSerializer = (CollectionSerializer) 
classInfo.getSerializer();
-  
collectionSerializer.setElementSerializer(elementClassInfo.getSerializer());
-  o = collectionSerializer.read(buffer);
+  try {
+
collectionSerializer.setElementSerializer(elementClassInfo.getSerializer());
+o = collectionSerializer.read(buffer);
+  } finally {
+// Some collectionSerializer may overwrite write/read method, then 
clear element serializer
+// may not got invoked.
+collectionSerializer.setElementSerializer(null);
+  }
 } else if (fieldType == FieldTypes.MAP_KV_FINAL) {
   ClassInfo keyClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo valueClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   MapSerializer mapSerializer = (MapSerializer) classInfo.getSerializer();
-  mapSerializer.setKeySerializer(keyClassInfo.getSerializer());
-  mapSerializer.setValueSerializer(valueClassInfo.getSerializer());
-  o = mapSerializer.read(buffer);
+  try {
+mapSerializer.setKeySerializer(keyClassInfo.getSerializer());
+mapSerializer.setValueSerializer(valueClassInfo.getSerializer());
+o = mapSerializer.read(buffer);
+  } finally {
+// Some mmapSerializer may overwrite write/read method, then clear 
serializer
+// may not got invoked.
+mapSerializer.setKeySerializer(null);
+mapSerializer.setValueSerializer(null);
+  }
 } else if (fieldType == FieldTypes.MAP_KEY_FINAL) {
   ClassInfo keyClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   MapSerializer mapSerializer = (MapSerializer) classInfo.getSerializer();
-  mapSerializer.setKeySerializer(keyClassInfo.getSerializer());
-  o = mapSerializer.read(buffer);
+  try {
+mapSerializer.setKeySerializer(keyClassInfo.getSerializer());
+o = mapSerializer.read(buffer);
+  } finally {
+// Some mmapSerializer may overwrite write/read method, then clear 
serializer
+// may not got invoked.
+mapSerializer.setKeySerializer(null);
+  }
 } else {
   Preconditions.checkArgument(fieldType == FieldTypes.MAP_VALUE_FINAL);
   ClassInfo valueClassInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   ClassInfo classInfo = classResolver.readClassInfo(buffer, 
classInfoHolder);
   MapSerializer mapSerializer = (MapSerializer) classInfo.getSerializer();
-  mapSerializer.setValueSerializer(valueClassInfo.getSerializer());
-  o = mapSerializer.read(buffer);
+  try {
+mapSerializer.setValueSerializer(valueClassInfo.getSerializer());
+o = mapSerializer.read(buffer

(incubator-fury-site) branch main updated: release blog for fury 0.5.0 (#118)

2024-05-05 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new cfedbc7  release blog for fury 0.5.0 (#118)
cfedbc7 is described below

commit cfedbc7eb3c211b621a4f4315c99ff4095797913
Author: Shawn Yang 
AuthorDate: Mon May 6 10:25:06 2024 +0800

release blog for fury 0.5.0 (#118)


![image](https://github.com/apache/incubator-fury-site/assets/12445254/ef9eb70c-755d-4d36-8ad2-93247ae19e3b)
---
 blog/2024-05-13-fury_0_5_0_release.md | 174 ++
 1 file changed, 174 insertions(+)

diff --git a/blog/2024-05-13-fury_0_5_0_release.md 
b/blog/2024-05-13-fury_0_5_0_release.md
new file mode 100644
index 000..8b48652
--- /dev/null
+++ b/blog/2024-05-13-fury_0_5_0_release.md
@@ -0,0 +1,174 @@
+---
+slug: fury_0_5_0_release
+title: Fury v0.5.0 Released
+authors: [chaokunyang]
+tags: [fury]
+---
+
+We're excited to announce the release of Fury v0.5.0. This release 
incorporates a myriad of improvements, bug fixes, and new features across 
multiple languages including Java, Golang, Python and JavaScript. It further 
refines Fury's performance, compatibility, and developer experience.
+
+## New Features
+
+### Specification
+
+- Introduced fury cross-language serialization specification (#1413, #1508) 
+- Introduced xlang type mapping (#1468)
+- Introduced fury java specification (#1240)
+- Introduced meta string encoding specification (#1565, #1513, #1517)
+
+### Java
+
+- Support for compatible mode with GraalVM (#1586, #1587).
+- Support unexisted array/enum classes and enabled deserializeUnexistedClass 
by default (#1569, #1575).
+- meta string encoding algorithm in java (#1514, #1568, #1516, #1565)
+- Support meta string encoding for classname and package name (#1527)
+- native streaming mode deserialization (#1451, #1551)
+- native channel stream reader (#1483)
+- Support registration in thread safe fury (#1280)
+- Implement fury logger and remove slf4j library (#1485, #1494, #1506, #1492)
+- Support adjust logger level dynamically (#1557)
+- Support jdk proxy serialization for graalvm (#1379)
+- Specify JPMS module names (#1343)
+- Align string array to collection protocol v2 (#1228)
+
+### JavaScript
+
+- Align implementation to new Xlang protocol (#1487) 
+- Implement Xlang map (#1549)
+- Implemented xlang map code generator (#1571)
+- Added magic number feature for better serialization control (#1550).
+- Support oneof (#1348)
+- create zero-copy buffer when convert (#1386)
+- Implement the collection protocol (#1337)
+- Implement Enum (#1321)
+- compress numbers (#1290)
+
+### C++
+
+- Support optional fields/elements in RowEncoder (#1223)
+- Support mapping types for RowEncodeTrait (#1247)
+
+### Golang
+
+- Implemented Fury meta string encoding algorithm (#1566).
+- concat meta string len with flags (#1517)
+
+## Enhancements
+
+### Java
+
+- Improved buffer growth strategy to support larger data sizes for 
serialization (#1582).
+- Performance optimizations for MetaStringDecoder and various serialization 
processes (#1568, #1511, #1493).
+- concat write classname flag with package name (#1523)
+- concat meta string len with flags (#1517)
+- fastpath for read/write small varint in range `[0,127]` (#1503)
+- optimize read float/double for jvm jit inline (#1472)
+- replace Guava's TypeToken with self-made (#1553)
+- Remove basic guava API usage (#1244)
+- optimize fury creation speed (#1511)
+- optimize string serialization by concat coder and length (#1486)
+- carry read objects when deserialization fail for better trouble shooting 
(#1420)
+- implement define_class insteadof using javaassist (#1422)
+- avoid recompilation when gc happens for memory pressure (#1411, #1585)
+- Fix immutable collection ref tracking (#1403)
+- reduce fury caller stack (#1496)
+- Extract BaseFury interface (#1382)
+- refine collection builder util (#1334)
+- disable async compilation for graalvm (#1222)
+- refine endian check code size in buffer (#1501)
+- generate list fori loop instead of iterator loop for list serialization 
(#1493)
+- Reduce unsafeWritePositiveVarLong bytecode size. (#1491)
+- Reduce unsafePutPositiveVarInt bytecode size. (#1490, #1489)
+- optimize read char/short jvm jit inline (#1471)
+- reduce code size of read long to optimize jvm jit inline (#1470)
+- reduce readInt/readVarInt code size for for jvm jit inline (#1469)
+- refactor readVarUint32 algorithm (#1462)
+- rewrite readVarUint64 algorithm (#1463)
+
+### JavaScript
+
+- Make PlatformBuffer available if has Buffer polyfill (#1373)
+- enhance performance 64bits number (#1320)
+- Refactor & Compress Long (#1313)
+- Improve tag write performance (#1241)
+- Add more methods for BinaryReader (#1231)
+- Implements tuple serializer (#1216)
+
+### Python
+
+- concat meta string len with flags (#1517)
+
+### Bug

(incubator-fury-site) branch main updated:  synced local 'docs/guide/' with remote 'docs/guide/'

2024-05-05 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new c17e939   synced local 'docs/guide/' with remote 'docs/guide/'
c17e939 is described below

commit c17e939806fbd08b8671e77e1cd659272100613f
Author: chaokunyang 
AuthorDate: Sun May 5 08:31:14 2024 +

 synced local 'docs/guide/' with remote 'docs/guide/'
---
 docs/guide/scala_guide.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/guide/scala_guide.md b/docs/guide/scala_guide.md
index 93502af..7527029 100644
--- a/docs/guide/scala_guide.md
+++ b/docs/guide/scala_guide.md
@@ -16,7 +16,7 @@ Scala 2 and 3 are both supported.
 
 ## Install
 ```sbt
-libraryDependencies += "org.apache.fury" % "fury-core" % "0.4.1"
+libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
 ```
 
 ## Fury creation


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: chore: bump dev version to 0.6.0 (#1599)

2024-05-05 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new cda79dc7 chore: bump dev version to 0.6.0 (#1599)
cda79dc7 is described below

commit cda79dc78708ce4e24f6082b794996a91af31674
Author: Shawn Yang 
AuthorDate: Sun May 5 16:30:56 2024 +0800

chore: bump dev version to 0.6.0 (#1599)

## What does this PR do?
bump dev version to 0.6.0


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 README.md | 16 
 docs/guide/scala_guide.md |  2 +-
 integration_tests/graalvm_tests/pom.xml   |  2 +-
 integration_tests/jdk_compatibility_tests/pom.xml |  2 +-
 integration_tests/jpms_tests/pom.xml  |  2 +-
 integration_tests/latest_jdk_tests/pom.xml|  2 +-
 java/benchmark/pom.xml|  2 +-
 java/fury-core/pom.xml|  2 +-
 java/fury-format/pom.xml  |  2 +-
 java/fury-test-core/pom.xml   |  2 +-
 java/fury-testsuite/pom.xml   |  2 +-
 java/pom.xml  |  2 +-
 javascript/packages/fury/package.json |  2 +-
 javascript/packages/hps/package.json  |  2 +-
 python/pyfury/__init__.py |  2 +-
 rust/Cargo.toml   |  2 +-
 scala/build.sbt   |  2 +-
 17 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/README.md b/README.md
index 6b8fe19a..3076eafa 100644
--- a/README.md
+++ b/README.md
@@ -5,7 +5,7 @@
 [![Build 
Status](https://img.shields.io/github/actions/workflow/status/apache/incubator-fury/ci.yml?branch=main=for-the-badge=GITHUB%20ACTIONS=github)](https://github.com/apache/incubator-fury/actions/workflows/ci.yml)
 [![Slack 
Channel](https://img.shields.io/badge/slack-join-3f0e40?logo=slack=for-the-badge)](https://join.slack.com/t/fury-project/shared_invite/zt-1u8soj4qc-ieYEu7ciHOqA2mo47llS8A)
 
[![Twitter](https://img.shields.io/badge/@ApacheFury-follow-blue?logo=twitter=for-the-badge)](https://twitter.com/ApacheFury)
-[![Maven 
Version](https://img.shields.io/maven-central/v/org.furyio/fury-core?style=for-the-badge)](https://search.maven.org/#search|gav|1|g:"org.furyio"%20AND%20a:"fury-core")
+[![Maven 
Version](https://img.shields.io/maven-central/v/org.apache.fury/fury-core?style=for-the-badge)](https://search.maven.org/#search|gav|1|g:"org.apache.fury"%20AND%20a:"fury-core")
 
 
 **Apache Fury (incubating)** is a blazingly-fast multi-language serialization 
framework powered by **JIT** (just-in-time compilation) and **zero-copy**, 
providing up to 170x performance and ultimate ease of use.
@@ -96,28 +96,28 @@ Nightly snapshot:
 
   org.apache.fury
   fury-core
-  0.5.0-SNAPSHOT
+  0.6.0-SNAPSHOT
 
 
 
 ```
 
 Release version:
 ```xml
 
-  org.furyio
+  org.apache.fury
   fury-core
-  0.4.1
+  0.5.0
 
 
 
 ```
 
@@ -125,7 +125,7 @@ Maven groupId will be changed to `org.apache.fury` when 
next version is released
 
 ### Scala
 ```sbt
-libraryDependencies += "org.furyio" % "fury-core" % "0.4.1"
+libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
 ```
 
 ### Python
diff --git a/docs/guide/scala_guide.md b/docs/guide/scala_guide.md
index 93502afa..7527029c 100644
--- a/docs/guide/scala_guide.md
+++ b/docs/guide/scala_guide.md
@@ -16,7 +16,7 @@ Scala 2 and 3 are both supported.
 
 ## Install
 ```sbt
-libraryDependencies += "org.apache.fury" % "fury-core" % "0.4.1"
+libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"
 ```
 
 ## Fury creation
diff --git a/integration_tests/graalvm_tests/pom.xml 
b/integration_tests/graalvm_tests/pom.xml
index 92f7dc2a..d3f952c2 100644
--- a/integration_tests/graalvm_tests/pom.xml
+++ b/integration_tests/graalvm_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.6.0-SNAPSHOT
 ../../java
   
   4.0.0
diff --git a/integration_tests/jdk_compatibility_tests/pom.xml 
b/integration_tests/jdk_compatibility_tests/pom.xml
index 33a42d80..f6af0074 100644
--- a/integration_tests/jdk_compatibility_tests/pom.xml
+++ b/integration_tests/jdk_compatibility_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.6.0-SNAPSHOT
 ../../java
   
   4.0.0
diff --git a/integration_tests/jpms_tests/pom.xml 
b/integration_tests/jpms_tests/pom.xml

(incubator-fury) branch make_enum_serializer_as_an_upperlevel_class deleted (was 18017ca6)

2024-05-05 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to branch 
make_enum_serializer_as_an_upperlevel_class
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


 was 18017ca6 make enum serializer as an upper level class

The revisions that were on this branch are still contained in
other references; therefore, this change does not discard any commits
from the repository.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: chore(java): make enum serializer as an upper level class (#1598)

2024-05-05 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new aa070b98 chore(java): make enum serializer as an upper level class 
(#1598)
aa070b98 is described below

commit aa070b98c41903371ac908d6c4219f55bfcb9cdb
Author: Shawn Yang 
AuthorDate: Sun May 5 15:42:50 2024 +0800

chore(java): make enum serializer as an upper level class (#1598)

## What does this PR do?

Enum is a core concept in fury serialization, and we will have more
specific optimization on this type.

This make enum serializer as an upper level class, so we can make all
enum releated code more cohesive

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../fury/builder/BaseObjectCodecBuilder.java   |  4 +-
 .../org/apache/fury/resolver/ClassResolver.java|  5 +-
 .../org/apache/fury/serializer/EnumSerializer.java | 53 +
 .../org/apache/fury/serializer/Serializers.java| 29 -
 .../src/test/java/org/apache/fury/FuryTest.java| 18 +++---
 .../apache/fury/serializer/EnumSerializerTest.java | 69 ++
 .../apache/fury/serializer/SerializersTest.java| 33 ---
 7 files changed, 136 insertions(+), 75 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
index 4dd315d2..5cce3228 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
@@ -87,10 +87,10 @@ import org.apache.fury.resolver.ClassInfoHolder;
 import org.apache.fury.resolver.ClassResolver;
 import org.apache.fury.resolver.RefResolver;
 import org.apache.fury.serializer.CompatibleSerializer;
+import org.apache.fury.serializer.EnumSerializer;
 import org.apache.fury.serializer.ObjectSerializer;
 import org.apache.fury.serializer.PrimitiveSerializers.LongSerializer;
 import org.apache.fury.serializer.Serializer;
-import org.apache.fury.serializer.Serializers;
 import org.apache.fury.serializer.StringSerializer;
 import org.apache.fury.serializer.collection.AbstractCollectionSerializer;
 import org.apache.fury.serializer.collection.AbstractMapSerializer;
@@ -280,7 +280,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 Fury.class, MemoryBuffer.class, fury.getRefResolver().getClass(), 
Platform.class);
 ctx.addImports(ClassInfo.class, ClassInfoHolder.class, 
ClassResolver.class);
 ctx.addImport(Generated.class);
-ctx.addImports(LazyInitBeanSerializer.class, 
Serializers.EnumSerializer.class);
+ctx.addImports(LazyInitBeanSerializer.class, EnumSerializer.class);
 ctx.addImports(Serializer.class, StringSerializer.class);
 ctx.addImports(ObjectSerializer.class, CompatibleSerializer.class);
 ctx.addImports(AbstractCollectionSerializer.class, 
AbstractMapSerializer.class);
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java 
b/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
index a5e542d4..30ec3b9b 100644
--- a/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
+++ b/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
@@ -107,6 +107,7 @@ import 
org.apache.fury.serializer.ArraySerializers.UnexistedEnumArrayClassSerial
 import org.apache.fury.serializer.BufferSerializers;
 import org.apache.fury.serializer.CodegenSerializer.LazyInitBeanSerializer;
 import org.apache.fury.serializer.CompatibleSerializer;
+import org.apache.fury.serializer.EnumSerializer;
 import org.apache.fury.serializer.ExternalizableSerializer;
 import org.apache.fury.serializer.JavaSerializer;
 import org.apache.fury.serializer.JdkProxySerializer;
@@ -807,10 +808,10 @@ public class ClassResolver {
   return classInfo.serializer.getClass();
 } else {
   if (cls.isEnum()) {
-return Serializers.EnumSerializer.class;
+return EnumSerializer.class;
   } else if (Enum.class.isAssignableFrom(cls) && cls != Enum.class) {
 // handles an enum value that is an inner class. Eg: enum A {b{}};
-return Serializers.EnumSerializer.class;
+return EnumSerializer.class;
   } else if (EnumSet.class.isAssignableFrom(cls)) {
 return CollectionSerializers.EnumSetSerializer.class;
   } else if (Charset.class.isAssignableFrom(cls)) {
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java 
b/j

(incubator-fury-site) branch main updated: fix download link (#117)

2024-05-03 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 08f5c3c  fix download link (#117)
08f5c3c is described below

commit 08f5c3ca8baf1bbabb0e7c40672ae8d462d86dd6
Author: Shawn Yang 
AuthorDate: Sat May 4 10:30:40 2024 +0800

fix download link (#117)
---
 docs/start/install.md   | 2 +-
 docusaurus.config.ts| 4 +---
 {docs => src/pages}/download.md | 8 +++-
 3 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/docs/start/install.md b/docs/start/install.md
index 640709f..84d4002 100644
--- a/docs/start/install.md
+++ b/docs/start/install.md
@@ -6,7 +6,7 @@ sidebar_position: 0
 
 The official Apache Fury releases are provided as source artifacts.
 
-For source download, please see Fury [download](/docs/download/) page.
+For source download, please see Fury [download](/download/) page.
 
 ### Java
 To add a dependency on Fury using Maven, use the following:
diff --git a/docusaurus.config.ts b/docusaurus.config.ts
index 28daa95..8faf6a5 100644
--- a/docusaurus.config.ts
+++ b/docusaurus.config.ts
@@ -85,10 +85,8 @@ const config: Config = {
   label: 'Specification',
 },
 {
-  type: 'doc',
-  docId: 'download',
   position: 'right',
-  to: 'docs/download',
+  to: 'download',
   label: 'Download',
 },
 {to: '/blog', label: 'Blog', position: 'right'},
diff --git a/docs/download.md b/src/pages/download.md
similarity index 76%
rename from docs/download.md
rename to src/pages/download.md
index 806d39d..3e740d5 100644
--- a/docs/download.md
+++ b/src/pages/download.md
@@ -3,13 +3,19 @@ id: download
 title: Apache Fury(incubating) Download
 ---
 
+# Download
+
 The official Apache Fury releases are provided as source artifacts.
 
 For binary install, please see Fury [install](/docs/start/install/) document.
 
 ## The latest release 
 
-The latest source release is 
[0.5.0](https://www.apache.org/dyn/closer.lua/incubator/fury/0.5.0/apache-fury-0.5.0-incubating-src.tar.gz?action=download)
 
([asc](https://downloads.apache.org/incubator/fury/0.5.0/apache-fury-0.5.0-incubating-src.tar.gz.asc),
 
[sha512](https://downloads.apache.org/incubator/fury/0.5.0/apache-fury-0.5.0-incubating-src.tar.gz.sha512)).
+The latest source release is 0.5.0:
+
+| Version | Date | Source | Release Notes |
+|-|||---|
+| 0.5.0   |2024-05-03  | 
[apache-fury-0.5.0-incubating-src.tar.gz](https://www.apache.org/dyn/closer.lua/incubator/fury/0.5.0/apache-fury-0.5.0-incubating-src.tar.gz?action=download)
 
([asc](https://downloads.apache.org/incubator/fury/0.5.0/apache-fury-0.5.0-incubating-src.tar.gz.asc),
 
[sha512](https://downloads.apache.org/incubator/fury/0.5.0/apache-fury-0.5.0-incubating-src.tar.gz.sha512))
 | [release 
notes](https://github.com/apache/incubator-fury/releases/tag/v0.5.0) |
 
 
 ## All archived releases


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) tag v0.5.0 created (now 51beb134)

2024-05-03 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to tag v0.5.0
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 51beb134 (commit)
No new revisions were added by this update.


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



svn commit: r68935 - /dev/incubator/fury/0.5.0-rc4/ /release/incubator/fury/0.5.0/

2024-05-03 Thread chaokunyang
Author: chaokunyang
Date: Fri May  3 15:20:38 2024
New Revision: 68935

Log:
Release fury 0.5.0

Added:
release/incubator/fury/0.5.0/
  - copied from r68934, dev/incubator/fury/0.5.0-rc4/
Removed:
dev/incubator/fury/0.5.0-rc4/


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) 01/01: make enum serializer as an upper level class

2024-05-03 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to branch 
make_enum_serializer_as_an_upperlevel_class
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git

commit 18017ca6204418de896dc17d43b43f34cfc4e9ce
Author: chaokunyang 
AuthorDate: Fri May 3 14:23:50 2024 +0800

make enum serializer as an upper level class
---
 .../fury/builder/BaseObjectCodecBuilder.java   |  4 +-
 .../org/apache/fury/resolver/ClassResolver.java|  5 +-
 .../org/apache/fury/serializer/EnumSerializer.java | 53 +
 .../org/apache/fury/serializer/Serializers.java| 29 -
 .../src/test/java/org/apache/fury/FuryTest.java| 18 +++---
 .../apache/fury/serializer/EnumSerializerTest.java | 69 ++
 .../apache/fury/serializer/SerializersTest.java| 33 ---
 7 files changed, 136 insertions(+), 75 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
index 4dd315d2..5cce3228 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
@@ -87,10 +87,10 @@ import org.apache.fury.resolver.ClassInfoHolder;
 import org.apache.fury.resolver.ClassResolver;
 import org.apache.fury.resolver.RefResolver;
 import org.apache.fury.serializer.CompatibleSerializer;
+import org.apache.fury.serializer.EnumSerializer;
 import org.apache.fury.serializer.ObjectSerializer;
 import org.apache.fury.serializer.PrimitiveSerializers.LongSerializer;
 import org.apache.fury.serializer.Serializer;
-import org.apache.fury.serializer.Serializers;
 import org.apache.fury.serializer.StringSerializer;
 import org.apache.fury.serializer.collection.AbstractCollectionSerializer;
 import org.apache.fury.serializer.collection.AbstractMapSerializer;
@@ -280,7 +280,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 Fury.class, MemoryBuffer.class, fury.getRefResolver().getClass(), 
Platform.class);
 ctx.addImports(ClassInfo.class, ClassInfoHolder.class, 
ClassResolver.class);
 ctx.addImport(Generated.class);
-ctx.addImports(LazyInitBeanSerializer.class, 
Serializers.EnumSerializer.class);
+ctx.addImports(LazyInitBeanSerializer.class, EnumSerializer.class);
 ctx.addImports(Serializer.class, StringSerializer.class);
 ctx.addImports(ObjectSerializer.class, CompatibleSerializer.class);
 ctx.addImports(AbstractCollectionSerializer.class, 
AbstractMapSerializer.class);
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java 
b/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
index 7e45b1a0..e0d596ff 100644
--- a/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
+++ b/java/fury-core/src/main/java/org/apache/fury/resolver/ClassResolver.java
@@ -107,6 +107,7 @@ import 
org.apache.fury.serializer.ArraySerializers.UnexistedEnumArrayClassSerial
 import org.apache.fury.serializer.BufferSerializers;
 import org.apache.fury.serializer.CodegenSerializer.LazyInitBeanSerializer;
 import org.apache.fury.serializer.CompatibleSerializer;
+import org.apache.fury.serializer.EnumSerializer;
 import org.apache.fury.serializer.ExternalizableSerializer;
 import org.apache.fury.serializer.JavaSerializer;
 import org.apache.fury.serializer.JdkProxySerializer;
@@ -805,10 +806,10 @@ public class ClassResolver {
   return classInfo.serializer.getClass();
 } else {
   if (cls.isEnum()) {
-return Serializers.EnumSerializer.class;
+return EnumSerializer.class;
   } else if (Enum.class.isAssignableFrom(cls) && cls != Enum.class) {
 // handles an enum value that is an inner class. Eg: enum A {b{}};
-return Serializers.EnumSerializer.class;
+return EnumSerializer.class;
   } else if (EnumSet.class.isAssignableFrom(cls)) {
 return CollectionSerializers.EnumSetSerializer.class;
   } else if (Charset.class.isAssignableFrom(cls)) {
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java 
b/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
new file mode 100644
index ..634fffbe
--- /dev/null
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/EnumSerializer.java
@@ -0,0 +1,53 @@
+/*
+ * 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/li

(incubator-fury) branch make_enum_serializer_as_an_upperlevel_class created (now 18017ca6)

2024-05-03 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a change to branch 
make_enum_serializer_as_an_upperlevel_class
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git


  at 18017ca6 make enum serializer as an upper level class

This branch includes the following new commits:

 new 18017ca6 make enum serializer as an upper level class

The 1 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.



-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: fix(java): fix getClassDef thead safety (#1597)

2024-05-03 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 48361cb7 fix(java): fix getClassDef thead safety (#1597)
48361cb7 is described below

commit 48361cb7b7c13e703f0d5e1a10d5d104c9cd78a2
Author: Shawn Yang 
AuthorDate: Fri May 3 14:05:42 2024 +0800

fix(java): fix getClassDef thead safety (#1597)

## What does this PR do?

Fix ci failuure introduced in #1556 :


![image](https://github.com/apache/incubator-fury/assets/12445254/5977b4ca-07b9-456b-82d8-a2779a08d01f)


## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../java/org/apache/fury/builder/BaseObjectCodecBuilder.java  | 11 ---
 .../java/org/apache/fury/builder/CompatibleCodecBuilder.java  |  9 ++---
 .../main/java/org/apache/fury/builder/ObjectCodecBuilder.java |  9 ++---
 .../src/main/java/org/apache/fury/meta/ClassDef.java  |  8 
 .../src/main/java/org/apache/fury/resolver/ClassResolver.java |  2 +-
 .../java/org/apache/fury/serializer/MetaSharedSerializer.java |  9 -
 6 files changed, 21 insertions(+), 27 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
index d0112d0c..4dd315d2 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/BaseObjectCodecBuilder.java
@@ -189,7 +189,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 
   protected abstract String codecSuffix();
 
-   T visitFury(Function function) {
+  protected  T visitFury(Function function) {
 return fury.getJITContext().asyncVisitFury(function);
   }
 
@@ -441,8 +441,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
   classInfo,
   inlineInvoke(classResolverRef, "getClassInfo", 
classInfoTypeRef, clsExpr;
 }
-writeClassAndObject.add(
-fury.getClassResolver().writeClassExpr(classResolverRef, buffer, 
classInfo));
+writeClassAndObject.add(classResolver.writeClassExpr(classResolverRef, 
buffer, classInfo));
 writeClassAndObject.add(
 new Invoke(
 inlineInvoke(classInfo, "getSerializer", SERIALIZER_TYPE),
@@ -659,8 +658,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 new Assign(
 classInfo,
 inlineInvoke(classResolverRef, "getClassInfo", 
classInfoTypeRef, clsExpr;
-writeClassAction.add(
-fury.getClassResolver().writeClassExpr(classResolverRef, buffer, 
classInfo));
+writeClassAction.add(classResolver.writeClassExpr(classResolverRef, 
buffer, classInfo));
 serializer = new Invoke(classInfo, "getSerializer", "serializer", 
SERIALIZER_TYPE, false);
 serializer = new Cast(serializer, 
TypeRef.of(AbstractCollectionSerializer.class));
 writeClassAction.add(serializer, new Return(serializer));
@@ -965,8 +963,7 @@ public abstract class BaseObjectCodecBuilder extends 
CodecBuilder {
 classInfo,
 inlineInvoke(classResolverRef, "getClassInfo", 
classInfoTypeRef, clsExpr;
 // Note: writeClassExpr is thread safe.
-writeClassAction.add(
-fury.getClassResolver().writeClassExpr(classResolverRef, buffer, 
classInfo));
+writeClassAction.add(classResolver.writeClassExpr(classResolverRef, 
buffer, classInfo));
 serializer = new Invoke(classInfo, "getSerializer", "serializer", 
SERIALIZER_TYPE, false);
 serializer = new Cast(serializer, 
TypeRef.of(AbstractMapSerializer.class));
 writeClassAction.add(serializer, new Return(serializer));
diff --git 
a/java/fury-core/src/main/java/org/apache/fury/builder/CompatibleCodecBuilder.java
 
b/java/fury-core/src/main/java/org/apache/fury/builder/CompatibleCodecBuilder.java
index 445a425e..92c79527 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/builder/CompatibleCodecBuilder.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/builder/CompatibleCodecBuilder.java
@@ -41,7 +41,6 @@ import java.util.HashMap;
 import java.util.LinkedHashSet;
 import java.util.List;
 import java.util.Map;
-import java.util.stream.Collectors;
 import org.apache.fury.Fury;
 import org.apache.fury.builder.Generated.GeneratedCompatibleSerializer;
 import org.apache.fury.codege

(incubator-fury-site) branch main updated:  synced local 'docs/specification/' with remote 'docs/specification/'

2024-05-02 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new a8b9d0a   synced local 'docs/specification/' with remote 
'docs/specification/'
a8b9d0a is described below

commit a8b9d0a443f8704b62926215382126ad432f7132
Author: chaokunyang 
AuthorDate: Thu May 2 16:03:41 2024 +

 synced local 'docs/specification/' with remote 'docs/specification/'
---
 docs/specification/java_serialization_spec.md | 51 +++
 1 file changed, 28 insertions(+), 23 deletions(-)

diff --git a/docs/specification/java_serialization_spec.md 
b/docs/specification/java_serialization_spec.md
index 38dd532..813f5a6 100644
--- a/docs/specification/java_serialization_spec.md
+++ b/docs/specification/java_serialization_spec.md
@@ -112,9 +112,9 @@ For Schema consistent mode, class will be encoded as an 
enumerated string by ful
 the meta layout for schema evolution mode:
 
 ```
-|  8 bytes meta header  |   variable bytes   |  variable bytes   | 
variable bytes |
-+---++---++
-| 7 bytes hash + 1 bytes header | current class meta | parent class meta | 
 ...   |
+|  8 bytes meta header  | meta size |   variable bytes   |  variable 
bytes   | variable bytes |
++---+---|+---++
+| 7 bytes hash + 1 bytes header | 1~2 bytes | current class meta | parent 
class meta |  ...   |
 ```
 
 Class meta are encoded from parent class to leaf class, only class with 
serializable fields will be encoded.
@@ -128,8 +128,14 @@ Meta header is a 64 bits number value encoded in little 
endian order.
   class doesn't have fields to serialize, or we're in a context which 
serialize fields of current class
   only( `ObjectStreamSerializer#SlotInfo` is an example), num classes will be 
1.
 - 5rd bit is used to indicate whether this class needs schema evolution.
+- 6rd bit is used to indicate whether the size sum of all layers meta is less 
than 256.
 - Other 56 bits is used to store the unique hash of `flags + all layers class 
meta`.
 
+### Meta size
+
+- If the size sum of all layers meta is less than 256, then one byte is 
written next to indicate the length of meta.
+- Otherwise, write size as two bytes in little endian.
+
 ### Single layer class meta
 
 ```
@@ -150,34 +156,33 @@ Meta header is a 64 bits number value encoded in little 
endian order.
   fields info of those fields which aren't annotated by tag id for 
deserializing schema consistent fields, then use
   fields info in meta for deserializing compatible fields.
 - Package name encoding(omitted when class is registered):
-- Header:
-- If meta string encoding is `LOWER_SPECIAL` and the length of encoded 
string `<=` 128, then header will be
-  `7 bits size + flag(set)`.
-  Otherwise, header will be `4 bits unset + 3 bits encoding flags + 
flag(unset)`
-- Package name:
-- If bit flag is set, then package name will be encoded meta string 
binary.
-- Otherwise, it will be `| unsigned varint length | encoded meta 
string binary |`
-- Class name encoding(omitted when class is registered)::
-- header:
-- If meta string encoding is in 
`LOWER_SPECIAL~LOWER_UPPER_DIGIT_SPECIAL (0~3)`, and the length of encoded
-  string `<=` 32, then the header will be `5 bits size + 2 bits 
encoding flags + flag(set)`.
-- Otherwise, header will be `| unsigned varint length | encoded meta 
string binary |`
+- encoding algorithm: `UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL`
+- Header: `6 bits size | 2 bits encoding flags`. The `6 bits size: 0~63`  
will be used to indicate size `0~62`,
+  the value `63` the size need more byte to read, the encoding will encode 
`size - 62` as a varint next.
+- Class name encoding(omitted when class is registered):
+- encoding algorithm: 
`UTF8/LOWER_UPPER_DIGIT_SPECIAL/FIRST_TO_LOWER_SPECIAL/ALL_TO_LOWER_SPECIAL`
+- header: `6 bits size | 2 bits encoding flags`. The `6 bits size: 0~63`  
will be used to indicate size `1~64`,
+  the value `63` the size need more byte to read, the encoding will encode 
`size - 63` as a varint next.
 - Field info:
 - header(8
-  bits): `reserved 1 bit + 3 bits field name encoding + polymorphism flag 
+ nullability flag + ref tracking flag + tag id flag`.
+  bits): `3 bits size + 2 bits field name encoding + polymorphism flag + 
nullability flag + ref tracking flag`.
   Users can use annotation to provide those info.
-- tag id: when set to 1, field name will be written by an unsigned 
varint tag id.
-- ref tracking: when set to 0, ref tracking will be disabled for this 

(incubator-fury) branch main updated: feat(java): type meta encoding for java (#1556)

2024-05-02 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new 63bbe45d feat(java): type meta encoding for java (#1556)
63bbe45d is described below

commit 63bbe45d863eed0d56e3d08c35e7e007463b7420
Author: Shawn Yang 
AuthorDate: Fri May 3 00:03:22 2024 +0800

feat(java): type meta encoding for java (#1556)

## What does this PR do?

This PR implements type meta encoding for java proposed in #1240 .

The type meta encoding in xlang spec proposed in #1413 will be finished
in another PR based on this PR.

The spec has been updated too:

type meta header
```
|  8 bytes meta header  | meta size |   variable bytes   |  
variable bytes   | variable bytes |

+---+---|+---++
| 7 bytes hash + 1 bytes header | 1~2 bytes | current class meta | parent 
class meta |  ...   |
```

And the encoding for packge/class/field name has been updated to:
```
- Package name encoding(omitted when class is registered):
- encoding algorithm: 
`UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL`
- Header: `6 bits size | 2 bits encoding flags`. The `6 bits size: 
0~63`  will be used to indicate size `0~62`,
  the value `63` the size need more byte to read, the encoding will 
encode `size - 62` as a varint next.
- Class name encoding(omitted when class is registered):
- encoding algorithm: 
`UTF8/LOWER_UPPER_DIGIT_SPECIAL/FIRST_TO_LOWER_SPECIAL/ALL_TO_LOWER_SPECIAL`
- header: `6 bits size | 2 bits encoding flags`. The `6 bits size: 
0~63`  will be used to indicate size `1~64`,
  the value `63` the size need more byte to read, the encoding will 
encode `size - 63` as a varint next.
- Field info:
- header(8
  bits): `3 bits size + 2 bits field name encoding + polymorphism flag 
+ nullability flag + ref tracking flag`.
  Users can use annotation to provide those info.
- 2 bits field name encoding:
- encoding: 
`UTF8/ALL_TO_LOWER_SPECIAL/LOWER_UPPER_DIGIT_SPECIAL/TAG_ID`
- If tag id is used, i.e. field name is written by an unsigned 
varint tag id. 2 bits encoding will be `11`.
- size of field name:
- The `3 bits size: 0~7`  will be used to indicate length 
`1~7`, the value `6` the size read more bytes,
  the encoding will encode `size - 7` as a varint next.
- If encoding is `TAG_ID`, then num_bytes of field name will be 
used to store tag id.
- Field name: If type id is set, type id will be used instead. 
Otherwise meta string encoding length and data will
  be written instead.
```

## Meta size
Before this PR:
```java
class org.apache.fury.benchmark.data.MediaContent 78
class org.apache.fury.benchmark.data.Media 208
class org.apache.fury.benchmark.data.Image 114
```

With this PR:
```java
class org.apache.fury.benchmark.data.MediaContent 53
class org.apache.fury.benchmark.data.Media 114
class org.apache.fury.benchmark.data.Image 68
```

The size of class meta reduced by half, which is a great gain.

The size can be reduded more if we introduce field name hash, but it's
not related to this PR. We can discuss it in another PR.

## Related issues

#1240
#203
#202


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 docs/specification/java_serialization_spec.md  |  51 ++--
 .../fury/builder/MetaSharedCodecBuilder.java   |   6 +-
 .../apache/fury/builder/ObjectCodecBuilder.java|  17 +-
 .../main/java/org/apache/fury/meta/ClassDef.java   | 286 +--
 .../java/org/apache/fury/meta/ClassDefDecoder.java | 162 +++
 .../java/org/apache/fury/meta/ClassDefEncoder.java | 303 +
 .../main/java/org/apache/fury/meta/Encoders.java   |  74 +
 .../org/apache/fury/meta/MetaStringEncoder.java|  49 ++--
 .../org/apache/fury/reflect/ReflectionUtils.java   |  43 ++-
 .../java/org/apache/fury/resolver/ClassInfo.java   |   4 +-
 .../org/apache/fury/resolver/ClassResolver.java|  73 -
 .../org/apache/fury/resolver/MetaStringBytes.java  |  12 +-
 .../fury/serializer/MetaSharedSerializer.java  |  32 +--
 .../apache/fury/serializer/ObjectSerializer.java   |  20 +-
 .../apache/fury/serializer/StringSerializer.java   |   2 +-
 .../fury/serializer/UnexistedClassSerializers.java |   6 +-
 .../main/java/org/apache/fury/type

(incubator-fury) branch main updated: perf(java): Reduce performance regression caused by deleteCharAt (#1591)

2024-04-29 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new f218c918 perf(java): Reduce performance regression caused by 
deleteCharAt (#1591)
f218c918 is described below

commit f218c9189f0700621d7f4fcf78e332bffe71b6a7
Author: LiangliangSui <116876207+liangliang...@users.noreply.github.com>
AuthorDate: Mon Apr 29 18:39:07 2024 +0800

perf(java): Reduce performance regression caused by deleteCharAt (#1591)



## What does this PR do?


This PR reduces the performance regression caused by
StringBuilder#deleteCharAt, avoids using deleteCharAt, and makes early
judgments in while.

## Related issues




## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


before this PR


![image](https://github.com/apache/incubator-fury/assets/116876207/8f0b9429-c6c7-467b-8551-115a92355be0)


with this pr


![image](https://github.com/apache/incubator-fury/assets/116876207/19ff5fd2-044c-493e-8775-756da74feef5)

Signed-off-by: LiangliangSui 
---
 .../src/main/java/org/apache/fury/meta/MetaStringDecoder.java  | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringDecoder.java 
b/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringDecoder.java
index 85df1086..1852b3b2 100644
--- a/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringDecoder.java
+++ b/java/fury-core/src/main/java/org/apache/fury/meta/MetaStringDecoder.java
@@ -74,7 +74,7 @@ public class MetaStringDecoder {
 boolean stripLastChar = (data[0] & 0x80) != 0; // Check the first bit of 
the first byte
 int bitMask = 0b1; // 5 bits for the mask
 int bitIndex = 1; // Start from the second bit
-while (bitIndex + 5 <= totalBits) {
+while (bitIndex + 5 <= totalBits && !(stripLastChar && (bitIndex + 2 * 5 > 
totalBits))) {
   int byteIndex = bitIndex / 8;
   int intraByteIndex = bitIndex % 8;
   // Extract the 5-bit character value across byte boundaries if needed
@@ -90,9 +90,6 @@ public class MetaStringDecoder {
   bitIndex += 5;
   decoded.append(decodeLowerSpecialChar(charValue));
 }
-if (stripLastChar) {
-  decoded.deleteCharAt(decoded.length() - 1);
-}
 return decoded.toString();
   }
 
@@ -103,7 +100,7 @@ public class MetaStringDecoder {
 boolean stripLastChar = (data[0] & 0x80) != 0; // Check the first bit of 
the first byte
 int bitMask = 0b11; // 6 bits for mask
 int numBits = data.length * 8;
-while (bitIndex + 6 <= numBits) {
+while (bitIndex + 6 <= numBits && !(stripLastChar && (bitIndex + 2 * 6 > 
numBits))) {
   int byteIndex = bitIndex / 8;
   int intraByteIndex = bitIndex % 8;
 
@@ -120,9 +117,6 @@ public class MetaStringDecoder {
   bitIndex += 6;
   decoded.append(decodeLowerUpperDigitSpecialChar(charValue));
 }
-if (stripLastChar) {
-  decoded.deleteCharAt(decoded.length() - 1);
-}
 return decoded.toString();
   }
 


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury) branch main updated: fix(java): compatible low version guava(#1593) (#1594)

2024-04-28 Thread chaokunyang
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


The following commit(s) were added to refs/heads/main by this push:
 new b6f90241 fix(java): compatible low version guava(#1593) (#1594)
b6f90241 is described below

commit b6f90241450d66f273a48c53f564abd0b82d1bf6
Author: 李舒畅 
AuthorDate: Mon Apr 29 12:15:52 2024 +0800

fix(java): compatible low version guava(#1593) (#1594)



## What does this PR do?

compatible low version guava

## Related issues

- #1593


## Does this PR introduce any user-facing change?



- [ ] Does this PR introduce any public API change?
- [ ] Does this PR introduce any binary protocol compatibility change?


## Benchmark


---
 .../serializer/collection/GuavaCollectionSerializers.java | 11 ++-
 .../src/main/java/org/apache/fury/util/unsafe/_JDKAccess.java |  8 +++-
 2 files changed, 17 insertions(+), 2 deletions(-)

diff --git 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
index c7217ec6..b05b378c 100644
--- 
a/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
+++ 
b/java/fury-core/src/main/java/org/apache/fury/serializer/collection/GuavaCollectionSerializers.java
@@ -256,11 +256,20 @@ public class GuavaCollectionSerializers {
 protected Function computeValue(Class builderClass) {
   MethodHandles.Lookup lookup = 
_JDKAccess._trustedLookup(builderClass);
   MethodHandle ctr = null;
+  boolean lowVersionGuava = false;
   try {
 ctr =
 lookup.findConstructor(builderClass, 
MethodType.methodType(void.class, int.class));
   } catch (NoSuchMethodException | IllegalAccessException e) {
-Platform.throwException(e);
+try {
+  ctr = lookup.findConstructor(builderClass, 
MethodType.methodType(void.class));
+  lowVersionGuava = true;
+} catch (NoSuchMethodException | IllegalAccessException e2) {
+  Platform.throwException(e);
+}
+  }
+  if (lowVersionGuava) {
+return _JDKAccess.makeJDKFunction(lookup, ctr, 
MethodType.methodType(Object.class));
   }
   return _JDKAccess.makeJDKFunction(lookup, ctr);
 }
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 11e11af1..d10a9df1 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
@@ -126,13 +126,19 @@ public class _JDKAccess {
 
   @SuppressWarnings("unchecked")
   public static  Function makeJDKFunction(Lookup lookup, 
MethodHandle handle) {
+return makeJDKFunction(lookup, handle, jdkFunctionMethodType);
+  }
+
+  @SuppressWarnings("unchecked")
+  public static  Function makeJDKFunction(
+  Lookup lookup, MethodHandle handle, MethodType methodType) {
 try {
   CallSite callSite =
   LambdaMetafactory.metafactory(
   lookup,
   "apply",
   MethodType.methodType(Function.class),
-  jdkFunctionMethodType,
+  methodType,
   handle,
   boxedMethodType(handle.type()));
   return (Function) callSite.getTarget().invokeExact();


-
To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org
For additional commands, e-mail: commits-h...@fury.apache.org



(incubator-fury-site) branch main updated:  synced local 'docs/specification/' with remote 'docs/specification/'

2024-04-28 Thread chaokunyang
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-site.git


The following commit(s) were added to refs/heads/main by this push:
 new 90630ea   synced local 'docs/specification/' with remote 
'docs/specification/'
90630ea is described below

commit 90630ead7d3ba0bde3dca3cdc8b9db1dbba7b67d
Author: chaokunyang 
AuthorDate: Sun Apr 28 08:38:30 2024 +

 synced local 'docs/specification/' with remote 'docs/specification/'
---
 docs/specification/java_serialization_spec.md  | 26 ++
 docs/specification/xlang_serialization_spec.md | 22 +-
 2 files changed, 11 insertions(+), 37 deletions(-)

diff --git a/docs/specification/java_serialization_spec.md 
b/docs/specification/java_serialization_spec.md
index 242a141..38dd532 100644
--- a/docs/specification/java_serialization_spec.md
+++ b/docs/specification/java_serialization_spec.md
@@ -178,25 +178,8 @@ Meta header is a 64 bits number value encoded in little 
endian order.
   meta
   for such types is written separately instead of inlining here is to 
reduce meta space cost if object of this
   type is serialized in current object graph multiple times, and the 
field value may be null too.
-- Collection Type Info: collection type will have an extra byte for 
elements info.
-  Users can use annotation to provide those info.
-- elements type same
-- elements tracking ref
-- elements nullability
-- elements declared type
-- Map Type Info: map type will have an extra byte for kv items info.
-  Users can use annotation to provide those info.
-- keys type same
-- keys tracking ref
-- keys nullability
-- keys declared type
-- values type same
-- values tracking ref
-- values nullability
-- values declared type
 - Field name: If type id is set, type id will be used instead. Otherwise 
meta string encoding length and data will
-  be
-  written instead.
+  be written instead.
 
 Field order are left as implementation details, which is not exposed to 
specification, the deserialization need to
 resort fields based on Fury field comparator. In this way, fury can compute 
statistics for field names or types and
@@ -394,6 +377,9 @@ which will be encoded by elements header, each use one bit:
 By default, all bits are unset, which means all elements won't track ref, all 
elements are same type, not null and
 the actual element is the declared type in the custom class field.
 
+The implementation can generate different deserialization code based read 
header, and look up the generated code from a
+linear map/list.
+
  Elements data
 
 Based on the elements header, the serialization of elements data may skip `ref 
flag`/`null flag`/`element class info`.
@@ -469,8 +455,8 @@ format will be:
 |KV header   |   N*2 objects   |
 ```
 
-`KV header` will be a header marked by `MapFieldInfo` in java. For languages 
such as golang, this can be computed in
-advance for non-interface types in most times.
+`KV header` will be a header marked by `MapFieldInfo` in java. The 
implementation can generate different deserialization
+code based read header, and look up the generated code from a linear map/list.
 
 ### Enum
 
diff --git a/docs/specification/xlang_serialization_spec.md 
b/docs/specification/xlang_serialization_spec.md
index bbfdc76..0583e7e 100644
--- a/docs/specification/xlang_serialization_spec.md
+++ b/docs/specification/xlang_serialization_spec.md
@@ -303,22 +303,6 @@ Meta header is a 64 bits number value encoded in little 
endian order.
 - Otherwise it will be encoded as `OBJECT_ID` if it isn't `final` and 
`FINAL_OBJECT_ID` if it's `final`. The
   meta for such types is written separately instead of inlining here 
is to reduce meta space cost if object of
   this type is serialized in the current object graph multiple times, 
and the field value may be null too.
-- List Type Info: this type will have an extra byte for elements info.
-  Users can use annotation to provide that info.
-- elements type same
-- elements tracking ref
-- elements nullability
-- elements declared type
-- Map Type Info: this type will have an extra byte for kv items info.
-  Users can use annotation to provide that info.
-- keys type same
-- keys tracking ref
-- keys nullability
-- keys declared type
-- values type same
-- values tracking ref
-- values nullability
-- values declared type
 - Field name: If tag id is set, tag id will be used instead. Otherwise 
meta string encoding length and data will
   be written instead.
 
@@ -489,6 +473,9 @@ which will be encoded by elements header, each use one bit:
 By default, all bits

(incubator-fury) 01/01: prepare release for 0.5.0

2024-04-27 Thread chaokunyang
This is an automated email from the ASF dual-hosted git repository.

chaokunyang pushed a commit to tag v0.5.0-rc4
in repository https://gitbox.apache.org/repos/asf/incubator-fury.git

commit 51beb134f517917d572dd0cf2b21534d74ecc726
Author: chaokunyang 
AuthorDate: Sat Apr 27 14:42:41 2024 +0800

prepare release for 0.5.0
---
 .github/workflows/release.yaml| 4 ++--
 integration_tests/graalvm_tests/pom.xml   | 2 +-
 integration_tests/jdk_compatibility_tests/pom.xml | 2 +-
 integration_tests/jpms_tests/pom.xml  | 2 +-
 integration_tests/latest_jdk_tests/pom.xml| 2 +-
 java/benchmark/pom.xml| 2 +-
 java/fury-core/pom.xml| 2 +-
 java/fury-format/pom.xml  | 2 +-
 java/fury-test-core/pom.xml   | 2 +-
 java/fury-testsuite/pom.xml   | 2 +-
 java/pom.xml  | 2 +-
 javascript/packages/fury/package.json | 2 +-
 javascript/packages/hps/package.json  | 2 +-
 rust/Cargo.toml   | 2 +-
 scala/build.sbt   | 2 +-
 15 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml
index b1d5fd81..117922cc 100644
--- a/.github/workflows/release.yaml
+++ b/.github/workflows/release.yaml
@@ -20,7 +20,7 @@ name: Publish Fury
 on:
   push:
 tags:
-  - 'v*'
+  - 'disabled*'
 
 jobs:
   release-python:
@@ -43,7 +43,7 @@ jobs:
 run: ./ci/run_ci.sh install_bazel
   - name: Update version in setup.py
 run: |
-  echo "GITHUB_REF: $GITHUB_REF" 
+  echo "GITHUB_REF: $GITHUB_REF"
   tag=$(echo $GITHUB_REF | cut -d / -f 3)
   echo "tag: $tag"
   version=${tag:1}
diff --git a/integration_tests/graalvm_tests/pom.xml 
b/integration_tests/graalvm_tests/pom.xml
index 92f7dc2a..2daab138 100644
--- a/integration_tests/graalvm_tests/pom.xml
+++ b/integration_tests/graalvm_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.5.0
 ../../java
   
   4.0.0
diff --git a/integration_tests/jdk_compatibility_tests/pom.xml 
b/integration_tests/jdk_compatibility_tests/pom.xml
index 33a42d80..1ddcf182 100644
--- a/integration_tests/jdk_compatibility_tests/pom.xml
+++ b/integration_tests/jdk_compatibility_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.5.0
 ../../java
   
   4.0.0
diff --git a/integration_tests/jpms_tests/pom.xml 
b/integration_tests/jpms_tests/pom.xml
index 74e1e029..66d6e2b7 100644
--- a/integration_tests/jpms_tests/pom.xml
+++ b/integration_tests/jpms_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.5.0
 ../../java
   
   4.0.0
diff --git a/integration_tests/latest_jdk_tests/pom.xml 
b/integration_tests/latest_jdk_tests/pom.xml
index dca2a9ad..f70874b2 100644
--- a/integration_tests/latest_jdk_tests/pom.xml
+++ b/integration_tests/latest_jdk_tests/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.5.0
 ../../java
   
   4.0.0
diff --git a/java/benchmark/pom.xml b/java/benchmark/pom.xml
index 902171b7..a3bde199 100644
--- a/java/benchmark/pom.xml
+++ b/java/benchmark/pom.xml
@@ -26,7 +26,7 @@
   
 fury-parent
 org.apache.fury
-0.5.0-SNAPSHOT
+0.5.0
   
 
   benchmark
diff --git a/java/fury-core/pom.xml b/java/fury-core/pom.xml
index 8a164e74..79c9c5d8 100644
--- a/java/fury-core/pom.xml
+++ b/java/fury-core/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.5.0
   
   4.0.0
 
diff --git a/java/fury-format/pom.xml b/java/fury-format/pom.xml
index c39d76ec..671e3769 100644
--- a/java/fury-format/pom.xml
+++ b/java/fury-format/pom.xml
@@ -25,7 +25,7 @@
   
 org.apache.fury
 fury-parent
-0.5.0-SNAPSHOT
+0.5.0
   
   4.0.0
 
diff --git a/java/fury-test-core/pom.xml b/java/fury-test-core/pom.xml
index db081dbf..3ed7df43 100644
--- a/java/fury-test-core/pom.xml
+++ b/java/fury-test-core/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.5.0-SNAPSHOT
+0.5.0
   
   4.0.0
 
diff --git a/java/fury-testsuite/pom.xml b/java/fury-testsuite/pom.xml
index 112d6e1f..204c0de2 100644
--- a/java/fury-testsuite/pom.xml
+++ b/java/fury-testsuite/pom.xml
@@ -25,7 +25,7 @@
   
 fury-parent
 org.apache.fury
-0.5.0-SNAPSHOT
+0.5.0
   
   4.0.0
 
diff --git a/java/pom.xml b/java/pom.xml
index 883a050e..201fc0eb 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -33,7 +33,7 @@
   org.apache.fury
   fury-parent
   pom
-  0.5.0-SNAPSHOT
+  0.5.0
   Fury Project Parent POM
   
 Apache Fury™ is a blazingly fast multi-language serialization framework 
powered by jit and zero-copy.
diff --

  1   2   3   4   >