[SPARK-37073][AVRO][TEST] Pass all UTs in external/avro with Java 17#34364
Closed
LuciferYang wants to merge 1 commit intoapache:masterfrom
Closed
[SPARK-37073][AVRO][TEST] Pass all UTs in external/avro with Java 17#34364LuciferYang wants to merge 1 commit intoapache:masterfrom
external/avro with Java 17#34364LuciferYang wants to merge 1 commit intoapache:masterfrom
Conversation
wangyum
approved these changes
Oct 22, 2021
|
Test build #144530 has finished for PR 34364 at commit
|
LuciferYang
commented
Oct 22, 2021
| }.getCause.getMessage | ||
| assert(message.contains("Caused by: java.lang.NullPointerException: " + | ||
| assert(message.contains("Caused by: java.lang.NullPointerException: ")) | ||
| assert(message.contains( |
Contributor
Author
There was a problem hiding this comment.
The whole error message as follows:
"Job aborted due to stage failure: Task 1 in stage 144.0 failed 1 times, most recent failure: Lost task 1.0 in stage 144.0 (TID 250) (localhost executor driver): org.apache.spark.SparkException: Task failed while writing rows.
at org.apache.spark.sql.errors.QueryExecutionErrors$.taskFailedWhileWritingRowsError(QueryExecutionErrors.scala:516)
at org.apache.spark.sql.execution.datasources.FileFormatWriter$.executeTask(FileFormatWriter.scala:345)
at org.apache.spark.sql.execution.datasources.FileFormatWriter$.$anonfun$write$20(FileFormatWriter.scala:252)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:90)
at org.apache.spark.scheduler.Task.run(Task.scala:136)
at org.apache.spark.executor.Executor$TaskRunner.$anonfun$run$3(Executor.scala:507)
at org.apache.spark.util.Utils$.tryWithSafeFinally(Utils.scala:1468)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:510)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
at java.base/java.lang.Thread.run(Thread.java:833)
Caused by: org.apache.avro.file.DataFileWriter$AppendWriteException: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "datum" is null of string in string in field Name of test_schema in test_schema
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:317)
at org.apache.spark.sql.avro.SparkAvroKeyRecordWriter.write(SparkAvroKeyOutputFormat.java:84)
at org.apache.spark.sql.avro.SparkAvroKeyRecordWriter.write(SparkAvroKeyOutputFormat.java:62)
at org.apache.spark.sql.avro.AvroOutputWriter.write(AvroOutputWriter.scala:84)
at org.apache.spark.sql.execution.datasources.SingleDirectoryDataWriter.write(FileFormatDataWriter.scala:175)
at org.apache.spark.sql.execution.datasources.FileFormatDataWriter.writeWithMetrics(FileFormatDataWriter.scala:85)
at org.apache.spark.sql.execution.datasources.FileFormatDataWriter.writeWithIterator(FileFormatDataWriter.scala:92)
at org.apache.spark.sql.execution.datasources.FileFormatWriter$.$anonfun$executeTask$1(FileFormatWriter.scala:328)
at org.apache.spark.util.Utils$.tryWithSafeFinallyAndFailureCallbacks(Utils.scala:1502)
at org.apache.spark.sql.execution.datasources.FileFormatWriter$.executeTask(FileFormatWriter.scala:335)
... 9 more
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "datum" is null of string in string in field Name of test_schema in test_schema
at org.apache.avro.generic.GenericDatumWriter.npe(GenericDatumWriter.java:184)
at org.apache.avro.reflect.ReflectDatumWriter.write(ReflectDatumWriter.java:160)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:73)
at org.apache.avro.file.DataFileWriter.append(DataFileWriter.java:314)
... 18 more
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "datum" is null
at org.apache.avro.specific.SpecificDatumWriter.writeString(SpecificDatumWriter.java:68)
at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:151)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:83)
at org.apache.avro.reflect.ReflectDatumWriter.write(ReflectDatumWriter.java:158)
at org.apache.avro.generic.GenericDatumWriter.writeField(GenericDatumWriter.java:221)
at org.apache.avro.specific.SpecificDatumWriter.writeField(SpecificDatumWriter.java:101)
at org.apache.avro.reflect.ReflectDatumWriter.writeField(ReflectDatumWriter.java:184)
at org.apache.avro.generic.GenericDatumWriter.writeRecord(GenericDatumWriter.java:210)
at org.apache.avro.specific.SpecificDatumWriter.writeRecord(SpecificDatumWriter.java:83)
at org.apache.avro.generic.GenericDatumWriter.writeWithoutConversion(GenericDatumWriter.java:131)
at org.apache.avro.generic.GenericDatumWriter.write(GenericDatumWriter.java:83)
at org.apache.avro.reflect.ReflectDatumWriter.write(ReflectDatumWriter.java:158)
... 20 more
so we can't assert with startWith and endWith
|
Kubernetes integration test starting |
|
Kubernetes integration test status failure |
HyukjinKwon
approved these changes
Oct 22, 2021
Member
|
Merged to master. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes were proposed in this pull request?
The
external/avromodule test with Java 17 has 2 UT failed, the reason for the failure is that the content of the error message fragment used for assertion has changed fromto
This change should be caused by
JEP 358: Helpful NullPointerExceptions.So the change of this pr is splits one assertion into two assertions to be compatible with different Java versions.
Why are the changes needed?
Pass UT with JDK 17
Does this PR introduce any user-facing change?
No
How was this patch tested?
Pass the Jenkins or GitHub Action
Manual test use Java 17
mvn clean install -pl external/avroBefore
After