You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Ji Liu (JIRA)" <ji...@apache.org> on 2019/06/18 06:20:00 UTC

[jira] [Commented] (ARROW-5579) [Java] shade flatbuffer dependency

    [ https://issues.apache.org/jira/browse/ARROW-5579?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16866277#comment-16866277 ] 

Ji Liu commented on ARROW-5579:
-------------------------------

[~emkornfield@gmail.com] I am afraid the above PR did not really shade the flatbuffer dependency, I am not quite familiar with maven-shade-plugin([https://maven.apache.org/plugins/maven-shade-plugin/]), correct me if I am wrong:

If we want to shade a dependency, we should follow the next steps:
 # User maven-shade-plugin and add include tags for flatbuffer
 # Add relocations to rename the package.

In the above PR, we use <exclude> tag and seems this plugin will not process this dependency?

If we use relocations to rename packages it will cause new problems and I don't know how to solve:

_/org/apache/arrow/vector/types/pojo/ArrowType.java:[239,46] 错误: 不兼容的类型: com.google.flatbuffers.FlatBufferBuilder无法转换为 arrow.format.com.google.flatbuffers.FlatBufferBuilder_

Seems the direct flatbuffer dependency in arrow-vector is not compatible with renamed dependency in arrow-format.

What do you think?

 

> [Java] shade flatbuffer dependency
> ----------------------------------
>
>                 Key: ARROW-5579
>                 URL: https://issues.apache.org/jira/browse/ARROW-5579
>             Project: Apache Arrow
>          Issue Type: Task
>          Components: Java
>            Reporter: Pindikura Ravindra
>            Assignee: Ji Liu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.14.0
>
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> Reported in a [github issue|[https://github.com/apache/arrow/issues/4489]] 
>  
> After some [discussion|https://github.com/google/flatbuffers/issues/5368] with the Flatbuffers maintainer, it appears that FB generated code is not guaranteed to be compatible with _any other_ version of the runtime library other than the exact same version of the flatc used to compile it.
> This makes depending on flatbuffers in a library (like arrow) quite risky, as if an app depends on any other version of FB, either directly or transitively, it's likely the versions will clash at some point and you'll see undefined behaviour at runtime.
> Shading the dependency looks to me the best way to avoid this.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)