Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enable google-bigquery and add a work around #5041

Merged
merged 2 commits into from
Jul 4, 2023

Conversation

zhfeng
Copy link
Contributor

@zhfeng zhfeng commented Jul 3, 2023

Exclude org.apache.arrow:arrow-memory-netty because it is not compatible with the lastest netty 4.1.94.Final.

@jamesnetherton
Copy link
Contributor

We should add the same doc notes for the workaround like we did for pubsub & storage.

Also, not sure how safe the Arrow exclusion is. It is referenced in a few places:

https://github.com/search?q=repo%3Agoogleapis%2Fjava-bigquery+arrow+language%3AJava&type=code&l=Java

I guess the fact that the native compilation + tests passed means that maybe we don't hit those code paths in Camel...

@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 3, 2023

Yeah, it is exactly what I was concerned. It seems that google-bigquery default uses DataFormat.ARROW when read/write a large data table result.

We don't hit those codes because we lack of a test for the large table. So how can write a sentence for this limitation?

@jamesnetherton
Copy link
Contributor

Thinking a bit more, I'm not sure I like excluding Arrow because it potentially impacts negatively on JVM mode, and the issue is purely a native mode one.

@jamesnetherton
Copy link
Contributor

@zhfeng is it just the shaded Netty of Arrow that is causing the problem? If Arrow does not modify any of the Netty bits, maybe we could try something similar to what we did for Kudu and shaded Netty? See here: #2008 & #1907.

@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 3, 2023

@jamesnetherton I think apache-arrow does not shade Netty. The problem is Quarkus 3.2.0.Final update Netty to 4.1.94.Final and there is an un-compatible change in PooledByteBufAllocator. So I think it could also impact the JVM mode if we test with a large table.

The fix in apache-arrow is apache/arrow@ea4f03a#diff-d967dd684919ce097b81e439fafc96217f1263985f5864faa4b78eb96e7a4f16L164

So is it possible to have this file in our camel-quarkus-google-bigquery?

@jamesnetherton
Copy link
Contributor

Ah, yeah. Sorry for the confusion!

So is it possible to have this file in our camel-quarkus-google-bigquery?

We could temporarily have it in our extension. Quarkus has RemovedResourceBuildItem, not sure if that could also be used to remove the bad impl from Arrow?

If it becomes too much work. Maybe we just stick with the original plan of removing Arrow until we get the fix.

@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 4, 2023

Sine org.apache.arrow:arrow-memory-netty is a runtime dependency, RemovedResourceBuildItem seems not working. I just try to copy 4 files from apache-arrow

  • LargeBuffer.java
  • MutableWrappedByteBuf.java
  • PooledByteBufAllocatorL.java
  • UnsafeDirectLittleEndian.java

and apply the fix for PooledByteBufAllocatorL.java. All of the google-bigquery tests look good both in JVM and native mode.

Also I think we need a test for a large table and enable the result with arrow data format. Can it be supported by wiremock?

@jamesnetherton
Copy link
Contributor

Can it be supported by wiremock?

Yes, probably. Not sure if it'd mean storing huge files for the stubbed data in the repo though.....

@ppalaga
Copy link
Contributor

ppalaga commented Jul 4, 2023

storing huge files for the stubbed data

We could perhaps generate those at build time?

@zhfeng zhfeng force-pushed the issue_5006_google_bigquery branch from 584ac5c to 69be37e Compare July 4, 2023 06:57
@zhfeng
Copy link
Contributor Author

zhfeng commented Jul 4, 2023

I raise

@zhfeng zhfeng force-pushed the issue_5006_google_bigquery branch from 69be37e to ebaa833 Compare July 4, 2023 07:10
@zhfeng zhfeng merged commit 4499894 into apache:main Jul 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Mandrel 23.0.0] google-bigquery integration test native compilation fails
4 participants