Skip to content
This repository was archived by the owner on Mar 23, 2026. It is now read-only.

Commit 60bc184

Browse files
committed
fix(native): adapt to latest update of arrow
1 parent 6d02a77 commit 60bc184

4 files changed

Lines changed: 36 additions & 37 deletions

File tree

google-cloud-bigquery/pom.xml

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
</parent>
1616
<properties>
1717
<site.installationModule>google-cloud-bigquery</site.installationModule>
18-
<netty.version>4.1.119.Final</netty.version>
1918
</properties>
2019
<dependencies>
2120
<dependency>
@@ -117,37 +116,6 @@
117116
<dependency>
118117
<groupId>org.apache.arrow</groupId>
119118
<artifactId>arrow-memory-netty</artifactId>
120-
<!--
121-
Due to JDK8 requirement, we are forced to use arrow version below v18
122-
which has io.netty:netty-common a dep. and its vulnerabilities
123-
-->
124-
<exclusions>
125-
<exclusion>
126-
<groupId>io.netty</groupId>
127-
<artifactId>netty-common</artifactId>
128-
</exclusion>
129-
<exclusion>
130-
<groupId>io.netty</groupId>
131-
<artifactId>netty-buffer</artifactId>
132-
</exclusion>
133-
</exclusions>
134-
<scope>runtime</scope>
135-
</dependency>
136-
<!--
137-
Define io.netty versions to override org.apache.arrow:arrow-memory-netty
138-
transitive dependency versions which contains vulnerabilities.
139-
-->
140-
<dependency>
141-
<groupId>io.netty</groupId>
142-
<artifactId>netty-common</artifactId>
143-
<version>${netty.version}</version>
144-
<scope>runtime</scope>
145-
</dependency>
146-
<dependency>
147-
<groupId>io.netty</groupId>
148-
<artifactId>netty-buffer</artifactId>
149-
<version>${netty.version}</version>
150-
<scope>runtime</scope>
151119
</dependency>
152120

153121
<!-- auto-value creates a class that uses an annotation from error_prone_annotations -->
@@ -290,6 +258,7 @@
290258
<fork>true</fork>
291259
<compilerArgs>
292260
<arg>-J--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</arg>
261+
<arg>-J--add-opens=java.base/java.nio=java-base,ALL-UNNAMED</arg>
293262
</compilerArgs>
294263
</configuration>
295264
</plugin>
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
Args = --add-opens=java.base/java.nio=ALL-UNNAMED
1+
Args = --add-opens=java.base/java.nio=ALL-UNNAMED \
2+
--initialize-at-run-time=org.apache.arrow.memory.netty.DefaultAllocationManagerFactory

google-cloud-bigquery/src/main/resources/META-INF/native-image/com.google.cloud/google-cloud-bigquery/reflect-config.json

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@
3131
},
3232
{
3333
"name":"org.apache.arrow.memory.DefaultAllocationManagerFactory",
34-
"fields":[{"name":"FACTORY"}]
34+
"allDeclaredFields":true,
35+
"queryAllDeclaredFields":true,
36+
"queryAllDeclaredMethods":true,
37+
"queryAllDeclaredConstructors":true
3538
},
3639
{
3740
"name":"org.apache.arrow.vector.types.pojo.ArrowType",
@@ -50,6 +53,18 @@
5053
"allDeclaredFields":true,
5154
"queryAllDeclaredMethods":true
5255
},
56+
{
57+
"name": "org.apache.arrow.vector.types.pojo.DictionaryEncoding",
58+
"allDeclaredFields": true
59+
},
60+
{
61+
"name": "org.apache.arrow.vector.types.pojo.Field",
62+
"allDeclaredFields": true
63+
},
64+
{
65+
"name": "org.apache.arrow.vector.types.pojo.Schema",
66+
"allDeclaredFields": true
67+
},
5368
{
5469
"name":"io.netty.buffer.AbstractReferenceCountedByteBuf",
5570
"fields":[{"name":"refCnt"}]
Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,20 @@
11
{
22
"resources":{
3-
"includes":[{
4-
"pattern":"\\Qorg/apache/arrow/memory/DefaultAllocationManagerFactory.class\\E"
5-
}]}
3+
"includes":[
4+
{
5+
"pattern":"\\Qorg/apache/arrow/memory/DefaultAllocationManagerFactory.class\\E"
6+
}
7+
]
8+
},
9+
"globs":[
10+
{
11+
"glob": "org/apache/arrow/memory/DefaultAllocationManagerFactory.class"
12+
},
13+
{
14+
"glob": "org/apache/arrow/memory/netty/DefaultAllocationManagerFactory.class"
15+
},
16+
{
17+
"glob": "org/apache/arrow/memory/unsafe/DefaultAllocationManagerFactory.class"
18+
}
19+
]
620
}

0 commit comments

Comments
 (0)