zhztheplayer commented on code in PR #8996:
URL: https://github.com/apache/incubator-gluten/pull/8996#discussion_r1995157773
##########
gluten-core/src/main/scala/org/apache/gluten/initializer/CodedInputStreamClassInitializer.scala:
##########
@@ -34,8 +38,14 @@ object CodedInputStreamClassInitializer {
val field: Field = clazz.getDeclaredField("defaultRecursionLimit")
field.setAccessible(true)
// Enlarge defaultRecursionLimit whose original value is 100.
- field.setInt(null, 100000)
+ field.setInt(null, newDefaultRecursionLimit)
+ logInfo(
+ s"The defaultRecursionLimit in protobuf has been increased to
$newDefaultRecursionLimit")
} catch {
+ // The class is shaded during package phase (see package/pom.xml). We
tolerate
+ // this ClassNotFoundException in mvn test.
+ case _: ClassNotFoundException =>
+ logWarning("The defaultRecursionLimit in protobuf has not been
modified.")
Review Comment:
Curious why don't we support both cases? Say we either find
`com.google.protobuf.CodedInputStream`, or find
`org.apache.gluten.shaded.com.google.protobuf.CodedInputStream`, or raise an
error.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]