Re: [PR] Passing JSON string to the other endpoint [fury]
theweipeng commented on PR #1782: URL: https://github.com/apache/fury/pull/1782#issuecomment-2278257668 Please refer to the document at `https://fury.apache.org/docs/specification/fury_xlang_serialization_spec#type-meta`. Using the 'stringify' method to encode the description is incorrect -- 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] Docs:add Chinese and English documentation on how to join the fury community. [fury-site]
chaokunyang commented on PR #142: URL: https://github.com/apache/fury-site/pull/142#issuecomment-2278055728 I don't think so. We will update English document frequently. It's very easy to introduce inconsistency. We should redirect to English document if document for other language doesn't exist -- 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] Docs:add Chinese and English documentation on how to join the fury community. [fury-site]
LofiSu commented on PR #142: URL: https://github.com/apache/fury-site/pull/142#issuecomment-2277665217 > > > Could we don't copy all english documents? We could add tem when build websites, or forward to english pages when chinese pages don't exist > > > > > > I ’m not sure what you're talking about.Do you mean no English documents? > > Why we need to commit same file content duplicately to repo? We should avoid such things ![image](https://private-user-images.githubusercontent.com/12445254/356559631-4f536ff8-cb96-4b03-85c6-4b8712c97b4e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMDA0MDEsIm5iZiI6MTcyMzIwMDEwMSwicGF0aCI6Ii8xMjQ0NTI1NC8zNTY1NTk2MzEtNGY1MzZmZjgtY2I5Ni00YjAzLTg1YzYtNGI4NzEyYzk3YjRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDEwNDE0MVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTc2MGEzODg2MDU3YjRlZWQ1OWI1Mjk5ZmE2M2E0YTFjYjhhZWY2N2E1MmM4ZWNjODU1OTFiZDhlOWUzMWMxMTImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.VfAF8ezWB7Kn84rdx0R_URytf7J4C0SWTWzguvdR4e8) The reason I copied and pasted the file here is that the Chinese translation can be translated directly on it in the future without creating a new file, and when converting to Chinese mode, no translated articles can be displayed in English. -- 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] Docs:add Chinese and English documentation on how to join the fury community. [fury-site]
LofiSu commented on PR #142: URL: https://github.com/apache/fury-site/pull/142#issuecomment-2277659902 > > > Could we don't copy all english documents? We could add tem when build websites, or forward to english pages when chinese pages don't exist > > > > > > I ’m not sure what you're talking about.Do you mean no English documents? > > Why we need to commit same file content duplicately to repo? We should avoid such things ![image](https://private-user-images.githubusercontent.com/12445254/356559631-4f536ff8-cb96-4b03-85c6-4b8712c97b4e.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjMyMDAyMDEsIm5iZiI6MTcyMzE5OTkwMSwicGF0aCI6Ii8xMjQ0NTI1NC8zNTY1NTk2MzEtNGY1MzZmZjgtY2I5Ni00YjAzLTg1YzYtNGI4NzEyYzk3YjRlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MDklMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODA5VDEwMzgyMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyN2RkN2FiNDBkNDQzMTA5NjMwYjQ1ZmRmNzRhM2FkYjc1ODFkN2ExMTRjMTQyNTIyODFiMjVlYmZkYTgzYmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.164Gkuq9u80s2YpiFlfyxxVHNkvg59T7fDQQ_mOs0rI) One is the English configuration and the other is the Chinese configuration, and the Chinese configuration has not been translated yet. I see that some of the other projects have default English, but there are also duplicate configurations in the en folder, but I think it can be deleted without much impact. -- 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] Docs:add Chinese and English documentation on how to join the fury community. [fury-site]
chaokunyang commented on PR #142: URL: https://github.com/apache/fury-site/pull/142#issuecomment-2277649048 > > Could we don't copy all english documents? We could add tem when build websites, or forward to english pages when chinese pages don't exist > > I ’m not sure what you're talking about.Do you mean no English documents? Why we need to commit same file content duplicately to repo? We should avoid such things ![image](https://github.com/user-attachments/assets/4f536ff8-cb96-4b03-85c6-4b8712c97b4e) -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
chaokunyang closed pull request #146: [New Feature]Add AOS animations to Fury website for enhanced scroll effects URL: https://github.com/apache/fury-site/pull/146 -- 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] [Rust] add enum for fury macro derive [fury]
jiacai2050 commented on issue #1393: URL: https://github.com/apache/fury/issues/1393#issuecomment-2277447018 https://github.com/apache/fury/blob/e99b46f4b83f79a23cf240466479da9e3657810d/rust/fury-derive/src/object/serializer.rs#L25-L29 It seems this is where we need to fix, please assign this issue to me. @theweipeng -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
LofiSu commented on PR #146: URL: https://github.com/apache/fury-site/pull/146#issuecomment-2276875065 > You did not delete yarn.lock file, and the animations has been added in #147 I'm sorry I didn't double check, I've deleted it. -- 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] Docs:add Chinese and English documentation on how to join the fury community. [fury-site]
LofiSu commented on PR #142: URL: https://github.com/apache/fury-site/pull/142#issuecomment-2276873769 > Could we don't copy all english documents? We could add tem when build websites, or forward to english pages when chinese pages don't exist I ’m not sure what you're talking about.Do you mean no English documents? -- 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] Docs:add Chinese and English documentation on how to join the fury community. [fury-site]
chaokunyang commented on PR #142: URL: https://github.com/apache/fury-site/pull/142#issuecomment-2276350294 Could we don't copy all english documents? We could add tem when build websites, or forward to english pages when chinese pages don't exist -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
chaokunyang commented on PR #146: URL: https://github.com/apache/fury-site/pull/146#issuecomment-2276347371 You did not delete yarn.lock file, and the animations has been added in #147 -- 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: [D] How does the zero copy works ? [fury]
GitHub user chaokunyang added a comment to the discussion: How does the zero copy works ? We are considering add `writeTo(WriteableChannel)` to `BufferObject`. THis will make it more easy to use GitHub link: https://github.com/apache/fury/discussions/1377#discussioncomment-10278496 This is an automatically sent email for commits@fury.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@fury.apache.org - To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org For additional commands, e-mail: commits-h...@fury.apache.org
Re: [D] How does the zero copy works ? [fury]
GitHub user chaokunyang added a comment to the discussion: How does the zero copy works ? Hi @Reef3rm4n , `List buffers = bufferObjects.stream().map(BufferObject::toBuffer).collect(Collectors.toList());` are just an example. In your production case, you should not invoke such methods. You should invoke `org.apache.fury.serializer.BufferObject#writeTo` to write the data into the memory address you provided. For example, you can allocate a buffer from shared off heap memory, then you wrap that buffer into fury MemoryBuffer by `MemoryUtils.buffer(long, int)`. Then you can invoke `BufferObject#writeTo` too write the data into shared memory directly. GitHub link: https://github.com/apache/fury/discussions/1377#discussioncomment-10278487 This is an automatically sent email for commits@fury.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@fury.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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on PR #1794: URL: https://github.com/apache/fury/pull/1794#issuecomment-2276083137 Very nice work, thank you @zhaoomo -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1709741066 ## java/fury-core/src/test/java/org/apache/fury/FuryTestBase.java: ## @@ -59,6 +59,28 @@ public static FuryBuilder builder() { return Fury.builder().withLanguage(Language.JAVA).requireClassRegistration(false); } + @DataProvider(name = "furyCopyConfig") Review Comment: ```suggestion @DataProvider ``` -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1709735737 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/ChildContainerSerializers.java: ## @@ -149,6 +149,14 @@ public Collection newCollection(MemoryBuffer buffer) { readAndSetFields(buffer, collection, slotsSerializers); return collection; } + +@Override +public T copy(T originCollection) { + if (objectSerializer == null) { +objectSerializer = new ObjectSerializer<>(fury, type, false); Review Comment: Could we update `ObjectSerializer`: ```java public ObjectSerializer(Fury fury, Class cls, boolean resolveParent) { super(fury, cls); // avoid recursive building serializers. // Use `setSerializerIfAbsent` to avoid overwriting existing serializer for class when used // as data serializer. if (resolveParent) { classResolver.setSerializerIfAbsent(cls, this); } ``` -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1709727233 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractCollectionSerializer.java: ## @@ -542,6 +542,35 @@ public Collection newCollection() { } } + public void copyElements(Collection originCollection, Collection newCollection) { Review Comment: CollectionSerializer has same method, could we remove that method? -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1709714237 ## java/fury-core/src/main/java/org/apache/fury/serializer/JdkProxySerializer.java: ## @@ -60,6 +60,17 @@ public void write(MemoryBuffer buffer, Object value) { fury.writeRef(buffer, Proxy.getInvocationHandler(value)); } + @Override + public Object copy(Object value) { +Class[] interfaces = value.getClass().getInterfaces(); +InvocationHandler invocationHandler = Proxy.getInvocationHandler(value); +Preconditions.checkNotNull(interfaces); +Preconditions.checkNotNull(invocationHandler); +Object proxy = Proxy.newProxyInstance(fury.getClassLoader(), interfaces, STUB_HANDLER); +Platform.putObject(proxy, PROXY_HANDLER_FIELD_OFFSET, invocationHandler); Review Comment: ```suggestion Object proxy = Proxy.newProxyInstance(fury.getClassLoader(), interfaces, STUB_HANDLER); fury.reference(value, proxy); Platform.putObject(proxy, PROXY_HANDLER_FIELD_OFFSET, fury.copyObject(invocationHandler)); ``` -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1709706379 ## java/fury-core/src/main/java/org/apache/fury/serializer/BufferSerializers.java: ## @@ -44,6 +44,13 @@ public void write(MemoryBuffer buffer, ByteBuffer value) { fury.writeBufferObject(buffer, new BufferObject.ByteBufferBufferObject(value)); } +@Override +public ByteBuffer copy(ByteBuffer value) { + ByteBuffer dst = ByteBuffer.allocate(value.capacity()); Review Comment: ```suggestion ByteBuffer dst = ByteBuffer.allocate(value.remaining()); ``` -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1709703198 ## java/fury-core/src/main/java/org/apache/fury/serializer/BufferSerializers.java: ## @@ -44,6 +44,13 @@ public void write(MemoryBuffer buffer, ByteBuffer value) { fury.writeBufferObject(buffer, new BufferObject.ByteBufferBufferObject(value)); } +@Override +public ByteBuffer copy(ByteBuffer value) { + ByteBuffer dst = ByteBuffer.allocate(value.capacity()); + dst.put(value); Review Comment: ```suggestion dst.put(value.duplicate()); ``` We need to `duplicate`, otherwise it will update offset in `ByteBuffer` -- 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(Rust): Support polymorphism [fury]
theweipeng merged PR #1795: URL: https://github.com/apache/fury/pull/1795 -- 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] Add Faq to Fury website. [fury-site]
LofiSu commented on PR #147: URL: https://github.com/apache/fury-site/pull/147#issuecomment-2274868513 > emm, seems [the issue list](https://github.com/apache/fury/issues) can reflect all faq in [apache/fury#1793](https://github.com/apache/fury/issues/1793). I prefer not add this to website. Maybe we can provide a new document which list some common questions which users came across. > > But currently, I prefer removing faq from the website Yes, we can discuss the content with the commiters, and I will write this page. -- 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] Fury FAQ [fury]
chaokunyang commented on issue #1793: URL: https://github.com/apache/fury/issues/1793#issuecomment-2274856618 I will close this issue, we can open a new issue to add a new FAQ page. But more importantly, we need to decide what should be included here -- 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] Fury FAQ [fury]
chaokunyang closed issue #1793: Fury FAQ URL: https://github.com/apache/fury/issues/1793 -- 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] Fury FAQ [fury]
LofiSu commented on issue #1793: URL: https://github.com/apache/fury/issues/1793#issuecomment-2274846077 > Maybe it should be a page like https://arrow.apache.org/faq/ rather than an issue? This is a much better choice. -- 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] Fury FAQ [fury]
chaokunyang commented on issue #1793: URL: https://github.com/apache/fury/issues/1793#issuecomment-2274824034 Maybe it should be a page like https://arrow.apache.org/faq/ rather an issue? -- 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(Rust): Support polymorphism [fury]
theweipeng commented on code in PR #1795: URL: https://github.com/apache/fury/pull/1795#discussion_r1707423502 ## rust/fury-core/src/serializer/string.rs: ## @@ -37,8 +38,8 @@ impl Serializer for String { Ok(context.reader.string(len as usize)) } -fn ty() -> FieldType { -FieldType::STRING +fn ty(_fury: ) -> i16 { Review Comment: Yes. but type is a keyword, and type_id is a member of Any which is available for every type. ty is not a good choise, Maybe we can use fury_type_id -- 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] Fury FAQ [fury]
LofiSu commented on issue #1793: URL: https://github.com/apache/fury/issues/1793#issuecomment-2273880569 > If uses have some issues, they should create it in https://github.com/apache/fury/issues instead of here. Do we really need this issue? I'm not sure about this, but it seems that almost all communities have FAQ links. Maybe we can shrink the font size of the navigation bar a bit and leave room for the “Team” and “Users” pages.I think it is more important to fill in the content now. At present, the home page is empty and needs to be filled with more introductions and content. -- 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(Rust): Support polymorphism [fury]
chaokunyang commented on code in PR #1795: URL: https://github.com/apache/fury/pull/1795#discussion_r1707403593 ## rust/fury-core/src/serializer/string.rs: ## @@ -37,8 +38,8 @@ impl Serializer for String { Ok(context.reader.string(len as usize)) } -fn ty() -> FieldType { -FieldType::STRING +fn ty(_fury: ) -> i16 { Review Comment: What does `ty` means? You mean `type`? -- 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(Rust): Support polymorphism [fury]
chaokunyang commented on code in PR #1795: URL: https://github.com/apache/fury/pull/1795#discussion_r1707403593 ## rust/fury-core/src/serializer/string.rs: ## @@ -37,8 +38,8 @@ impl Serializer for String { Ok(context.reader.string(len as usize)) } -fn ty() -> FieldType { -FieldType::STRING +fn ty(_fury: ) -> i16 { Review Comment: What does `ty` means? -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1707399392 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/CollectionSerializer.java: ## @@ -79,6 +79,21 @@ public void copyElements(T originCollection, Collection newCollection) { } } + public void copyElements(T originCollection, Object[] elements) { Review Comment: add `@Override` annotation -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1707398688 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/ChildContainerSerializers.java: ## @@ -199,6 +207,14 @@ public Map newMap(MemoryBuffer buffer) { readAndSetFields(buffer, map, slotsSerializers); return map; } + +@Override +public T copy(T originMap) { + if (slotsSerializers.length == 0) { Review Comment: Same issues -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1707398202 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/ChildContainerSerializers.java: ## @@ -149,6 +149,14 @@ public Collection newCollection(MemoryBuffer buffer) { readAndSetFields(buffer, collection, slotsSerializers); return collection; } + +@Override +public T copy(T originCollection) { + if (slotsSerializers.length == 0) { +return super.copy(originCollection); + } + return (T) slotsSerializers[0].copy(originCollection); Review Comment: This return an object of first field -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1707397347 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/ChildContainerSerializers.java: ## @@ -149,6 +149,14 @@ public Collection newCollection(MemoryBuffer buffer) { readAndSetFields(buffer, collection, slotsSerializers); return collection; } + +@Override +public T copy(T originCollection) { + if (slotsSerializers.length == 0) { +return super.copy(originCollection); Review Comment: This will return an object of super class type, which is not right -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1707393975 ## java/fury-core/src/main/java/org/apache/fury/serializer/collection/AbstractMapSerializer.java: ## @@ -439,6 +441,28 @@ protected void copyEntry(Map originMap, Map newMap) { } } + protected void copyEntry(Map originMap, Builder builder) { Review Comment: If we overwrite this method, we shoud add `@Override` annotation -- 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 copy capabilities for some classes without no-argument constructors [fury]
chaokunyang commented on code in PR #1794: URL: https://github.com/apache/fury/pull/1794#discussion_r1707391195 ## java/fury-core/src/main/java/org/apache/fury/serializer/ReplaceResolveSerializer.java: ## @@ -272,6 +272,12 @@ private void writeObject(MemoryBuffer buffer, Object value, MethodInfoCache jdkM jdkMethodInfoCache.objectSerializer.write(buffer, value); } + @Override + public Object copy(Object value) { +Serializer serializer = classClassInfoHolderMap.get(value.getClass()).objectSerializer; +return fury.copyObject(value, serializer); Review Comment: Do we need to invoke resolve method? -- 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] Fury FAQ [fury]
chaokunyang commented on issue #1793: URL: https://github.com/apache/fury/issues/1793#issuecomment-2273855636 If uses have some issues, they should create it in https://github.com/apache/fury/issues instead of here. Do we really need this issue? -- 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] Add Faq to Fury website. [fury-site]
chaokunyang commented on PR #147: URL: https://github.com/apache/fury-site/pull/147#issuecomment-2273849810 Seems [the issue list](https://github.com/apache/fury/issues) can reflect all faq in https://github.com/apache/fury/issues/1793. I prefer not add this to website. -- 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] Add Faq to Fury website. [fury-site]
chaokunyang merged PR #147: URL: https://github.com/apache/fury-site/pull/147 -- 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] feat(Rust): Support polymorphism [fury]
theweipeng opened a new pull request, #1795: URL: https://github.com/apache/fury/pull/1795 ## What does this PR do? 1. Support polymorphism Add a class resolver which is used for managing the relationship between type_id and serializer. The serializer is generated by a generic function which will be called by dynamic dispatch. When a struct uses `Box` as a field type and does not specify the specific type, we will use the class resolver to load the handler by type_id. In this situation, there is some performance overhead due to hash lookup, but it greatly improves convenience. Use as follow: ```Rust #[test] fn any() { #[derive(Fury, Debug)] struct Animal { f3: String, } #[derive(Fury, Debug)] struct Person { f1: Box, } let person = Person { f1: Box::new(Animal { f3: String::from("hello"), }), }; let mut fury = Fury::default(); fury.register::(999); fury.register::(1000); let bin = fury.serialize(); let obj: Person = fury.deserialize().expect(""); assert_eq!(true, obj.f1.is::()) } ``` 2. Add a register function for user to register Struct and id 3. Remove tag and hash which were generate by macro before and were removed in our protocol 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
Re: [I] Concerning license in the javadoc jar [fury]
chaokunyang commented on issue #1635: URL: https://github.com/apache/fury/issues/1635#issuecomment-2273520881 > @hyandell I tried openJDK 22.0.2 and the result was the same. Hi @ceki ,thanks for reporting this. I forgot to switch jdk before releasing. I'm writing a automatic release script to release jar. I will check jdk in the script. Hope this issue can be avoided in future release. -- 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] feat(java): Support copy capabilities for some classes without no-argument constructors [fury]
zhaoomo opened a new pull request, #1794: URL: https://github.com/apache/fury/pull/1794 ## What does this PR do? Some classes with no-argument constructors will report an error when calling `copy()` This pr: - implement the copy method for the no-argument constructor serializer - add test case ## Related issues https://github.com/apache/fury/issues/1777 https://github.com/apache/fury/issues/1679 ## 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] Concerning license in the javadoc jar [fury]
ceki commented on issue #1635: URL: https://github.com/apache/fury/issues/1635#issuecomment-2272148307 @hyandell I tried openJDK 22.0.2 and the result was the same. -- 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] Add Faq to Fury website. [fury-site]
LofiSu commented on PR #147: URL: https://github.com/apache/fury-site/pull/147#issuecomment-2271561153 > Could we remove `yarn.lock` file for git? ok I delete it :) -- 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: [D] How does the zero copy works ? [fury]
GitHub user StevenCurran edited a comment on the discussion: How does the zero copy works ? hey @chaokunyang Sorry to bring this thread up again, but felt its applicable instead of creating a new thread. In your example for zero copy, could you elaborate a bit on what is happening here? https://fury.apache.org/docs/guide/java_object_graph_guide#zero-copy-serialization What are the BufferObjects used for, and what about the MemoryBuffers list used a couple of lines later? I am just trying to get an idea of the flow of data here, and where it is done off heap at each line. Could a comment on the lines after the objects are created in lst help? Also looking at the source code, toBuffer, and creating BufferObjects are on heap from MemoryBuffer.newHeapBuffer(this.totalBytes()), so could you provide a full offheap version of this? ```java public static void main(String[] args) { //3 objects allocated that we want to serialize off heap List list = Arrays.asList("str", new byte[1000], new int[100], new double[100]); //Off heap BufferObjects that are pre allocated, and can be reused as a serialization / deserialization memory location? Collection bufferObjects = new ArrayList<>(); //Serialize the objects from list out of band (off heap) into each of the buffer objects? aka 0 allocation done and bufferObjects can be reused? This returns a byte[] though, so there is heap allocation happening? byte[] bytes = fury.serialize(list, e -> !bufferObjects.add(e)); //Then we take those objects and put them into a bytebuffer, also off heap? But return this list? Confused as to why List buffers = bufferObjects.stream() .map(BufferObject::toBuffer).collect(Collectors.toList()); //Move these back on heap when using the deserialize, by using the pre allocated buffers? System.out.println(fury.deserialize(bytes, buffers)); } } ``` I have tried to put in comments as to what I believe, but perhaps it is not so clear to me what is happening here. Any guidance would be geatly appreciated. Many thanks! GitHub link: https://github.com/apache/fury/discussions/1377#discussioncomment-10254568 This is an automatically sent email for commits@fury.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@fury.apache.org - To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org For additional commands, e-mail: commits-h...@fury.apache.org
Re: [D] How does the zero copy works ? [fury]
GitHub user StevenCurran edited a comment on the discussion: How does the zero copy works ? hey @chaokunyang Sorry to bring this thread up again, but felt its applicable instead of creating a new thread. In your example for zero copy, could you elaborate a bit on what is happening here? https://fury.apache.org/docs/guide/java_object_graph_guide#zero-copy-serialization What are the BufferObjects used for, and what about the MemoryBuffers list used a couple of lines later? I am just trying to get an idea of the flow of data here, and where it is done off heap at each line. Could a comment on the lines after the objects are created in lst help? ```java public static void main(String[] args) { //3 objects allocated that we want to serialize off heap List list = Arrays.asList("str", new byte[1000], new int[100], new double[100]); //Off heap BufferObjects that are pre allocated, and can be reused as a serialization / deserialization memory location? Collection bufferObjects = new ArrayList<>(); //Serialize the objects from list out of band (off heap) into each of the buffer objects? aka 0 allocation done and bufferObjects can be reused? This returns a byte[] though, so there is heap allocation happening? byte[] bytes = fury.serialize(list, e -> !bufferObjects.add(e)); //Then we take those objects and put them into a bytebuffer, also off heap? But return this list? Confused as to why List buffers = bufferObjects.stream() .map(BufferObject::toBuffer).collect(Collectors.toList()); //Move these back on heap when using the deserialize, by using the pre allocated buffers? System.out.println(fury.deserialize(bytes, buffers)); } } ``` I have tried to put in comments as to what I believe, but perhaps it is not so clear to me what is happening here. Any guidance would be geatly appreciated. Many thanks! GitHub link: https://github.com/apache/fury/discussions/1377#discussioncomment-10254568 This is an automatically sent email for commits@fury.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@fury.apache.org - To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org For additional commands, e-mail: commits-h...@fury.apache.org
Re: [D] How does the zero copy works ? [fury]
GitHub user StevenCurran added a comment to the discussion: How does the zero copy works ? hey @chaokunyang Sorry to bring this thread up again, but felt its applicable instead of creating a new thread. In your example for zero copy, could you elaborate a bit on what is happening here? https://fury.apache.org/docs/guide/java_object_graph_guide#zero-copy-serialization What are the BufferObjects used for, and what about the MemoryBuffers list used a couple of lines later? I am just trying to get an idea of the flow of data here, and where it is done off heap at each line. Could a comment on the lines after the objects are created in lst help? ` public static void main(String[] args) { //3 objects allocated that we want to serialize off heap List list = Arrays.asList("str", new byte[1000], new int[100], new double[100]); //Off heap BufferObjects that are pre allocated, and can be reused as a serialization / deserialization memory location? Collection bufferObjects = new ArrayList<>(); //Serialize the objects from list out of band (off heap) into each of the buffer objects? aka 0 allocation done and bufferObjects can be reused? This returns a byte[] though, so there is heap allocation happening? byte[] bytes = fury.serialize(list, e -> !bufferObjects.add(e)); //Then we take those objects and put them into a bytebuffer, also off heap? But return this list? Confused as to why List buffers = bufferObjects.stream() .map(BufferObject::toBuffer).collect(Collectors.toList()); //Move these back on heap when using the deserialize, by using the pre allocated buffers? System.out.println(fury.deserialize(bytes, buffers)); } }` I have tried to put in comments as to what I believe, but perhaps it is not so clear to me what is happening here. Any guidance would be geatly appreciated. Many thanks! GitHub link: https://github.com/apache/fury/discussions/1377#discussioncomment-10254568 This is an automatically sent email for commits@fury.apache.org. To unsubscribe, please send an email to: commits-unsubscr...@fury.apache.org - To unsubscribe, e-mail: commits-unsubscr...@fury.apache.org For additional commands, e-mail: commits-h...@fury.apache.org
Re: [PR] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
LofiSu commented on PR #146: URL: https://github.com/apache/fury-site/pull/146#issuecomment-2271330532 https://github.com/user-attachments/assets/5c41140e-879b-4520-bd88-7747879285ab -- 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): Chunk by chunk predictive map serialization protocol (WIP) [fury]
chaokunyang commented on PR #1722: URL: https://github.com/apache/fury/pull/1722#issuecomment-2271313964 Could we add license header for MapChunkWriter? ![image](https://github.com/user-attachments/assets/22f00d8f-cc0f-43e1-815d-ee5b0b301bd1) -- 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] Add Faq to Fury website. [fury-site]
chaokunyang commented on PR #147: URL: https://github.com/apache/fury-site/pull/147#issuecomment-2271294410 Could we remove `yarn.lock` file for git? -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
chaokunyang commented on PR #146: URL: https://github.com/apache/fury-site/pull/146#issuecomment-2271236943 > > Could you attach a screenshot or recording to show the changes you made? > > This is the animation effect, you can open the screen and run it. I have sent it to the author, and he said yes. We can capture three pictures of the animation to show a simple diff here -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
LofiSu commented on PR #146: URL: https://github.com/apache/fury-site/pull/146#issuecomment-2270983130 > Could you attach a screenshot or recording to show the changes you made? This is the animation effect, you can open the screen and run it. I have sent it to the author, and he said yes. -- 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] Add Faq to Fury website. [fury-site]
LofiSu opened a new pull request, #147: URL: https://github.com/apache/fury-site/pull/147 Add Faq to Fury website. https://github.com/apache/fury/issues/1793 -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
PragmaTwice commented on PR #146: URL: https://github.com/apache/fury-site/pull/146#issuecomment-2270897672 Could you attach a screenshot or recording to show the changes you made? -- 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] [New Feature]Add AOS animations to Fury website for enhanced scroll effects [fury-site]
LofiSu opened a new pull request, #146: URL: https://github.com/apache/fury-site/pull/146 Add AOS animations to Fury website - Integrated AOS (Animate On Scroll) library - Applied animations to various sections of the site - Improved user experience with smooth scroll effects -- 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): Add EnumNameSerializer for Enum [fury]
lionel-xie commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1705245248 ## java/fury-core/src/main/java/org/apache/fury/resolver/EnumStringResolver.java: ## @@ -0,0 +1,46 @@ +package org.apache.fury.resolver; + +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.meta.MetaString; + +import static org.apache.fury.meta.Encoders.GENERIC_DECODER; +import static org.apache.fury.meta.Encoders.GENERIC_ENCODER; + +public class EnumStringResolver { Review Comment: And I also need to add public before MetaStringBytes class, are you sure I can do this? -- 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): Add EnumNameSerializer for Enum [fury]
lionel-xie commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1705236384 ## java/fury-core/src/main/java/org/apache/fury/resolver/EnumStringResolver.java: ## @@ -0,0 +1,46 @@ +package org.apache.fury.resolver; + +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.meta.MetaString; + +import static org.apache.fury.meta.Encoders.GENERIC_DECODER; +import static org.apache.fury.meta.Encoders.GENERIC_ENCODER; + +public class EnumStringResolver { Review Comment: Ok, so i can add public before org.apache.fury.resolver.MetaStringResolver#getOrCreateMetaStringBytes? -- 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): Add EnumNameSerializer for Enum [fury]
xxd819240366 commented on PR #1791: URL: https://github.com/apache/fury/pull/1791#issuecomment-2270780124 > Ok,I'll update it again -- 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] [Scala] Support scala object copy [fury]
LiangliangSui commented on issue #1788: URL: https://github.com/apache/fury/issues/1788#issuecomment-2270216386 I will do this. -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1704355332 ## java/fury-core/src/main/java/org/apache/fury/resolver/EnumStringResolver.java: ## @@ -0,0 +1,46 @@ +package org.apache.fury.resolver; + +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.meta.MetaString; + +import static org.apache.fury.meta.Encoders.GENERIC_DECODER; +import static org.apache.fury.meta.Encoders.GENERIC_ENCODER; + +public class EnumStringResolver { Review Comment: You can use it in enum serialization, `@internal` just means users' serializer should not use this API -- 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): Add EnumNameSerializer for Enum [fury]
xxd819240366 commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1704179050 ## java/fury-core/src/main/java/org/apache/fury/resolver/EnumStringResolver.java: ## @@ -0,0 +1,46 @@ +package org.apache.fury.resolver; + +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.meta.MetaString; + +import static org.apache.fury.meta.Encoders.GENERIC_DECODER; +import static org.apache.fury.meta.Encoders.GENERIC_ENCODER; + +public class EnumStringResolver { Review Comment: because org.apache.fury.resolver.MetaStringResolver#getOrCreateMetaStringBytes is not public and MetaStringBytes annotated by @Internal. I feel like I shouldn't break the existing design -- 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): Add EnumNameSerializer for Enum [fury]
xxd819240366 commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1704173607 ## java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java: ## @@ -312,6 +313,11 @@ public FuryBuilder withAsyncCompilation(boolean asyncCompilation) { return this; } + public FuryBuilder withUseEnumNameSerializer(boolean useEnumNameSerializer) { Review Comment: no problem ## java/fury-core/src/main/java/org/apache/fury/config/Config.java: ## @@ -248,6 +251,10 @@ public boolean isScalaOptimizationEnabled() { return scalaOptimizationEnabled; } + public boolean getUseEnumNameSerializer() { Review Comment: no problem -- 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] fix blog time [fury-site]
chaokunyang merged PR #145: URL: https://github.com/apache/fury-site/pull/145 -- 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 blog time [fury-site]
chaokunyang opened a new pull request, #145: URL: https://github.com/apache/fury-site/pull/145 (no comment) -- 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] NullPointer from ThreadPoolFury.serialize [fury]
chaokunyang commented on issue #1763: URL: https://github.com/apache/fury/issues/1763#issuecomment-2268931538 Hi @davidnadeau , I fixed this issue in https://github.com/apache/fury/pull/1792, could you try lastest snapshot jar? ```java org.apache.fury fury-core 0.8.0-SNAPSHOT ``` If the error stil persists, please reopen this issue again. -- 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] NullPointer from ThreadPoolFury.serialize [fury]
chaokunyang closed issue #1763: NullPointer from ThreadPoolFury.serialize URL: https://github.com/apache/fury/issues/1763 -- 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] fix(java): fix classloader get npe [fury]
chaokunyang merged PR #1792: URL: https://github.com/apache/fury/pull/1792 -- 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(Rust): Implement TypeMeta part of the compatibility features [fury]
theweipeng merged PR #1789: URL: https://github.com/apache/fury/pull/1789 -- 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] fix(java): fix classloader get npe [fury]
chaokunyang commented on PR #1792: URL: https://github.com/apache/fury/pull/1792#issuecomment-2268912683 > Do we need to add the same logic in https://github.com/apache/fury/blob/main/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java#L323? Updated to: ```java if (classLoader == null) { classLoader = Thread.currentThread().getContextClassLoader(); if (classLoader == null) { classLoader = Fury.class.getClassLoader(); } } ``` -- 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] fix(java): fix classloader get npe [fury]
LiangliangSui commented on PR #1792: URL: https://github.com/apache/fury/pull/1792#issuecomment-2268907061 Do we need to add the same logic in https://github.com/apache/fury/blob/main/java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java#L323? -- 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] fix(java): fix classloader get npe [fury]
chaokunyang commented on code in PR #1792: URL: https://github.com/apache/fury/pull/1792#discussion_r1704003925 ## java/fury-core/src/main/java/org/apache/fury/ThreadLocalFury.java: ## @@ -257,6 +257,9 @@ public void setClassLoader(ClassLoader classLoader) { @Override public void setClassLoader(ClassLoader classLoader, StagingType stagingType) { +if (classLoader == null) { Review Comment: Good catch -- 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] fix(java): fix classloader get npe [fury]
LiangliangSui commented on code in PR #1792: URL: https://github.com/apache/fury/pull/1792#discussion_r1704000144 ## java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java: ## @@ -50,7 +52,13 @@ public class FuryPooledObjectFactory { /** ThreadLocal: ClassLoader. */ private final ThreadLocal classLoaderLocal = - ThreadLocal.withInitial(() -> Thread.currentThread().getContextClassLoader()); + ThreadLocal.withInitial(() -> { +ClassLoader loader = Thread.currentThread().getContextClassLoader(); +if (loader == null) { + loader = Fury.class.getClassLoader(); +} Review Comment: Could we move this into `org.apache.fury.config.FuryBuilder#finish` ? -- 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] fix(java): fix classloader get npe [fury]
LiangliangSui commented on code in PR #1792: URL: https://github.com/apache/fury/pull/1792#discussion_r1703997143 ## java/fury-core/src/main/java/org/apache/fury/ThreadLocalFury.java: ## @@ -257,6 +257,9 @@ public void setClassLoader(ClassLoader classLoader) { @Override public void setClassLoader(ClassLoader classLoader, StagingType stagingType) { +if (classLoader == null) { Review Comment: This should be redundant, there is already such a way in `org.apache.fury.util.LoaderBinding#setClassLoader` ## java/fury-core/src/main/java/org/apache/fury/pool/FuryPooledObjectFactory.java: ## @@ -50,7 +52,13 @@ public class FuryPooledObjectFactory { /** ThreadLocal: ClassLoader. */ private final ThreadLocal classLoaderLocal = - ThreadLocal.withInitial(() -> Thread.currentThread().getContextClassLoader()); + ThreadLocal.withInitial(() -> { +ClassLoader loader = Thread.currentThread().getContextClassLoader(); +if (loader == null) { + loader = Fury.class.getClassLoader(); +} Review Comment: Could we move this into `org.apache.fury.config.FuryBuilder#finish` ? ## java/fury-core/src/main/java/org/apache/fury/pool/ThreadPoolFury.java: ## @@ -279,6 +279,9 @@ public void setClassLoader(ClassLoader classLoader) { @Override public void setClassLoader(ClassLoader classLoader, LoaderBinding.StagingType stagingType) { +if (classLoader == null) { Review Comment: `org.apache.fury.pool.FuryPooledObjectFactory#setClassLoader` -- 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(Rust): Implement TypeMeta part of the compatibility features [fury]
chaokunyang commented on PR #1789: URL: https://github.com/apache/fury/pull/1789#issuecomment-2268808088 Do we need to rename `internal` to `serializer` and rename `resolvers` to `resolver` to keep consistent with other languages? -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703941420 ## java/pom.xml: ## @@ -33,7 +33,7 @@ org.apache.fury fury-parent pom - 0.7.0 + 0.7.1-SNAPSHOT Review Comment: ```suggestion 0.8.0-SNAPSHOT ``` -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703940710 ## java/fury-format/pom.xml: ## @@ -25,7 +25,7 @@ org.apache.fury fury-parent -0.7.0 +0.7.1-SNAPSHOT Review Comment: ```suggestion 0.8.0-SNAPSHOT ``` -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703941125 ## java/fury-test-core/pom.xml: ## @@ -25,7 +25,7 @@ fury-parent org.apache.fury -0.7.0 +0.7.1-SNAPSHOT Review Comment: ```suggestion 0.8.0-SNAPSHOT ``` ## java/fury-testsuite/pom.xml: ## @@ -25,7 +25,7 @@ fury-parent org.apache.fury -0.7.0 +0.7.1-SNAPSHOT Review Comment: ```suggestion 0.8.0-SNAPSHOT ``` -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on PR #1791: URL: https://github.com/apache/fury/pull/1791#issuecomment-2268794077 Hi @xxd819240366 , thanks for contribuing to Apache Fury. The code looks to me overall, I left some minor comments -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703937437 ## java/fury-core/src/main/java/org/apache/fury/serializer/EnumNameSerializer.java: ## @@ -0,0 +1,80 @@ +/* + * 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.serializer; + +import org.apache.fury.Fury; +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.resolver.EnumStringResolver; +import org.apache.fury.util.Preconditions; + +import java.util.Arrays; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + + +@SuppressWarnings("rawtypes") +public final class EnumNameSerializer extends ImmutableSerializer { + + private final Map enumConstantsMap; + private final EnumStringResolver enumStringResolver; + + + public EnumNameSerializer(Fury fury, Class cls) { +super(fury, cls, false); +this.enumStringResolver = new EnumStringResolver(); +if (cls.isEnum()) { + enumConstantsMap = Arrays.stream(cls.getEnumConstants()) + .collect(Collectors.toMap(Enum::name, Function.identity())); +} else { + Preconditions.checkArgument(Enum.class.isAssignableFrom(cls) && cls != Enum.class); + @SuppressWarnings("unchecked") + Class enclosingClass = (Class) cls.getEnclosingClass(); + Preconditions.checkNotNull(enclosingClass); + Preconditions.checkArgument(enclosingClass.isEnum()); + enumConstantsMap = Arrays.stream(enclosingClass.getEnumConstants()) + .collect(Collectors.toMap(Enum::name, Function.identity())); +} + } + + @Override + public void write(MemoryBuffer buffer, Enum value) { +enumStringResolver.writeMetaStringBytes(buffer, value); + } + + @Override + public Enum read(MemoryBuffer buffer) { +String key = enumStringResolver.readMetaString(buffer); Review Comment: We do not need to read a string, we can read `MetaStringBytes` using `org.apache.fury.resolver.MetaStringResolver#readMetaStringBytes(org.apache.fury.memory.MemoryBuffer)` instead -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703935541 ## java/fury-core/src/main/java/org/apache/fury/serializer/EnumNameSerializer.java: ## @@ -0,0 +1,80 @@ +/* + * 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.serializer; + +import org.apache.fury.Fury; +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.resolver.EnumStringResolver; +import org.apache.fury.util.Preconditions; + +import java.util.Arrays; +import java.util.Map; +import java.util.Objects; +import java.util.function.Function; +import java.util.stream.Collectors; + + +@SuppressWarnings("rawtypes") +public final class EnumNameSerializer extends ImmutableSerializer { + + private final Map enumConstantsMap; + private final EnumStringResolver enumStringResolver; + + + public EnumNameSerializer(Fury fury, Class cls) { +super(fury, cls, false); +this.enumStringResolver = new EnumStringResolver(); +if (cls.isEnum()) { + enumConstantsMap = Arrays.stream(cls.getEnumConstants()) + .collect(Collectors.toMap(Enum::name, Function.identity())); +} else { + Preconditions.checkArgument(Enum.class.isAssignableFrom(cls) && cls != Enum.class); + @SuppressWarnings("unchecked") + Class enclosingClass = (Class) cls.getEnclosingClass(); + Preconditions.checkNotNull(enclosingClass); + Preconditions.checkArgument(enclosingClass.isEnum()); + enumConstantsMap = Arrays.stream(enclosingClass.getEnumConstants()) + .collect(Collectors.toMap(Enum::name, Function.identity())); +} + } + + @Override + public void write(MemoryBuffer buffer, Enum value) { +enumStringResolver.writeMetaStringBytes(buffer, value); Review Comment: We'd better use `org.apache.fury.resolver.MetaStringResolver#writeMetaStringBytes` instead. We can create `MetaStringBytes[]` when building `EnumNameSerializer` -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703930351 ## java/fury-core/src/main/java/org/apache/fury/resolver/EnumStringResolver.java: ## @@ -0,0 +1,46 @@ +package org.apache.fury.resolver; + +import org.apache.fury.memory.MemoryBuffer; +import org.apache.fury.meta.MetaString; + +import static org.apache.fury.meta.Encoders.GENERIC_DECODER; +import static org.apache.fury.meta.Encoders.GENERIC_ENCODER; + +public class EnumStringResolver { Review Comment: Why not use MetaStringResolver directly -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703864158 ## java/fury-core/src/main/java/org/apache/fury/config/Config.java: ## @@ -248,6 +251,10 @@ public boolean isScalaOptimizationEnabled() { return scalaOptimizationEnabled; } + public boolean getUseEnumNameSerializer() { Review Comment: How about `isSerializeEnumByName` -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703863728 ## java/fury-core/src/main/java/org/apache/fury/config/FuryBuilder.java: ## @@ -312,6 +313,11 @@ public FuryBuilder withAsyncCompilation(boolean asyncCompilation) { return this; } + public FuryBuilder withUseEnumNameSerializer(boolean useEnumNameSerializer) { Review Comment: How about naming to `withSerializeEnumByName`? -- 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): Add EnumNameSerializer for Enum [fury]
chaokunyang commented on code in PR #1791: URL: https://github.com/apache/fury/pull/1791#discussion_r1703862055 ## java/fury-core/pom.xml: ## @@ -25,7 +25,7 @@ org.apache.fury fury-parent -0.7.0 +0.7.1-SNAPSHOT Review Comment: ```suggestion 0.8.0-SNAPSHOT ``` -- 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): fix classloader get npe [fury]
chaokunyang opened a new pull request, #1792: URL: https://github.com/apache/fury/pull/1792 ## What does this PR do? fix classloader get npe ## Related issues Closes #1763 ## 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
[PR] feat(java): Add EnumNameSerializer for Enum [fury]
xxd819240366 opened a new pull request, #1791: URL: https://github.com/apache/fury/pull/1791 ## What does this PR do? Add EnumNameSerializer for Enum, can config it by org.apache.fury.config.Config#useEnumNameSerializer, default value is 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 -- 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] The fact that this function is enough now and doesn't break tests is pretty surprising- I think it relates to some work @Andarist might've done here. [fury]
chaokunyang closed issue #1785: The fact that this function is enough now and doesn't break tests is pretty surprising- I think it relates to some work @Andarist might've done here. URL: https://github.com/apache/fury/issues/1785 -- 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(java): Disallow writing meta classdef when obj is null [fury]
chaokunyang merged PR #1686: URL: https://github.com/apache/fury/pull/1686 -- 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(java): Disallow writing meta classdef when obj is null [fury]
chaokunyang commented on code in PR #1686: URL: https://github.com/apache/fury/pull/1686#discussion_r1703464587 ## java/fury-core/src/main/java/org/apache/fury/Fury.java: ## @@ -1063,9 +1066,12 @@ public void serializeJavaObject(MemoryBuffer buffer, Object obj) { if (!refResolver.writeRefOrNull(buffer, obj)) { ClassInfo classInfo = classResolver.getOrUpdateClassInfo(obj.getClass()); writeData(buffer, classInfo, obj); + MetaContext metaContext = getSerializationContext().getMetaContext(); Review Comment: ```suggestion MetaContext metaContext = serializationContext.getMetaContext(); ``` -- 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(java): Disallow writing meta classdef when obj is null [fury]
chaokunyang commented on code in PR #1686: URL: https://github.com/apache/fury/pull/1686#discussion_r1703464703 ## java/fury-core/src/main/java/org/apache/fury/Fury.java: ## @@ -792,7 +795,7 @@ public Object deserialize(MemoryBuffer buffer, Iterable outOfBandB } catch (Throwable t) { throw ExceptionUtils.handleReadFailed(this, t); } finally { - if (shareMeta) { + if (shareMeta && classDefEndOffset != -1) { Review Comment: ```suggestion if (classDefEndOffset != -1) { ``` -- 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(java): Disallow writing meta classdef when obj is null [fury]
chaokunyang commented on code in PR #1686: URL: https://github.com/apache/fury/pull/1686#discussion_r1703464374 ## java/fury-core/src/main/java/org/apache/fury/Fury.java: ## @@ -1116,7 +1122,7 @@ public T deserializeJavaObject(MemoryBuffer buffer, Class cls) { } catch (Throwable t) { throw ExceptionUtils.handleReadFailed(this, t); } finally { - if (shareMeta) { + if (shareMeta && classDefEndOffset != -1) { Review Comment: ```suggestion if (classDefEndOffset != -1) { ``` -- 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(java): Disallow writing meta classdef when obj is null [fury]
chaokunyang commented on code in PR #1686: URL: https://github.com/apache/fury/pull/1686#discussion_r1703464259 ## java/fury-core/src/main/java/org/apache/fury/Fury.java: ## @@ -1226,7 +1232,7 @@ public Object deserializeJavaObjectAndClass(MemoryBuffer buffer) { } catch (Throwable t) { throw ExceptionUtils.handleReadFailed(this, t); } finally { - if (shareMeta) { + if (shareMeta && classDefEndOffset != -1) { Review Comment: ```suggestion if (classDefEndOffset != -1) { ``` -- 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(java): Disallow writing meta classdef when obj is null [fury]
chaokunyang commented on code in PR #1686: URL: https://github.com/apache/fury/pull/1686#discussion_r1703462710 ## java/fury-core/src/main/java/org/apache/fury/Fury.java: ## @@ -344,7 +346,8 @@ private void write(MemoryBuffer buffer, Object obj) { classResolver.writeClass(buffer, classInfo); writeData(buffer, classInfo, obj); } -if (shareMeta) { +MetaContext metaContext = getSerializationContext().getMetaContext(); Review Comment: ```suggestion MetaContext metaContext = serializationContext.getMetaContext(); ``` -- 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(java): Disallow writing meta classdef when obj is null [fury]
LiangliangSui commented on PR #1686: URL: https://github.com/apache/fury/pull/1686#issuecomment-2268037357 @chaokunyang please help review this -- 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 release version to 0.7.0 [fury]
chaokunyang merged PR #1790: URL: https://github.com/apache/fury/pull/1790 -- 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] release 0.7.0 [fury-site]
chaokunyang merged PR #144: URL: https://github.com/apache/fury-site/pull/144 -- 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] chore: bump release version to 0.7.0 [fury]
chaokunyang opened a new pull request, #1790: URL: https://github.com/apache/fury/pull/1790 ## What does this PR do? ## 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
[PR] feat(Rust): Implement TypeMeta part of the compatibility features [fury]
theweipeng opened a new pull request, #1789: URL: https://github.com/apache/fury/pull/1789 ## What does this PR do? ### Refine code struct and implement some compatibility features 1. Split fury_meta file into individual files, as the file is too large to be easily read. There are a lot of features should be implemented by macro, split it is necessary. 2. Implement compatibility by the macro, which will now generate a pattern match expression. 3. Write type meta to binary when serializing objects. 4. Read type meta for the pattern match which is generated at compile time when deserializing. ### Some unimplemented features 1. Add a v-table for looking up generic methods by type_id, which is used for support the Any type. 2. Support draining unused binary data when receiving an unregistered type. -- 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 0.7.0 [fury-site]
chaokunyang opened a new pull request, #144: URL: https://github.com/apache/fury-site/pull/144 (no comment) -- 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] [Java] Support collection copy [fury]
chaokunyang opened a new issue, #1788: URL: https://github.com/apache/fury/issues/1788 ## Is your feature request related to a problem? Please describe. We implemented scala serializers in fury-scala, we should also implement copy method in those serializers ## Describe the solution you'd like ## Additional context -- 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