Re: [PR] feat(java): support user context for serialize global data(#1595) [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang commented on code in PR #1596:
URL: https://github.com/apache/incubator-fury/pull/1596#discussion_r1590580236


##
java/fury-core/src/main/java/org/apache/fury/resolver/UserContextResolver.java:
##
@@ -0,0 +1,40 @@
+/*
+ * 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.resolver;
+
+import org.apache.fury.Fury;
+import org.apache.fury.memory.MemoryBuffer;
+
+/** write/read user custom global data after metaContext data. */
+public abstract class UserContextResolver {
+
+  protected final Fury fury;
+
+  public UserContextResolver(Fury fury) {
+this.fury = fury;
+  }
+
+  public abstract void write(MemoryBuffer buffer);
+
+  public abstract void read(MemoryBuffer buffer);
+
+  /** write/read end should clear user data. */
+  public abstract void reset();

Review Comment:
   In meta share mode, we can write this context in a channel only once. If we 
reset it every time, does it means that we will write this every time?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
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): make slf4j provided (#1605)

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

suiliangliang 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 501c1dca fix(java): make slf4j provided (#1605)
501c1dca is described below

commit 501c1dca07360b7f603b5c055b44687f184ff6e4
Author: Shawn Yang 
AuthorDate: Mon May 6 14:03:18 2024 +0800

fix(java): make slf4j provided (#1605)

## What does this PR do?
Currently fury-core still carries slf4j dependency:


![image](https://github.com/apache/incubator-fury/assets/12445254/762798f3-ea0e-4c5d-b218-0286fd4817e9)


This PR make slf4j provided:
```
[INFO] --- maven-dependency-plugin:3.4.0:tree (default-cli) @ graalvm_tests 
---
[INFO] org.apache.fury:graalvm_tests:jar:0.6.0-SNAPSHOT
[INFO] \- org.apache.fury:fury-core:jar:0.6.0-SNAPSHOT:compile
[INFO]\- com.google.guava:guava:jar:32.1.2-jre:compile
[INFO]   +- com.google.guava:failureaccess:jar:1.0.1:compile
[INFO]   +- 
com.google.guava:listenablefuture:jar:.0-empty-to-avoid-conflict-with-guava:compile
[INFO]   +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
[INFO]   +- org.checkerframework:checker-qual:jar:3.33.0:compile
[INFO]   +- 
com.google.errorprone:error_prone_annotations:jar:2.18.0:compile
[INFO]   \- com.google.j2objc:j2objc-annotations:jar:2.8:compile
[INFO] 


```

## 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/fury-testsuite/pom.xml | 3 ++-
 java/pom.xml| 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/java/fury-testsuite/pom.xml b/java/fury-testsuite/pom.xml
index da322d80..c5d91898 100644
--- a/java/fury-testsuite/pom.xml
+++ b/java/fury-testsuite/pom.xml
@@ -43,6 +43,7 @@
 
   org.slf4j
   slf4j-api
+  compile
 
 
   org.testng
@@ -118,4 +119,4 @@
 
   
 
-
\ No newline at end of file
+
diff --git a/java/pom.xml b/java/pom.xml
index c338522c..3f7f7b5f 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -92,6 +92,7 @@
 org.slf4j
 slf4j-api
 2.0.12
+provided
 true
   
   


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



Re: [PR] fix(java): make slf4j provided [incubator-fury]

2024-05-05 Thread via GitHub


LiangliangSui merged PR #1605:
URL: https://github.com/apache/incubator-fury/pull/1605


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[PR] fix(java): make slf4j provided [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang opened a new pull request, #1605:
URL: https://github.com/apache/incubator-fury/pull/1605

   
   
   ## What does this PR do?
   
   make slf4j provided
   ```
   [INFO] --- maven-dependency-plugin:3.4.0:tree (default-cli) @ graalvm_tests 
---
   [INFO] org.apache.fury:graalvm_tests:jar:0.6.0-SNAPSHOT
   [INFO] \- org.apache.fury:fury-core:jar:0.6.0-SNAPSHOT:compile
   [INFO]\- com.google.guava:guava:jar:32.1.2-jre:compile
   [INFO]   +- com.google.guava:failureaccess:jar:1.0.1:compile
   [INFO]   +- 
com.google.guava:listenablefuture:jar:.0-empty-to-avoid-conflict-with-guava:compile
   [INFO]   +- com.google.code.findbugs:jsr305:jar:3.0.2:compile
   [INFO]   +- org.checkerframework:checker-qual:jar:3.33.0:compile
   [INFO]   +- 
com.google.errorprone:error_prone_annotations:jar:2.18.0:compile
   [INFO]   \- com.google.j2objc:j2objc-annotations:jar:2.8:compile
   [INFO] 

   
   ```
   
   ## 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
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[I] No type mapping from class java.lang.String to class java.lang.String [incubator-fury]

2024-05-05 Thread via GitHub


galaxyxym opened a new issue, #1604:
URL: https://github.com/apache/incubator-fury/issues/1604

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-fury/issues) and found no similar 
issues.
   
   
   ### Version
   
   fury: 0.5.0
   os: linux
   jdk: openjdk17
   
   ### Component(s)
   
   Java
   
   ### Minimal reproduce step
   
   use fury.serialize(output, obj); in dubbo spi
   
   ### What did you expect to see?
   
   serialize successfully
   
   ### What did you see instead?
   
   `
   at 
org.apache.fury.serializer.CodegenSerializer.loadCompatibleCodegenSerializer(CodegenSerializer.java:62)
at 
org.apache.fury.resolver.ClassResolver.lambda$getObjectSerializerClass$4(ClassResolver.java:967)
at 
org.apache.fury.builder.JITContext.registerSerializerJITCallback(JITContext.java:131)
at 
org.apache.fury.resolver.ClassResolver.getObjectSerializerClass(ClassResolver.java:962)
at 
org.apache.fury.resolver.ClassResolver.getSerializerClass(ClassResolver.java:885)
at 
org.apache.fury.resolver.ClassResolver.getSerializerClass(ClassResolver.java:782)
at 
org.apache.fury.resolver.ClassResolver.createSerializer(ClassResolver.java:1168)
at 
org.apache.fury.resolver.ClassResolver.getOrUpdateClassInfo(ClassResolver.java:1107)
at org.apache.fury.Fury.write(Fury.java:312)
at org.apache.fury.Fury.serialize(Fury.java:248)
at org.apache.fury.Fury.lambda$serialize$0(Fury.java:264)
at org.apache.fury.Fury.serializeToStream(Fury.java:1236)
at org.apache.fury.Fury.serialize(Fury.java:264)
   `
   
   `
   Caused by: java.lang.IllegalArgumentException: No type mapping from class 
java.lang.String to class java.lang.String
at 
org.apache.fury.reflect.TypeRef.populateTypeMappings(TypeRef.java:508)
at 
org.apache.fury.reflect.TypeRef.populateTypeMappings(TypeRef.java:499)
at org.apache.fury.reflect.TypeRef.getSubtype(TypeRef.java:458)
at org.apache.fury.type.TypeUtils.mapOf(TypeUtils.java:513)
at 
org.apache.fury.builder.CompatibleCodecBuilder.createDescriptor(CompatibleCodecBuilder.java:149)
at 
org.apache.fury.builder.CompatibleCodecBuilder.lambda$buildEncodeExpression$a78febb8$4(CompatibleCodecBuilder.java:265)
at 
org.apache.fury.codegen.ExpressionOptimizer.invokeGenerated(ExpressionOptimizer.java:49)
at 
org.apache.fury.builder.CompatibleCodecBuilder.lambda$buildEncodeExpression$4(CompatibleCodecBuilder.java:254)
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
at 
org.apache.fury.builder.CompatibleCodecBuilder.buildEncodeExpression(CompatibleCodecBuilder.java:251)
at 
org.apache.fury.builder.BaseObjectCodecBuilder.genCode(BaseObjectCodecBuilder.java:205)
at org.apache.fury.codegen.CompileUnit.getCode(CompileUnit.java:53)
at org.apache.fury.codegen.JaninoUtils.toBytecode(JaninoUtils.java:81)
at org.apache.fury.codegen.JaninoUtils.toBytecode(JaninoUtils.java:73)
at org.apache.fury.codegen.CodeGenerator.compile(CodeGenerator.java:145)
at 
org.apache.fury.builder.CodecUtils.loadOrGenCodecClass(CodecUtils.java:110)
at 
org.apache.fury.builder.CodecUtils.loadOrGenCompatibleCodecClass(CodecUtils.java:65)
at 
org.apache.fury.builder.CodecUtils.loadOrGenCompatibleCodecClass(CodecUtils.java:57)
at 
org.apache.fury.serializer.CodegenSerializer.loadCompatibleCodegenSerializer(CodegenSerializer.java:59)
... 37 more
   `
   
   ### Anything Else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[PR] feat(sepc): update type meta field info spec [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang opened a new pull request, #1603:
URL: https://github.com/apache/incubator-fury/pull/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
   
   
   
   
   ## 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
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



Re: [I] [Dart] Support Dart language [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang commented on issue #1194:
URL: 
https://github.com/apache/incubator-fury/issues/1194#issuecomment-2095094195

   I see, thanks. We've formulized fury cross-language serialization spec in 
https://fury.apache.org/docs/guide/xlang_object_graph_guide . It should be 
easier to implement a new language now.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
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: 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 Fix

Re: [PR] release blog for fury 0.5.0 [incubator-fury-site]

2024-05-05 Thread via GitHub


chaokunyang merged PR #118:
URL: https://github.com/apache/incubator-fury-site/pull/118


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


-
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): remove maven groupId change (#1602)

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

suiliangliang 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 dfa533bb fix(java): remove maven groupId change (#1602)
dfa533bb is described below

commit dfa533bbb5b771107daca59e215a3d7bc752b334
Author: Shawn Yang 
AuthorDate: Mon May 6 09:52:06 2024 +0800

fix(java): remove maven groupId change (#1602)

## What does this PR do?

remove maven groupId change

## 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, 2 deletions(-)

diff --git a/README.md b/README.md
index 3076eafa..01cb76dc 100644
--- a/README.md
+++ b/README.md
@@ -121,8 +121,6 @@ Release version:
  -->
 ```
 
-Maven groupId will be changed to `org.apache.fury` when next version is 
released.
-
 ### Scala
 ```sbt
 libraryDependencies += "org.apache.fury" % "fury-core" % "0.5.0"


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



Re: [PR] fix(java): remove maven groupId change [incubator-fury]

2024-05-05 Thread via GitHub


LiangliangSui merged PR #1602:
URL: https://github.com/apache/incubator-fury/pull/1602


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



Re: [I] [Dart] Support Dart language [incubator-fury]

2024-05-05 Thread via GitHub


anidotnet commented on issue #1194:
URL: 
https://github.com/apache/incubator-fury/issues/1194#issuecomment-2094891807

   Apart from json dart does not have very good options for serialization.. It 
would be nice to have fury support for dart as multi language serialization 
framework. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



Re: [PR] feat(java): support user context for serialize global data(#1595) [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang commented on code in PR #1596:
URL: https://github.com/apache/incubator-fury/pull/1596#discussion_r1590337369


##
java/fury-core/src/main/java/org/apache/fury/resolver/UserContextResolver.java:
##
@@ -0,0 +1,40 @@
+/*
+ * 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.resolver;
+
+import org.apache.fury.Fury;
+import org.apache.fury.memory.MemoryBuffer;
+
+/** write/read user custom global data after metaContext data. */
+public abstract class UserContextResolver {

Review Comment:
   How about naming it as `UserContext` just like `MetaContext`
   ```suggestion
   public abstract class UserContext {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[PR] release blog for fury 0.5.0 [incubator-fury-site]

2024-05-05 Thread via GitHub


chaokunyang opened a new pull request, #118:
URL: https://github.com/apache/incubator-fury-site/pull/118

   
![image](https://github.com/apache/incubator-fury-site/assets/12445254/ef9eb70c-755d-4d36-8ad2-93247ae19e3b)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[PR] fix(java): remove maven groupId change [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang opened a new pull request, #1602:
URL: https://github.com/apache/incubator-fury/pull/1602

   
   
   ## What does this PR do?
   
   remove maven groupId change
   
   ## 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
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



(incubator-fury-site) branch deploy updated: deploy: c17e939806fbd08b8671e77e1cd659272100613f

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

github-bot pushed a commit to branch deploy
in repository https://gitbox.apache.org/repos/asf/incubator-fury-site.git


The following commit(s) were added to refs/heads/deploy by this push:
 new 20216ea  deploy: c17e939806fbd08b8671e77e1cd659272100613f
20216ea is described below

commit 20216eab5e1d1a75e157d6c2f32dfe3dda628913
Author: chaokunyang 
AuthorDate: Sun May 5 08:32:17 2024 +

deploy: c17e939806fbd08b8671e77e1cd659272100613f
---
 404.html| 4 ++--
 assets/js/{adfc56cb.cd381916.js => adfc56cb.40c82aae.js}| 2 +-
 assets/js/{main.b890a8a2.js => main.39068f0a.js}| 4 ++--
 .../{main.b890a8a2.js.LICENSE.txt => main.39068f0a.js.LICENSE.txt}  | 0
 assets/js/{runtime~main.2552af59.js => runtime~main.d83912af.js}| 2 +-
 blog/archive/index.html | 4 ++--
 blog/fury_0_1_0_release/index.html  | 4 ++--
 blog/fury_0_1_1_release/index.html  | 4 ++--
 blog/fury_0_1_2_release/index.html  | 4 ++--
 blog/fury_0_2_0_release/index.html  | 4 ++--
 blog/fury_0_2_1_release/index.html  | 4 ++--
 blog/fury_0_3_0_release/index.html  | 4 ++--
 blog/fury_0_3_1_release/index.html  | 4 ++--
 blog/fury_0_4_0_release/index.html  | 4 ++--
 blog/fury_0_4_1_release/index.html  | 4 ++--
 .../index.html  | 4 ++--
 blog/index.html | 4 ++--
 blog/tags/fury/index.html   | 4 ++--
 blog/tags/index.html| 4 ++--
 docs/guide/development/index.html   | 4 ++--
 docs/guide/graalvm_guide/index.html | 4 ++--
 docs/guide/java_object_graph_guide/index.html   | 4 ++--
 docs/guide/row_format_guide/index.html  | 4 ++--
 docs/guide/scala_guide/index.html   | 6 +++---
 docs/guide/xlang_object_graph_guide/index.html  | 4 ++--
 docs/guide/xlang_type_mapping/index.html| 4 ++--
 docs/introduction/benchmark/index.html  | 4 ++--
 docs/introduction/features/index.html   | 4 ++--
 docs/introduction/index.html| 4 ++--
 docs/specification/fury_java_serialization_spec/index.html  | 4 ++--
 docs/specification/fury_row_format_spec/index.html  | 4 ++--
 docs/specification/fury_xlang_serialization_spec/index.html | 4 ++--
 docs/start/install/index.html   | 4 ++--
 docs/start/usage/index.html | 4 ++--
 download/index.html | 4 ++--
 index.html  | 4 ++--
 lunr-index-1714789868368.json   | 1 -
 lunr-index-1714897908778.json   | 1 +
 lunr-index.json | 2 +-
 markdown-page/index.html| 4 ++--
 search-doc-1714789868368.json   | 1 -
 search-doc-1714897908778.json   | 1 +
 search-doc.json | 2 +-
 43 files changed, 75 insertions(+), 75 deletions(-)

diff --git a/404.html b/404.html
index 099f6f9..e1886a0 100644
--- a/404.html
+++ b/404.html
@@ -5,8 +5,8 @@
 
 Page Not Found | Apache Fury (incubating)https://fury.apache.org/404.html";>
-
-
+
+
 
 
 !function(){function 
t(t){document.documentElement.setAttribute("data-theme",t)}var 
e=function(){try{return new 
URLSearchParams(window.location.search).get("docusaurus-theme")}catch(t){}}()||function(){try{return
 
localStorage.getItem("theme")}catch(t){}}();t(null!==e?e:"light")}(),function(){try{const
 c=new URLSearchParams(window.location.search).entries();for(var[t,e]of 
c)if(t.startsWith("docusaurus-data-")){var 
a=t.replace("docusaurus-data-","data-");document.documentElement.se [...]
diff --git a/assets/js/adfc56cb.cd381916.js b/assets/js/adfc56cb.40c82aae.js
similarity index 98%
rename from assets/js/adfc56cb.cd381916.js
rename to assets/js/adfc56cb.40c82aae.js
index 841f0b6..0c34c8c 100644
--- a/assets/js/adfc56cb.cd381916.js
+++ b/assets/js/adfc56cb.40c82aae.js
@@ -1 +1 @@
-"use 
strict";(self.webpackChunkfury_site=self.webpackChunkfury_site||[]).push([[1462],{370

(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&style=for-the-badge&label=GITHUB%20ACTIONS&logo=github)](https://github.com/apache/incubator-fury/actions/workflows/ci.yml)
 [![Slack 
Channel](https://img.shields.io/badge/slack-join-3f0e40?logo=slack&style=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&style=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
index 74e1e029..fca2007f 100644
--- a/integration_tests/jpms_tests/pom.xml
+++ b/integration_tests/jpms_tests/pom.xml
@@ -25,7 +25,7 @@
  

Re: [PR] chore: bump dev version to 0.6.0 [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang merged PR #1599:
URL: https://github.com/apache/incubator-fury/pull/1599


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



Re: [PR] chore: bump dev version to 0.6.0 [incubator-fury]

2024-05-05 Thread via GitHub


LiangliangSui commented on PR #1599:
URL: https://github.com/apache/incubator-fury/pull/1599#issuecomment-2094670074

   Here's a Rust CI to fix @chaokunyang 
   
   ```
   error: unexpected character '.' after patch version number
 --> Cargo.toml:32:11
  |
   32 | version = "0.6.0.dev"
  |   ^^^
  |
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



(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/java/fury-c

Re: [PR] chore(java): make enum serializer as an upper level class [incubator-fury]

2024-05-05 Thread via GitHub


chaokunyang merged PR #1598:
URL: https://github.com/apache/incubator-fury/pull/1598


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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



[GH] (incubator-fury): Workflow run "Fury CI" is working again!

2024-05-05 Thread GitBox


The GitHub Actions job "Fury CI" on incubator-fury.git has succeeded.
Run started by GitHub user LiangliangSui (triggered by LiangliangSui).

Head commit for run:
bf7f3646620c78a43f121cc15984c226a9f18cd6 / Shawn Yang 
fix(java): skip register unexisted skip class (#1601)

## What does this PR do?

skip register unexisted skip class if `deserializeUnexistedClass` not
enabled

## Related issues
#1600 

## 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



Report URL: https://github.com/apache/incubator-fury/actions/runs/8956649323

With regards,
GitHub Actions via GitBox


-
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): skip register unexisted skip class (#1601)

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

suiliangliang 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 bf7f3646 fix(java): skip register unexisted skip class (#1601)
bf7f3646 is described below

commit bf7f3646620c78a43f121cc15984c226a9f18cd6
Author: Shawn Yang 
AuthorDate: Sun May 5 15:37:04 2024 +0800

fix(java): skip register unexisted skip class (#1601)

## What does this PR do?

skip register unexisted skip class if `deserializeUnexistedClass` not
enabled

## Related issues
#1600

## 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| 24 --
 1 file changed, 13 insertions(+), 11 deletions(-)

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..a5e542d4 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
@@ -336,17 +336,19 @@ public class ClassResolver {
 if (fury.getConfig().registerGuavaTypes()) {
   GuavaCollectionSerializers.registerDefaultSerializers(fury);
 }
-if (metaContextShareEnabled) {
-  addDefaultSerializer(
-  UnexistedMetaSharedClass.class, new UnexistedClassSerializer(fury, 
null));
-  // Those class id must be known in advance, here is two bytes, so
-  // `UnexistedClassSerializer.writeClassDef`
-  // can overwrite written classinfo and replace with real classinfo.
-  short classId =
-  
Objects.requireNonNull(classInfoMap.get(UnexistedMetaSharedClass.class)).classId;
-  Preconditions.checkArgument(classId > 63 && classId < 8192, classId);
-} else {
-  register(UnexistedSkipClass.class);
+if (fury.getConfig().deserializeUnexistedClass()) {
+  if (metaContextShareEnabled) {
+addDefaultSerializer(
+UnexistedMetaSharedClass.class, new UnexistedClassSerializer(fury, 
null));
+// Those class id must be known in advance, here is two bytes, so
+// `UnexistedClassSerializer.writeClassDef`
+// can overwrite written classinfo and replace with real classinfo.
+short classId =
+
Objects.requireNonNull(classInfoMap.get(UnexistedMetaSharedClass.class)).classId;
+Preconditions.checkArgument(classId > 63 && classId < 8192, classId);
+  } else {
+register(UnexistedSkipClass.class);
+  }
 }
   }
 


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



Re: [PR] fix(java): skip register unexisted skip class [incubator-fury]

2024-05-05 Thread via GitHub


LiangliangSui merged PR #1601:
URL: https://github.com/apache/incubator-fury/pull/1601


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


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